Remove swsssdk from rules and image. (#11469)

#### Why I did it
To deprecate swsssdk, remove all dependency to it. 

#### How I did it
Remove swsssdk from rules and build image scripts.

#### How to verify it
Pass all UT and 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
Remove swsssdk from rules and build image scripts.

#### 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-25 08:35:51 +08:00 committed by GitHub
parent e740573892
commit 214e394ac0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 10 additions and 16 deletions

View File

@ -19,7 +19,6 @@ check program container_checker with path "/usr/bin/container_checker"
import docker
import sys
import swsssdk
from sonic_py_common import multi_asic, device_info
from swsscommon import swsscommon
@ -34,7 +33,7 @@ def get_expected_running_containers():
@return: A set which contains the expected running containers and a set that has
containers marked as "always_enabled".
"""
config_db = swsssdk.ConfigDBConnector()
config_db = swsscommon.ConfigDBConnector()
config_db.connect()
feature_table = config_db.get_table("FEATURE")

View File

@ -10,7 +10,7 @@ import syslog
import time
from collections import defaultdict
import swsssdk
from swsscommon import swsscommon
from supervisor import childutils
@ -87,7 +87,7 @@ def get_autorestart_state(container_name):
@summary: Read the status of auto-restart feature from Config_DB.
@return: Return the status of auto-restart feature.
"""
config_db = swsssdk.ConfigDBConnector()
config_db = swsscommon.ConfigDBConnector()
config_db.connect()
features_table = config_db.get_table(FEATURE_TABLE_NAME)
if not features_table:

View File

@ -4,6 +4,6 @@ ASYNCSNMP_PY3 = asyncsnmp-2.1.0-py3-none-any.whl
$(ASYNCSNMP_PY3)_SRC_PATH = $(SRC_PATH)/sonic-snmpagent
$(ASYNCSNMP_PY3)_PYTHON_VERSION = 3
# Depends on sonic-platform-common so it is possible to import sonic_psu
$(ASYNCSNMP_PY3)_DEPENDS += $(SWSSSDK_PY3) $(SONIC_PLATFORM_COMMON_PY3)
$(ASYNCSNMP_PY3)_DEPENDS += $(SONIC_PY_COMMON_PY3) $(SONIC_PLATFORM_COMMON_PY3)
$(ASYNCSNMP_PY3)_DEBS_DEPENDS += $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON)
SONIC_PYTHON_WHEELS += $(ASYNCSNMP_PY3)

View File

@ -3,6 +3,6 @@
DBSYNCD_PY3 = sonic_d-2.0.0-py3-none-any.whl
$(DBSYNCD_PY3)_SRC_PATH = $(SRC_PATH)/sonic-dbsyncd
$(DBSYNCD_PY3)_PYTHON_VERSION = 3
$(DBSYNCD_PY3)_DEPENDS += $(SWSSSDK_PY3)
$(DBSYNCD_PY3)_DEPENDS += $(SONIC_PY_COMMON_PY3)
$(DBSYNCD_PY3)_DEBS_DEPENDS += $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON)
SONIC_PYTHON_WHEELS += $(DBSYNCD_PY3)

View File

@ -9,7 +9,6 @@ $(DOCKER_CONFIG_ENGINE_BULLSEYE)_DEPENDS += $(LIBSWSSCOMMON) \
$(LIBYANG_PY3) \
$(PYTHON3_SWSSCOMMON) \
$(SONIC_DB_CLI)
$(DOCKER_CONFIG_ENGINE_BULLSEYE)_PYTHON_WHEELS += $(SWSSSDK_PY3)
$(DOCKER_CONFIG_ENGINE_BULLSEYE)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3) \
$(SONIC_YANG_MGMT_PY3) \
$(SONIC_YANG_MODELS_PY3)

View File

@ -9,7 +9,6 @@ $(DOCKER_CONFIG_ENGINE_BUSTER)_DEPENDS += $(LIBSWSSCOMMON) \
$(LIBYANG_PY3) \
$(PYTHON3_SWSSCOMMON) \
$(SONIC_DB_CLI)
$(DOCKER_CONFIG_ENGINE_BUSTER)_PYTHON_WHEELS += $(SWSSSDK_PY3)
$(DOCKER_CONFIG_ENGINE_BUSTER)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3) \
$(SONIC_YANG_MGMT_PY3) \
$(SONIC_YANG_MODELS_PY3)

View File

@ -5,7 +5,6 @@ $(DOCKER_CONFIG_ENGINE_STRETCH)_PATH = $(DOCKERS_PATH)/docker-config-engine-stre
$(DOCKER_CONFIG_ENGINE_STRETCH)_DEPENDS += $(LIBSWSSCOMMON) \
$(PYTHON_SWSSCOMMON) \
$(SONIC_DB_CLI)
$(DOCKER_CONFIG_ENGINE_STRETCH)_PYTHON_WHEELS += $(SWSSSDK_PY2)
$(DOCKER_CONFIG_ENGINE_STRETCH)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY2)
$(DOCKER_CONFIG_ENGINE_STRETCH)_PYTHON_WHEELS += $(SONIC_CONFIG_ENGINE_PY2)
$(DOCKER_CONFIG_ENGINE_STRETCH)_LOAD_DOCKERS += $(DOCKER_BASE_STRETCH)

View File

@ -4,7 +4,6 @@ DOCKER_CONFIG_ENGINE = docker-config-engine.gz
$(DOCKER_CONFIG_ENGINE)_PATH = $(DOCKERS_PATH)/docker-config-engine
$(DOCKER_CONFIG_ENGINE)_DEPENDS += $(LIBSWSSCOMMON) \
$(SONIC_DB_CLI)
$(DOCKER_CONFIG_ENGINE)_PYTHON_WHEELS += $(SWSSSDK_PY2)
$(DOCKER_CONFIG_ENGINE)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY2)
$(DOCKER_CONFIG_ENGINE)_PYTHON_WHEELS += $(SONIC_CONFIG_ENGINE_PY2)
$(DOCKER_CONFIG_ENGINE)_LOAD_DOCKERS += $(DOCKER_BASE)

View File

@ -10,7 +10,6 @@ $(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(LIBSENSORS) $(LM_SENSORS) $(FANCONTROL)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PLATFORM_COMMON_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SWSSSDK_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_CONFIG_ENGINE_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PLATFORM_API_PY3)

View File

@ -11,10 +11,11 @@ $(DOCKER_SNMP)_DEPENDS += $(SNMP) $(SNMPD)
$(DOCKER_SNMP)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_DEPENDS)
$(DOCKER_SNMP)_DBG_DEPENDS += $(SNMP_DBG) $(SNMPD_DBG) $(LIBSNMP_DBG)
$(DOCKER_SNMP)_DBG_DEPENDS += $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON)
$(DOCKER_SNMP)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_IMAGE_PACKAGES)
$(DOCKER_SNMP)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3) $(SONIC_PLATFORM_COMMON_PY3) $(SWSSSDK_PY3) $(ASYNCSNMP_PY3)
$(DOCKER_SNMP)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3) $(SONIC_PLATFORM_COMMON_PY3) $(ASYNCSNMP_PY3)
$(DOCKER_SNMP)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BULLSEYE)
$(DOCKER_SNMP)_VERSION = 1.0.0

View File

@ -3,8 +3,7 @@
SONIC_HOST_SERVICES_PY3 = sonic_host_services-1.0-py3-none-any.whl
$(SONIC_HOST_SERVICES_PY3)_SRC_PATH = $(SRC_PATH)/sonic-host-services
$(SONIC_HOST_SERVICES_PY3)_PYTHON_VERSION = 3
$(SONIC_HOST_SERVICES_PY3)_DEPENDS += $(SONIC_PY_COMMON_PY3) \
$(SWSSSDK_PY3)
$(SONIC_HOST_SERVICES_PY3)_DEPENDS += $(SONIC_PY_COMMON_PY3)
$(SONIC_HOST_SERVICES_PY3)_DEBS_DEPENDS = $(LIBSWSSCOMMON) \
$(PYTHON3_SWSSCOMMON)
SONIC_PYTHON_WHEELS += $(SONIC_HOST_SERVICES_PY3)

View File

@ -8,7 +8,6 @@ $(SONIC_UTILITIES_PY3)_PYTHON_VERSION = 3
$(SONIC_UTILITIES_PY3)_NAME = $(SONIC_UTILITIES_PY3_NAME)
$(SONIC_UTILITIES_PY3)_VERSION = $(SONIC_UTILITIES_PY3_VERSION)
$(SONIC_UTILITIES_PY3)_DEPENDS += $(SONIC_PY_COMMON_PY3) \
$(SWSSSDK_PY3) \
$(SONIC_CONFIG_ENGINE_PY3) \
$(SONIC_PLATFORM_COMMON_PY3) \
$(SONIC_YANG_MGMT_PY3) \

View File

@ -5,7 +5,8 @@ SONIC_ZTP_VERSION = 1.0.0
SONIC_ZTP = sonic-ztp_$(SONIC_ZTP_VERSION)_all.deb
$(SONIC_ZTP)_SRC_PATH = $(SRC_PATH)/sonic-ztp
$(SONIC_ZTP)_WHEEL_DEPENDS += $(SWSSSDK_PY3)
$(SONIC_ZTP)_PYTHON_VERSION = 3
$(SONIC_ZTP)_DEBS_DEPENDS += $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON)
SONIC_DPKG_DEBS += $(SONIC_ZTP)
export SONIC_ZTP_VERSION