Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[config/show] add support for vlan configuration #151

Merged
merged 1 commit into from
Dec 6, 2017

Conversation

ishidawataru
Copy link
Contributor

@ishidawataru ishidawataru commented Nov 17, 2017

sonic-net/sonic-py-swsssdk#22 and sonic-net/sonic-py-swsssdk#23 need to be get merged before this PR.

$ config vlan add 1000
$ config vlan member add 1000 Ethernet1
$ config vlan member add 1000 Ethernet9_1 -u
$ config vlan add 2000
$ config vlan member add 2000 Ethernet1
$ config vlan member add 2000 Ethernet9_2 -u

$ show vlan config
Name        VID  Member       Mode
--------  -----  -----------  --------
Vlan1000   1000  Ethernet1    tagged
                 Ethernet9_1  untagged
Vlan2000   2000  Ethernet1    tagged
                 Ethernet9_2  untagged

$ config vlan member del 1000 Ethernet1
$ config vlan member del 2000 Ethernet1

$ show vlan config
Name        VID  Member       Mode
--------  -----  -----------  --------
Vlan1000   1000  Ethernet9_1  untagged
Vlan2000   2000  Ethernet9_2  untagged

$ config vlan del 1000
$ config vlan del 2000

$ show vlan config
Name    VID    Member    Mode
------  -----  --------  ------

@lguohan
Copy link
Contributor

lguohan commented Dec 5, 2017

both swsssdk PR has been merge, can you help to resolve the conflict?

@ishidawataru
Copy link
Contributor Author

@lguohan done.

config/main.py Outdated
@click.pass_context
def del_vlan(ctx, vid):
db = ctx.obj['db']
db.set_entry('VLAN', 'Vlan{}'.format(vid), None)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to delete vlan members before deleting the vlan itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your review. fixed.

$ config vlan add 1000
$ config vlan member add 1000 Ethernet1
$ config vlan member add 1000 Ethernet9_1 -u
$ config vlan add 2000
$ config vlan member add 2000 Ethernet1
$ config vlan member add 2000 Ethernet9_2 -u

$ show vlan config
Name        VID  Member       Mode
--------  -----  -----------  --------
Vlan1000   1000  Ethernet1    tagged
                 Ethernet9_1  untagged
Vlan2000   2000  Ethernet1    tagged
                 Ethernet9_2  untagged

$ config vlan member del 1000 Ethernet1
$ config vlan member del 2000 Ethernet

$ show vlan config
Name        VID  Member       Mode
--------  -----  -----------  --------
Vlan1000   1000  Ethernet9_1  untagged
Vlan2000   2000  Ethernet9_2  untagged

$ config vlan del 1000
$ config vlan del 2000

$ show vlan config
Name    VID    Member    Mode
------  -----  --------  ------

Signed-off-by: Wataru Ishida <[email protected]>
@lguohan lguohan merged commit b074868 into sonic-net:master Dec 6, 2017
vdahiya12 pushed a commit to vdahiya12/sonic-utilities that referenced this pull request Jul 23, 2021
Add GitHub pull request template
mihirpat1 pushed a commit to mihirpat1/sonic-utilities that referenced this pull request Sep 15, 2023
* [sonic_y_cable] add check_mux_direction api for y_cable

Summary:
This PR provides the support for checking the mux_direction on the y_cable by checking the mux_direction register

Approach
added the changes in y_cable.py with register specification for check_mux_direction

What is the motivation for this PR?
check_mux_direction is required for y_cable_utilities to replace the active_linked_tor_side -> check_mux_direction as agreed as a part of design

Signed-off-by: vaibhav-dahiya <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants