Skip to content

Commit

Permalink
Replace swsssdk.ConfigDBConnector and SonicDBConfig with swsscommon i…
Browse files Browse the repository at this point in the history
…mplementation in system-health (#8186)

swsssdk will be deprecated. Use swsscommon instead.
  • Loading branch information
qiluo-msft authored Jul 17, 2021
1 parent aca80a6 commit ec624e2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion rules/system-health.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
SYSTEM_HEALTH = system_health-1.0-py3-none-any.whl
$(SYSTEM_HEALTH)_SRC_PATH = $(SRC_PATH)/system-health
$(SYSTEM_HEALTH)_PYTHON_VERSION = 3
$(SYSTEM_HEALTH)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SWSSSDK_PY3) $(SONIC_CONFIG_ENGINE_PY3)
$(SYSTEM_HEALTH)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SONIC_CONFIG_ENGINE_PY3)
SONIC_PYTHON_WHEELS += $(SYSTEM_HEALTH)

export system_health_py3_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SYSTEM_HEALTH))"
2 changes: 1 addition & 1 deletion src/system-health/health_checker/hardware_checker.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from natsort import natsorted
from swsssdk import SonicV2Connector
from swsscommon.swsscommon import SonicV2Connector

from .health_checker import HealthChecker

Expand Down
2 changes: 1 addition & 1 deletion src/system-health/scripts/healthd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import signal
import threading

from sonic_py_common.daemon_base import DaemonBase
from swsssdk import SonicV2Connector
from swsscommon.swsscommon import SonicV2Connector

from health_checker.manager import HealthCheckerManager

Expand Down
1 change: 0 additions & 1 deletion src/system-health/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
dependencies = [
'natsort',
'sonic_py_common',
'swsssdk>=2.0.1',
]

setup(
Expand Down
4 changes: 2 additions & 2 deletions src/system-health/tests/test_system_health.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"""
import os
import sys
import swsssdk
from swsscommon import swsscommon

from mock import Mock, MagicMock, patch
from sonic_py_common import device_info

from .mock_connector import MockConnector

swsssdk.SonicV2Connector = MockConnector
swsscommon.SonicV2Connector = MockConnector

test_path = os.path.dirname(os.path.abspath(__file__))
modules_path = os.path.dirname(test_path)
Expand Down

0 comments on commit ec624e2

Please sign in to comment.