Skip to content

Commit

Permalink
Replace swsssdk.SonicV2Connector with swsscommon implementation (soni…
Browse files Browse the repository at this point in the history
…c-net#191)

swsssdk will be deprecated, and the python version of redis accessing classes will be replace by the same name classes in swsscommon, which are SWIG wrapped C++ code.
  • Loading branch information
qiluo-msft authored Jun 2, 2021
1 parent 9297a29 commit bf60a27
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sonic-pcied/scripts/pcied
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ try:
import sys
import threading

import swsssdk
from sonic_py_common import daemon_base, device_info
from swsscommon import swsscommon
except ImportError as e:
Expand Down Expand Up @@ -49,7 +48,7 @@ class DaemonPcied(daemon_base.DaemonBase):
self.timeout = PCIED_MAIN_THREAD_SLEEP_SECS
self.stop_event = threading.Event()

self.state_db = swsssdk.SonicV2Connector(host=REDIS_HOSTIP)
self.state_db = swsscommon.SonicV2Connector(host=REDIS_HOSTIP)
self.state_db.connect("STATE_DB")
state_db = daemon_base.db_connect("STATE_DB")
self.device_table = swsscommon.Table(state_db, PCIE_DEVICE_TABLE_NAME)
Expand Down

0 comments on commit bf60a27

Please sign in to comment.