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:
Hua Liu 2022-08-24 12:40:12 +08:00 committed by GitHub
parent 776c93b96e
commit 3fc0fe1841
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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(

View File

@ -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(