From 3fc0fe1841b465090a1ac9584b9f36929cc1e603 Mon Sep 17 00:00:00 2001 From: Hua Liu <58683130+liuh-80@users.noreply.github.com> Date: Wed, 24 Aug 2022 12:40:12 +0800 Subject: [PATCH] Replace swsssdk with swsscommon in alphanetworks devices (#11349) #### Why I did it Update scripts in sonic-buildimage from py-swsssdk to swsscommon #### How I did it Replace swsssdk with swsscommon in alphanetworks devices code. #### How to verify it Pass all E2E test case #### Which release branch to backport (provide reason below if selected) - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 - [ ] 202205 #### Description for the changelog Replace swsssdk with swsscommon in alphanetworks devices code. #### Link to config_db schema for YANG module changes #### A picture of a cute animal (not mandatory but encouraged) --- .../plugins/led_control.py | 4 ++-- .../plugins/led_control.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/device/alphanetworks/x86_64-alphanetworks_snh60a0_320fv2-r0/plugins/led_control.py b/device/alphanetworks/x86_64-alphanetworks_snh60a0_320fv2-r0/plugins/led_control.py index 4da72e7f7a..7ce532554f 100644 --- a/device/alphanetworks/x86_64-alphanetworks_snh60a0_320fv2-r0/plugins/led_control.py +++ b/device/alphanetworks/x86_64-alphanetworks_snh60a0_320fv2-r0/plugins/led_control.py @@ -3,7 +3,7 @@ # try: # from sonic_led.led_control_base import LedControlBase -# import swsssdk +# from swsscommon import swsscommon # except ImportError as e: # raise ImportError (str(e) + " - required module not found") @@ -181,7 +181,7 @@ class LedControl(LedControlBase): sonic_port_num = int(port_name[len(self.SONIC_PORT_NAME_PREFIX):]) - swss = swsssdk.SonicV2Connector() + swss = swsscommon.SonicV2Connector() swss.connect(swss.APPL_DB) lanes = swss.get( diff --git a/device/alphanetworks/x86_64-alphanetworks_snh60b0_640f-r0/plugins/led_control.py b/device/alphanetworks/x86_64-alphanetworks_snh60b0_640f-r0/plugins/led_control.py index 53cc43c6cc..e7c8d3bc1e 100644 --- a/device/alphanetworks/x86_64-alphanetworks_snh60b0_640f-r0/plugins/led_control.py +++ b/device/alphanetworks/x86_64-alphanetworks_snh60b0_640f-r0/plugins/led_control.py @@ -5,7 +5,7 @@ # try: # from sonic_led.led_control_base import LedControlBase -# import swsssdk +# from swsscommon import swsscommon # except ImportError as e: # raise ImportError (str(e) + " - required module not found") @@ -148,7 +148,7 @@ class LedControl(LedControlBase): sonic_port_num = int(port_name[len(self.SONIC_PORT_NAME_PREFIX):]) - swss = swsssdk.SonicV2Connector() + swss = swsscommon.SonicV2Connector() swss.connect(swss.APPL_DB) lanes = swss.get(