[dockers] Rename 'docker-lldp-sv2' to 'docker-lldp' (#4700)
The -sv2 suffix was used to differentiate SNMP Dockers when we transitioned from "SONiCv1" to "SONiCv2", about four years ago. The old Docker materials were removed long ago; there is no need to keep this suffix. Removing it aligns the name with all the other Dockers.
This commit is contained in:
parent
95d51bd4a0
commit
9b27efdcc2
@ -10,20 +10,20 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
# Update apt's cache of available packages
|
||||
RUN apt-get update
|
||||
|
||||
{% if docker_lldp_sv2_debs.strip() -%}
|
||||
{% if docker_lldp_debs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{{ copy_files("debs/", docker_lldp_sv2_debs.split(' '), "/debs/") }}
|
||||
{{ copy_files("debs/", docker_lldp_debs.split(' '), "/debs/") }}
|
||||
|
||||
# Install locally-built Debian packages and implicitly install their dependencies
|
||||
{{ install_debian_packages(docker_lldp_sv2_debs.split(' ')) }}
|
||||
{{ install_debian_packages(docker_lldp_debs.split(' ')) }}
|
||||
{%- endif %}
|
||||
|
||||
{% if docker_lldp_sv2_whls.strip() -%}
|
||||
{% if docker_lldp_whls.strip() -%}
|
||||
# Copy locally-built Python wheel dependencies
|
||||
{{ copy_files("python-wheels/", docker_lldp_sv2_whls.split(' '), "/python-wheels/") }}
|
||||
{{ copy_files("python-wheels/", docker_lldp_whls.split(' '), "/python-wheels/") }}
|
||||
|
||||
# Install locally-built Python wheel dependencies
|
||||
{{ install_python_wheels(docker_lldp_sv2_whls.split(' ')) }}
|
||||
{{ install_python_wheels(docker_lldp_whls.split(' ')) }}
|
||||
{% endif %}
|
||||
|
||||
# Clean up
|
@ -2,7 +2,7 @@ include $(PLATFORM_PATH)/aboot-image.mk
|
||||
include $(PLATFORM_PATH)/onie-image.mk
|
||||
|
||||
SONIC_ALL += $(DOCKER_DATABASE) \
|
||||
$(DOCKER_LLDP_SV2) \
|
||||
$(DOCKER_LLDP) \
|
||||
$(DOCKER_SNMP_SV2) \
|
||||
$(DOCKER_PLATFORM_MONITOR) \
|
||||
$(DOCKER_DHCP_RELAY) \
|
||||
|
@ -1,11 +0,0 @@
|
||||
|
||||
DPATH := $($(DOCKER_LLDP_SV2)_PATH)
|
||||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-lldp-sv2.mk rules/docker-lldp-sv2.dep
|
||||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
||||
DEP_FILES += $(shell git ls-files $(DPATH))
|
||||
|
||||
$(DOCKER_LLDP_SV2)_CACHE_MODE := GIT_CONTENT_SHA
|
||||
$(DOCKER_LLDP_SV2)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
|
||||
$(DOCKER_LLDP_SV2)_DEP_FILES := $(DEP_FILES)
|
||||
|
||||
$(eval $(call add_dbg_docker,$(DOCKER_LLDP_SV2),$(DOCKER_LLDP_SV2_DBG)))
|
@ -1,32 +0,0 @@
|
||||
# docker image for lldp agent
|
||||
|
||||
DOCKER_LLDP_SV2_STEM = docker-lldp-sv2
|
||||
DOCKER_LLDP_SV2 = $(DOCKER_LLDP_SV2_STEM).gz
|
||||
DOCKER_LLDP_SV2_DBG = $(DOCKER_LLDP_SV2_STEM)-$(DBG_IMAGE_MARK).gz
|
||||
|
||||
$(DOCKER_LLDP_SV2)_PATH = $(DOCKERS_PATH)/docker-lldp-sv2
|
||||
|
||||
$(DOCKER_LLDP_SV2)_DEPENDS += $(LLDPD) $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON)
|
||||
|
||||
$(DOCKER_LLDP_SV2)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS)
|
||||
$(DOCKER_LLDP_SV2)_DBG_DEPENDS += $(LLDPD_DBG) $(LIBSWSSCOMMON_DBG)
|
||||
|
||||
$(DOCKER_LLDP_SV2)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES)
|
||||
|
||||
$(DOCKER_LLDP_SV2)_PYTHON_WHEELS += $(DBSYNCD_PY2)
|
||||
$(DOCKER_LLDP_SV2)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER)
|
||||
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_LLDP_SV2)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_LLDP_SV2)
|
||||
|
||||
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_LLDP_SV2_DBG)
|
||||
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_LLDP_SV2_DBG)
|
||||
|
||||
$(DOCKER_LLDP_SV2)_CONTAINER_NAME = lldp
|
||||
$(DOCKER_LLDP_SV2)_RUN_OPT += --privileged -t
|
||||
$(DOCKER_LLDP_SV2)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
|
||||
$(DOCKER_LLDP_SV2)_BASE_IMAGE_FILES += lldpctl:/usr/bin/lldpctl
|
||||
$(DOCKER_LLDP_SV2)_BASE_IMAGE_FILES += lldpcli:/usr/bin/lldpcli
|
||||
$(DOCKER_LLDP_SV2)_BASE_IMAGE_FILES += monit_lldp:/etc/monit/conf.d
|
||||
$(DOCKER_LLDP_SV2)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
|
11
rules/docker-lldp.dep
Normal file
11
rules/docker-lldp.dep
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
DPATH := $($(DOCKER_LLDP)_PATH)
|
||||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-lldp.mk rules/docker-lldp.dep
|
||||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
||||
DEP_FILES += $(shell git ls-files $(DPATH))
|
||||
|
||||
$(DOCKER_LLDP)_CACHE_MODE := GIT_CONTENT_SHA
|
||||
$(DOCKER_LLDP)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
|
||||
$(DOCKER_LLDP)_DEP_FILES := $(DEP_FILES)
|
||||
|
||||
$(eval $(call add_dbg_docker,$(DOCKER_LLDP),$(DOCKER_LLDP_DBG)))
|
32
rules/docker-lldp.mk
Normal file
32
rules/docker-lldp.mk
Normal file
@ -0,0 +1,32 @@
|
||||
# docker image for lldp agent
|
||||
|
||||
DOCKER_LLDP_STEM = docker-lldp
|
||||
DOCKER_LLDP = $(DOCKER_LLDP_STEM).gz
|
||||
DOCKER_LLDP_DBG = $(DOCKER_LLDP_STEM)-$(DBG_IMAGE_MARK).gz
|
||||
|
||||
$(DOCKER_LLDP)_PATH = $(DOCKERS_PATH)/docker-lldp
|
||||
|
||||
$(DOCKER_LLDP)_DEPENDS += $(LLDPD) $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON)
|
||||
|
||||
$(DOCKER_LLDP)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS)
|
||||
$(DOCKER_LLDP)_DBG_DEPENDS += $(LLDPD_DBG) $(LIBSWSSCOMMON_DBG)
|
||||
|
||||
$(DOCKER_LLDP)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES)
|
||||
|
||||
$(DOCKER_LLDP)_PYTHON_WHEELS += $(DBSYNCD_PY2)
|
||||
$(DOCKER_LLDP)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER)
|
||||
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_LLDP)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_LLDP)
|
||||
|
||||
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_LLDP_DBG)
|
||||
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_LLDP_DBG)
|
||||
|
||||
$(DOCKER_LLDP)_CONTAINER_NAME = lldp
|
||||
$(DOCKER_LLDP)_RUN_OPT += --privileged -t
|
||||
$(DOCKER_LLDP)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
|
||||
$(DOCKER_LLDP)_BASE_IMAGE_FILES += lldpctl:/usr/bin/lldpctl
|
||||
$(DOCKER_LLDP)_BASE_IMAGE_FILES += lldpcli:/usr/bin/lldpcli
|
||||
$(DOCKER_LLDP)_BASE_IMAGE_FILES += monit_lldp:/etc/monit/conf.d
|
||||
$(DOCKER_LLDP)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
|
@ -58,7 +58,7 @@ class TestJ2Files(TestCase):
|
||||
self.assertTrue(filecmp.cmp(os.path.join(self.test_dir, 'sample_output', 'docker-dhcp-relay.supervisord.conf'), self.output_file))
|
||||
|
||||
def test_lldp(self):
|
||||
lldpd_conf_template = os.path.join(self.test_dir, '..', '..', '..', 'dockers', 'docker-lldp-sv2', 'lldpd.conf.j2')
|
||||
lldpd_conf_template = os.path.join(self.test_dir, '..', '..', '..', 'dockers', 'docker-lldp', 'lldpd.conf.j2')
|
||||
argument = '-m ' + self.t0_minigraph + ' -p ' + self.t0_port_config + ' -t ' + lldpd_conf_template + ' > ' + self.output_file
|
||||
self.run_script(argument)
|
||||
self.assertTrue(filecmp.cmp(os.path.join(self.test_dir, 'sample_output', 'lldpd.conf'), self.output_file))
|
||||
|
Loading…
Reference in New Issue
Block a user