From ab79eb90daccb65b299850633186dc5d28561bbd Mon Sep 17 00:00:00 2001 From: vdahiya12 <67608553+vdahiya12@users.noreply.github.com> Date: Tue, 24 Aug 2021 23:04:12 -0700 Subject: [PATCH] [show][config] cli refactor for muxcable with abstract class implementation from vendors (#1722) Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com What I did this PR adds support for cli refactor which is done for abstract class implementation of muxcable which is provided by vendors. detailed design doc can be found Azure/SONiC#757 How I did it Added the changes in muxcable.py in show and config . How to verify it add unit-tests as well as run on a Arista-7050cx3 switch, run unit tests. no change in outputs, just the functionality has changed. Signed-off-by: vaibhav-dahiya --- config/muxcable.py | 1 - show/muxcable.py | 1 - 2 files changed, 2 deletions(-) diff --git a/config/muxcable.py b/config/muxcable.py index 3b82c28314..98ebc401a9 100644 --- a/config/muxcable.py +++ b/config/muxcable.py @@ -514,7 +514,6 @@ def setswitchmode(db, state, port): res_dict [1] = "unknown" res_dict = update_and_get_response_for_xcvr_cmd("config", "result", "True", "XCVRD_CONFIG_HWMODE_SWMODE_CMD", "XCVRD_CONFIG_HWMODE_SWMODE_RSP", port, 1, state) - rc = res_dict[0] delete_all_keys_in_db_table("APPL_DB", "XCVRD_CONFIG_HWMODE_SWMODE_CMD") diff --git a/show/muxcable.py b/show/muxcable.py index 588910c967..30b32540e5 100644 --- a/show/muxcable.py +++ b/show/muxcable.py @@ -740,7 +740,6 @@ def switchmode(db, port): """Shows the current switching mode of the muxcable {auto/manual}""" port = platform_sfputil_helper.get_interface_alias(port, db) - delete_all_keys_in_db_table("APPL_DB", "XCVRD_SHOW_HWMODE_SWMODE_CMD") delete_all_keys_in_db_table("STATE_DB", "XCVRD_SHOW_HWMODE_SWMODE_RSP")