3b89e5d467
As part of consolidating all common Python-based functionality into the new sonic-py-common package, this pull request: 1. Redirects all Python applications/scripts in sonic-buildimage repo which previously imported sonic_device_util or sonic_daemon_base to instead import sonic-py-common, which was added in https://github.com/Azure/sonic-buildimage/pull/5003 2. Replaces all calls to `sonic_device_util.get_platform_info()` to instead call `sonic_py_common.get_platform()` and removes any calls to `sonic_device_util.get_machine_info()` which are no longer necessary (i.e., those which were only used to pass the results to `sonic_device_util.get_platform_info()`. 3. Removes unused imports to the now-deprecated sonic-daemon-base package and sonic_device_util.py module This is the next step toward resolving https://github.com/Azure/sonic-buildimage/issues/4999 Also reverted my previous change in which device_info.get_platform() would first try obtaining the platform ID string from Config DB and fall back to gathering it from machine.conf upon failure because this function is called by sonic-cfggen before the data is in the DB, in which case, the db_connect() call will hang indefinitely, which was not the behavior I expected. As of now, the function will always reference machine.conf.
51 lines
2.0 KiB
Makefile
51 lines
2.0 KiB
Makefile
# docker image for virtual switch based sonic docker image
|
|
|
|
DOCKER_SONIC_VS = docker-sonic-vs.gz
|
|
$(DOCKER_SONIC_VS)_PATH = $(PLATFORM_PATH)/docker-sonic-vs
|
|
$(DOCKER_SONIC_VS)_DEPENDS += $(SWSS) \
|
|
$(SYNCD_VS) \
|
|
$(PYTHON_SWSSCOMMON) \
|
|
$(LIBTEAMDCTL) \
|
|
$(LIBTEAM_UTILS) \
|
|
$(SONIC_DEVICE_DATA) \
|
|
$(LIBYANG) \
|
|
$(LIBYANG_CPP) \
|
|
$(LIBYANG_PY2)
|
|
|
|
$(DOCKER_SONIC_VS)_PYTHON_DEBS += $(SONIC_UTILS)
|
|
|
|
# swsssdk is a dependency of sonic-py-common
|
|
# TODO: sonic-py-common should depend on swsscommon instead
|
|
$(DOCKER_SONIC_VS)_PYTHON_WHEELS += $(SWSSSDK_PY2) \
|
|
$(SWSSSDK_PY3) \
|
|
$(SONIC_PY_COMMON_PY2) \
|
|
$(SONIC_PY_COMMON_PY3) \
|
|
$(SONIC_YANG_MODELS_PY3) \
|
|
$(SONIC_YANG_MGMT_PY)
|
|
|
|
ifeq ($(INSTALL_DEBUG_TOOLS), y)
|
|
$(DOCKER_SONIC_VS)_DEPENDS += $(SWSS_DBG) \
|
|
$(LIBSWSSCOMMON_DBG) \
|
|
$(LIBSAIREDIS_DBG) \
|
|
$(LIBSAIVS_DBG) \
|
|
$(SYNCD_VS_DBG)
|
|
endif
|
|
|
|
ifeq ($(SONIC_ROUTING_STACK), quagga)
|
|
$(DOCKER_SONIC_VS)_DEPENDS += $(QUAGGA)
|
|
else ifeq ($(SONIC_ROUTING_STACK), frr)
|
|
$(DOCKER_SONIC_VS)_DEPENDS += $(FRR)
|
|
else
|
|
$(DOCKER_SONIC_VS)_DEPENDS += $(GOBGP)
|
|
endif
|
|
|
|
$(DOCKER_SONIC_VS)_FILES += $(CONFIGDB_LOAD_SCRIPT) \
|
|
$(ARP_UPDATE_SCRIPT) \
|
|
$(BUFFERS_CONFIG_TEMPLATE) \
|
|
$(QOS_CONFIG_TEMPLATE) \
|
|
$(SONIC_VERSION) \
|
|
$(RM_CHASSISDB_CONFIG_SCRIPT)
|
|
|
|
$(DOCKER_SONIC_VS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER)
|
|
SONIC_DOCKER_IMAGES += $(DOCKER_SONIC_VS)
|