Skip to content

Commit ec624e2

Browse files
authored
Replace swsssdk.ConfigDBConnector and SonicDBConfig with swsscommon implementation in system-health (#8186)
swsssdk will be deprecated. Use swsscommon instead.
1 parent aca80a6 commit ec624e2

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

rules/system-health.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
SYSTEM_HEALTH = system_health-1.0-py3-none-any.whl
44
$(SYSTEM_HEALTH)_SRC_PATH = $(SRC_PATH)/system-health
55
$(SYSTEM_HEALTH)_PYTHON_VERSION = 3
6-
$(SYSTEM_HEALTH)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SWSSSDK_PY3) $(SONIC_CONFIG_ENGINE_PY3)
6+
$(SYSTEM_HEALTH)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SONIC_CONFIG_ENGINE_PY3)
77
SONIC_PYTHON_WHEELS += $(SYSTEM_HEALTH)
88

99
export system_health_py3_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SYSTEM_HEALTH))"

src/system-health/health_checker/hardware_checker.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from natsort import natsorted
2-
from swsssdk import SonicV2Connector
2+
from swsscommon.swsscommon import SonicV2Connector
33

44
from .health_checker import HealthChecker
55

src/system-health/scripts/healthd

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import signal
99
import threading
1010

1111
from sonic_py_common.daemon_base import DaemonBase
12-
from swsssdk import SonicV2Connector
12+
from swsscommon.swsscommon import SonicV2Connector
1313

1414
from health_checker.manager import HealthCheckerManager
1515

src/system-health/setup.py

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
dependencies = [
44
'natsort',
55
'sonic_py_common',
6-
'swsssdk>=2.0.1',
76
]
87

98
setup(

src/system-health/tests/test_system_health.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
"""
1111
import os
1212
import sys
13-
import swsssdk
13+
from swsscommon import swsscommon
1414

1515
from mock import Mock, MagicMock, patch
1616
from sonic_py_common import device_info
1717

1818
from .mock_connector import MockConnector
1919

20-
swsssdk.SonicV2Connector = MockConnector
20+
swsscommon.SonicV2Connector = MockConnector
2121

2222
test_path = os.path.dirname(os.path.abspath(__file__))
2323
modules_path = os.path.dirname(test_path)

0 commit comments

Comments
 (0)