Skip to content

Commit fe7fad0

Browse files
abdositiantianlv
authored andcommitted
Made Change to have Configurable option to enable/disable docker image (sonic-net#4171)
* Made Change to have Configurable option to enable/disable docker image * [Submodule-Update] sonic-utilities . Following PR has been merged tp 201911 * Platform Driver Development Framework (PDDF): Adding PDDF CLI utils * [config] Add 'feature' subcommand * [fwutil]: Command-line utility for interacting with platform components * [show] Add subcommand to display the status of auto-restart feature for each container * [config] Add subcommand to configure the status of auto-restart feature for each container * [Command Reference] Document CLI commands related to container auto-restart feature * [config/main.py] Modify reload() function to load configuration from init_cfg.json * Fix for dhcp_relay deletion on a VLAN * [config] Check if service exists before start/stop/restart of service * Multi-Db changes for NAT feature * [reboot] make sure the reboot happens even if platform reboot failed
1 parent 5ea65dd commit fe7fad0

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

rules/config

+3
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,6 @@ ENABLE_MGMT_FRAMEWORK = y
104104

105105
# ENABLE_RESTAPI - build docker-sonic-restapi for configuring the switch using REST APIs
106106
ENABLE_RESTAPI = n
107+
108+
# ENABLE_NAT - build docker-sonic-nat for nat support
109+
ENABLE_NAT = y

rules/docker-nat.mk

+4
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ $(DOCKER_NAT)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_IMAGE_P
1313

1414
$(DOCKER_NAT)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)
1515

16+
ifeq ($(ENABLE_NAT), y)
1617
SONIC_DOCKER_IMAGES += $(DOCKER_NAT)
1718
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_NAT)
1819
SONIC_STRETCH_DOCKERS += $(DOCKER_NAT)
20+
endif
1921

22+
ifeq ($(ENABLE_NAT), y)
2023
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_NAT_DBG)
2124
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_NAT_DBG)
2225
SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_NAT_DBG)
26+
endif
2327

2428
$(DOCKER_NAT)_CONTAINER_NAME = nat
2529
$(DOCKER_NAT)_RUN_OPT += --privileged -t

slave.mk

+7
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ ifeq ($(SONIC_ENABLE_SFLOW),y)
116116
ENABLE_SFLOW = y
117117
endif
118118

119+
ifeq ($(SONIC_ENABLE_NAT),y)
120+
ENABLE_NAT = y
121+
endif
122+
123+
119124
include $(RULES_PATH)/functions
120125
include $(RULES_PATH)/*.mk
121126
ifneq ($(CONFIGURED_PLATFORM), undefined)
@@ -203,6 +208,7 @@ $(info "BUILD_TIMESTAMP" : "$(BUILD_TIMESTAMP)")
203208
$(info "BLDENV" : "$(BLDENV)")
204209
$(info "VS_PREPARE_MEM" : "$(VS_PREPARE_MEM)")
205210
$(info "ENABLE_SFLOW" : "$(ENABLE_SFLOW)")
211+
$(info "ENABLE_NAT" : "$(ENABLE_NAT)")
206212
$(info )
207213

208214
ifeq ($(SONIC_USE_DOCKER_BUILDKIT),y)
@@ -649,6 +655,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
649655
export enable_system_telemetry="$(ENABLE_SYSTEM_TELEMETRY)"
650656
export enable_restapi="$(ENABLE_RESTAPI)"
651657
export enable_ztp="$(ENABLE_ZTP)"
658+
export enable_nat="$(ENABLE_NAT)"
652659
export shutdown_bgp_on_start="$(SHUTDOWN_BGP_ON_START)"
653660
export enable_pfcwd_on_start="$(ENABLE_PFCWD_ON_START)"
654661
export installer_debs="$(addprefix $(STRETCH_DEBS_PATH)/,$($*_INSTALLS))"

src/sonic-utilities

0 commit comments

Comments
 (0)