Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dockers] Rename 'docker-lldp-sv2' to 'docker-lldp' #4700

Merged
merged 1 commit into from
Jun 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion platform/generic/rules.mk
Original file line number Diff line number Diff line change
Expand 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) \
Expand Down
11 changes: 0 additions & 11 deletions rules/docker-lldp-sv2.dep

This file was deleted.

32 changes: 0 additions & 32 deletions rules/docker-lldp-sv2.mk

This file was deleted.

11 changes: 11 additions & 0 deletions rules/docker-lldp.dep
Original file line number Diff line number Diff line change
@@ -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 changes: 32 additions & 0 deletions rules/docker-lldp.mk
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion src/sonic-config-engine/tests/test_j2files.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_dhcp_relay(self):
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))
Expand Down