Replace swsssdk.ConfigDBConnector and SonicDBConfig with swsscommon implementation in system-health (#8186)
swsssdk will be deprecated. Use swsscommon instead.
This commit is contained in:
parent
aca80a685c
commit
ec624e280c
@ -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))"
|
||||
|
@ -1,5 +1,5 @@
|
||||
from natsort import natsorted
|
||||
from swsssdk import SonicV2Connector
|
||||
from swsscommon.swsscommon import SonicV2Connector
|
||||
|
||||
from .health_checker import HealthChecker
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -3,7 +3,6 @@ from setuptools import setup
|
||||
dependencies = [
|
||||
'natsort',
|
||||
'sonic_py_common',
|
||||
'swsssdk>=2.0.1',
|
||||
]
|
||||
|
||||
setup(
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user