Skip to content

Commit

Permalink
Made Change to have Configurable option to enable/disable docker image (
Browse files Browse the repository at this point in the history
#4171)

* Made Change to have Configurable option to enable/disable docker image

* [Submodule-Update] sonic-utilities to latest master
  • Loading branch information
abdosi authored Feb 21, 2020
1 parent fbc24b4 commit f5ab24d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions rules/config
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,6 @@ ENABLE_MGMT_FRAMEWORK = y

# ENABLE_RESTAPI - build docker-sonic-restapi for configuring the switch using REST APIs
ENABLE_RESTAPI = n

# ENABLE_NAT - build docker-sonic-nat for nat support
ENABLE_NAT = y
4 changes: 4 additions & 0 deletions rules/docker-nat.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ $(DOCKER_NAT)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_IMAGE_P

$(DOCKER_NAT)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)

ifeq ($(ENABLE_NAT), y)
SONIC_DOCKER_IMAGES += $(DOCKER_NAT)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_NAT)
SONIC_STRETCH_DOCKERS += $(DOCKER_NAT)
endif

ifeq ($(ENABLE_NAT), y)
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_NAT_DBG)
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_NAT_DBG)
SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_NAT_DBG)
endif

$(DOCKER_NAT)_CONTAINER_NAME = nat
$(DOCKER_NAT)_RUN_OPT += --privileged -t
Expand Down
7 changes: 7 additions & 0 deletions slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ ifeq ($(SONIC_ENABLE_SFLOW),y)
ENABLE_SFLOW = y
endif

ifeq ($(SONIC_ENABLE_NAT),y)
ENABLE_NAT = y
endif


include $(RULES_PATH)/functions
include $(RULES_PATH)/*.mk
ifneq ($(CONFIGURED_PLATFORM), undefined)
Expand Down Expand Up @@ -203,6 +208,7 @@ $(info "BUILD_TIMESTAMP" : "$(BUILD_TIMESTAMP)")
$(info "BLDENV" : "$(BLDENV)")
$(info "VS_PREPARE_MEM" : "$(VS_PREPARE_MEM)")
$(info "ENABLE_SFLOW" : "$(ENABLE_SFLOW)")
$(info "ENABLE_NAT" : "$(ENABLE_NAT)")
$(info )

ifeq ($(SONIC_USE_DOCKER_BUILDKIT),y)
Expand Down Expand Up @@ -650,6 +656,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
export enable_system_telemetry="$(ENABLE_SYSTEM_TELEMETRY)"
export enable_restapi="$(ENABLE_RESTAPI)"
export enable_ztp="$(ENABLE_ZTP)"
export enable_nat="$(ENABLE_NAT)"
export shutdown_bgp_on_start="$(SHUTDOWN_BGP_ON_START)"
export enable_pfcwd_on_start="$(ENABLE_PFCWD_ON_START)"
export installer_debs="$(addprefix $(STRETCH_DEBS_PATH)/,$($*_INSTALLS))"
Expand Down
2 changes: 1 addition & 1 deletion src/sonic-utilities

0 comments on commit f5ab24d

Please sign in to comment.