new commands to add a range of vlans and add a member to a range of vlans#891
new commands to add a range of vlans and add a member to a range of vlans#891anilkpan wants to merge 8 commits intosonic-net:masterfrom anilkpan:master
Conversation
Added command to add/del a range of vlans and add/del an interface to a range of vlans.
|
This pull request introduces 2 alerts when merging 706af06 into fc719ad - view on LGTM.com new alerts:
|
config/main.py
Outdated
| warning_vlans_list.append(vid) | ||
| continue | ||
|
|
||
| pipe.hmset('VLAN|{}'.format(vlan), {'vlanid': vid}) |
There was a problem hiding this comment.
need use swsssdk as abstract layer of API. it is likely that current swsssdk does not provide such functionalities needed. but all db access need to go through the swss-common or swsssdk (plan to deprecate and replaced by swss-common). Bypassing them and calling directly using redis API makes us impossible to abstract the DB access layer and prevent us from improving db access in the future.
There was a problem hiding this comment.
@lguohan if I understood correctly, should I add a new API in swss-common/swsssdk and call the API from here instead of using redis client API directly?
There was a problem hiding this comment.
Anil - he's asking you to look in https://github.com/Azure/sonic-swss-common for a suitable DB access function and use this. If you don't find one that meets your needs then please add it - thanks.
|
This pull request introduces 2 alerts when merging e08f1bc into 4a47b3f - view on LGTM.com new alerts:
|
|
This pull request introduces 3 alerts when merging f9c6a36 into 9950955 - view on LGTM.com new alerts:
|
|
Added new APIs for bulk update: |
|
This pull request introduces 1 alert when merging 8f81ae4 into 9950955 - view on LGTM.com new alerts:
|
- What I did
Added new commands to be able to add a range of vlans and add a member of a range of vlans
- How I did it
Added the following new commands:
create a range of vlans
delete a range o vlans
add a member of range of vlans
remove a member from a range of vlans
- How to verify it
- Previous command output (if the output of a command-line utility has changed)
- New command output (if the output of a command-line utility has changed)
config vlan range add 2 50
config vlan member range add 2 50 Ethernet0
config vlan member range del 2 50 Ethernet0
config vlan range del 2 50