-
Notifications
You must be signed in to change notification settings - Fork 668
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
[show][config] cli support for firmware upgrade on Y-Cable #1528
Conversation
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
This pull request introduces 1 alert when merging 233f238 into 1f1696a - view on LGTM.com new alerts:
|
This pull request introduces 3 alerts when merging b44a442 into 1f1696a - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a lot of duplicate code in these new functions. Can you look into writing a helper function(s) so as to share common code?
This pull request introduces 1 alert when merging 63c6977 into 6b51bcd - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging d04d25a into 6b51bcd - view on LGTM.com new alerts:
|
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
This pull request introduces 1 alert when merging a81c943 into 6b51bcd - view on LGTM.com new alerts:
|
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
This pull request introduces 1 alert when merging e12a491 into 6b51bcd - view on LGTM.com new alerts:
|
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
config/muxcable.py
Outdated
if rc: | ||
sys.exit(CONFIG_SUCCESSFUL) | ||
else: | ||
sys.exit(CONFIG_FAIL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rc
seems redundant as a bool. Suggest setting rc = CONFIG_SUCCESSFUL
on line 750, rc = CONFIG_FAIL
on line 764, and here simply call sys.exit(rc)
.
Suggest making this change throughout the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
This pull request introduces 1 alert when merging 52ece4b into 6b51bcd - view on LGTM.com new alerts:
|
show/muxcable.py
Outdated
@@ -820,3 +820,196 @@ def switchmode(port): | |||
click.echo(tabulate(body, headers=headers)) | |||
if rc == False: | |||
sys.exit(EXIT_FAIL) | |||
|
|||
|
|||
def create_result_dict(physical_port, mux_info_dict, result_dict): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jleveque should we move all this to y_cable.py or let it remain here ?
this is in regards to the newer resultant dict you suggested.
For example ?
{
"version_nic_active": "0.6MS",
"version_nic_inactive": "0.5MS",
"version_nic_next": "0.6MS",
"version_self_active": "0.5MS",
"version_self_inactive": "0.6MS",
"version_self_next": "0.6MS",
"version_peer_active": "0.6MS",
"version_peer_inactive": "0.6MS",
"version_peer_next": "0.6MS",
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In y_cable.py the function to get firmware from a end should return active, inactive and next values. I would think here we would call it for each end to gather the firmware versions for all ends that we can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactored, new API's used here
This pull request introduces 1 alert when merging f1c1550 into 9bbc25f - view on LGTM.com new alerts:
|
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@vdahiya12 this change cannot be cherry-picked to 202012 branch cleanly. Can you find the dependent PR or create separate PR with this change for 202012 branch? |
…#1528) Summary: This PR provides the support for adding CLI commands for activatie, download, upgrade firmware on the Y-cable In particular these Cli commands are supported: sudo config muxcable firmware download Ethernet0 sudo config muxcable firmware rollback Ethernet0 sudo config muxcable firmware download ~/AEC_WYOMING_B52Yb0_MS_0.6_20201218.bin Ethernet0 Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com What I did Added the support for firmware upgrade CLI on Y cable How I did it added the changes in sonic-utilities/show and sonic-utilities/config by changing the muxcable.py Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
opened a PR for 202012 branch |
…1558) * [show][config] cli support for firmware upgrade on Y-Cable (#1528) Summary: This PR provides the support for adding CLI commands for activatie, download, upgrade firmware on the Y-cable In particular these Cli commands are supported: sudo config muxcable firmware download Ethernet0 sudo config muxcable firmware rollback Ethernet0 sudo config muxcable firmware download ~/AEC_WYOMING_B52Yb0_MS_0.6_20201218.bin Ethernet0 Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com What I did Added the support for firmware upgrade CLI on Y cable How I did it added the changes in sonic-utilities/show and sonic-utilities/config by changing the muxcable.py Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
…#1528) Summary: This PR provides the support for adding CLI commands for activatie, download, upgrade firmware on the Y-cable In particular these Cli commands are supported: sudo config muxcable firmware download Ethernet0 sudo config muxcable firmware rollback Ethernet0 sudo config muxcable firmware download ~/AEC_WYOMING_B52Yb0_MS_0.6_20201218.bin Ethernet0 Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com What I did Added the support for firmware upgrade CLI on Y cable How I did it added the changes in sonic-utilities/show and sonic-utilities/config by changing the muxcable.py Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Support ACL Table type Mirrorv6 for Innovium (sonic-net#1528) Enable v6 ACL rule based Mirroring for Innovium Platform Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Summary:
This PR provides the support for adding CLI commands for activatie, download, upgrade firmware on the Y-cable
In particular these Cli commands are supported:
sudo config muxcable firmware download Ethernet0
sudo config muxcable firmware rollback Ethernet0
sudo config muxcable firmware download ~/AEC_WYOMING_B52Yb0_MS_0.6_20201218.bin Ethernet0
Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com
What I did
Added the support for firmware upgrade CLI on Y cable
How I did it
added the changes in sonic-utilities/show and sonic-utilities/config by changing the muxcable.py
How to verify it
Ran the command on a 7050cx3 arista switch
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)