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][muxcable] Add support for displaying soc_ipv4 and cable_type in config/show muxcable commands #2189

Merged
merged 5 commits into from
Jun 7, 2022

Conversation

vdahiya12
Copy link
Contributor

@vdahiya12 vdahiya12 commented May 27, 2022

Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com
this PR enhances the show mux status output to include the cable -type and soc_ipv4 and config mux mode is corrected to include soc_ipv4 an cable_type when the mux mode entry is overwritten.

admin@sonic-1:~$ show mux config
SWITCH_NAME        PEER_TOR
-----------------  ----------
svcstr-7050-acs-2  10.1.0.33
port        state    ipv4             ipv6               cable_type      soc_ipv4
----------  -------  ---------------  -----------------  --------------  ---------------
Ethernet4   auto     192.168.0.2/32   fc02:1000::2/128   active-active   192.168.0.3/32
Ethernet8   auto     192.168.0.4/32   fc02:1000::4/128   active-active   192.168.0.5/32
Ethernet12  auto     192.168.0.6/32   fc02:1000::6/128   active-active   192.168.0.7/32
Ethernet16  auto     192.168.0.8/32   fc02:1000::8/128   active-active   192.168.0.9/32
Ethernet20  auto     192.168.0.10/32  fc02:1000::a/128   active-active   192.168.0.11/32
Ethernet24  auto     192.168.0.12/32  fc02:1000::c/128   active-active   192.168.0.13/32
Ethernet28  auto     192.168.0.14/32  fc02:1000::e/128   active-active   192.168.0.15/32
Ethernet32  auto     192.168.0.16/32  fc02:1000::10/128  active-active   192.168.0.17/32
Ethernet36  auto     192.168.0.18/32  fc02:1000::12/128  active-active   192.168.0.19/32
Ethernet40  auto     192.168.0.20/32  fc02:1000::14/128  active-active   192.168.0.21/32
Ethernet44  auto     192.168.0.22/32  fc02:1000::16/128  active-active   192.168.0.23/32
Ethernet48  auto     192.168.0.24/32  fc02:1000::18/128  active-active   192.168.0.25/32
Ethernet52  auto     192.168.0.26/32  fc02:1000::1a/128  active-standby
Ethernet56  auto     192.168.0.28/32  fc02:1000::1c/128  active-standby
Ethernet60  auto     192.168.0.30/32  fc02:1000::1e/128  active-standby
Ethernet64  auto     192.168.0.32/32  fc02:1000::20/128  active-standby
Ethernet68  auto     192.168.0.34/32  fc02:1000::22/128  active-standby
Ethernet72  auto     192.168.0.36/32  fc02:1000::24/128  active-standby
Ethernet76  auto     192.168.0.38/32  fc02:1000::26/128  active-standby
Ethernet80  auto     192.168.0.40/32  fc02:1000::28/128  active-standby
Ethernet84  auto     192.168.0.42/32  fc02:1000::2a/128  active-standby
Ethernet88  auto     192.168.0.44/32  fc02:1000::2c/128  active-standby
Ethernet92  auto     192.168.0.46/32  fc02:1000::2e/128  active-standby
Ethernet96  auto     192.168.0.48/32  fc02:1000::30/128  active-standby

What I did

modify config mux mode logic to be correct;
enhanced show mux config to display cable-type and soc_ipv4 if present

How I did it

How to verify it

UT and ran the changes on arista testbed

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/show muxcable commands

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
yxieca
yxieca previously approved these changes May 31, 2022
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
zjswhhh
zjswhhh previously approved these changes Jun 6, 2022
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@vdahiya12 vdahiya12 requested a review from zjswhhh June 7, 2022 19:50
@vdahiya12 vdahiya12 merged commit ff05bc8 into sonic-net:master Jun 7, 2022
yxieca pushed a commit that referenced this pull request Jun 7, 2022
… in config/show muxcable commands (#2189)

Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com
this PR enhances the show mux status output to include the cable -type and soc_ipv4 and config mux mode is corrected to include soc_ipv4 an cable_type when the mux mode entry is overwritten.

admin@sonic-1:~$ show mux config
SWITCH_NAME        PEER_TOR
-----------------  ----------
svcstr-7050-acs-2  10.1.0.33
port        state    ipv4             ipv6               cable_type      soc_ipv4
----------  -------  ---------------  -----------------  --------------  ---------------
Ethernet4   auto     192.168.0.2/32   fc02:1000::2/128   active-active   192.168.0.3/32
Ethernet8   auto     192.168.0.4/32   fc02:1000::4/128   active-active   192.168.0.5/32
Ethernet12  auto     192.168.0.6/32   fc02:1000::6/128   active-active   192.168.0.7/32
Ethernet16  auto     192.168.0.8/32   fc02:1000::8/128   active-active   192.168.0.9/32
Ethernet20  auto     192.168.0.10/32  fc02:1000::a/128   active-active   192.168.0.11/32
Ethernet24  auto     192.168.0.12/32  fc02:1000::c/128   active-active   192.168.0.13/32
Ethernet28  auto     192.168.0.14/32  fc02:1000::e/128   active-active   192.168.0.15/32
Ethernet32  auto     192.168.0.16/32  fc02:1000::10/128  active-active   192.168.0.17/32
Ethernet36  auto     192.168.0.18/32  fc02:1000::12/128  active-active   192.168.0.19/32
Ethernet40  auto     192.168.0.20/32  fc02:1000::14/128  active-active   192.168.0.21/32
Ethernet44  auto     192.168.0.22/32  fc02:1000::16/128  active-active   192.168.0.23/32
Ethernet48  auto     192.168.0.24/32  fc02:1000::18/128  active-active   192.168.0.25/32
Ethernet52  auto     192.168.0.26/32  fc02:1000::1a/128  active-standby
Ethernet56  auto     192.168.0.28/32  fc02:1000::1c/128  active-standby
Ethernet60  auto     192.168.0.30/32  fc02:1000::1e/128  active-standby
Ethernet64  auto     192.168.0.32/32  fc02:1000::20/128  active-standby
Ethernet68  auto     192.168.0.34/32  fc02:1000::22/128  active-standby
Ethernet72  auto     192.168.0.36/32  fc02:1000::24/128  active-standby
Ethernet76  auto     192.168.0.38/32  fc02:1000::26/128  active-standby
Ethernet80  auto     192.168.0.40/32  fc02:1000::28/128  active-standby
Ethernet84  auto     192.168.0.42/32  fc02:1000::2a/128  active-standby
Ethernet88  auto     192.168.0.44/32  fc02:1000::2c/128  active-standby
Ethernet92  auto     192.168.0.46/32  fc02:1000::2e/128  active-standby
Ethernet96  auto     192.168.0.48/32  fc02:1000::30/128  active-standby
What I did
modify config mux mode logic to be correct;
enhanced show mux config to display cable-type and soc_ipv4 if present

How I did it
How to verify it
UT and ran the changes on arista testbed

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
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.

3 participants