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) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 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 <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md --> #### A picture of a cute animal (not mandatory but encouraged)
This commit is contained in:
parent
776c93b96e
commit
3fc0fe1841
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
# try:
|
# try:
|
||||||
# from sonic_led.led_control_base import LedControlBase
|
# from sonic_led.led_control_base import LedControlBase
|
||||||
# import swsssdk
|
# from swsscommon import swsscommon
|
||||||
# except ImportError as e:
|
# except ImportError as e:
|
||||||
# raise ImportError (str(e) + " - required module not found")
|
# 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):])
|
sonic_port_num = int(port_name[len(self.SONIC_PORT_NAME_PREFIX):])
|
||||||
|
|
||||||
swss = swsssdk.SonicV2Connector()
|
swss = swsscommon.SonicV2Connector()
|
||||||
swss.connect(swss.APPL_DB)
|
swss.connect(swss.APPL_DB)
|
||||||
|
|
||||||
lanes = swss.get(
|
lanes = swss.get(
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
# try:
|
# try:
|
||||||
# from sonic_led.led_control_base import LedControlBase
|
# from sonic_led.led_control_base import LedControlBase
|
||||||
# import swsssdk
|
# from swsscommon import swsscommon
|
||||||
# except ImportError as e:
|
# except ImportError as e:
|
||||||
# raise ImportError (str(e) + " - required module not found")
|
# 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):])
|
sonic_port_num = int(port_name[len(self.SONIC_PORT_NAME_PREFIX):])
|
||||||
|
|
||||||
swss = swsssdk.SonicV2Connector()
|
swss = swsscommon.SonicV2Connector()
|
||||||
swss.connect(swss.APPL_DB)
|
swss.connect(swss.APPL_DB)
|
||||||
|
|
||||||
lanes = swss.get(
|
lanes = swss.get(
|
||||||
|
Loading…
Reference in New Issue
Block a user