Disallow infra network on Distributed Cloud

Disallow infra network provisioning on Distributed Cloud systemcontrollers.

Story: 2002871
Task: 22823

Change-Id: I559c8a210d692bd2cda9ebc51064691775571db0
Signed-off-by: Jack Ding <jack.ding@windriver.com>
This commit is contained in:
Kevin Smith 2018-06-27 15:22:07 -04:00 committed by Jack Ding
parent 959b018784
commit b13cf38786
2 changed files with 15 additions and 1 deletions

View File

@ -533,6 +533,15 @@ class ConfigValidator(object):
infra_prefix = NETWORK_PREFIX_NAMES[self.naming_type][INFRA_TYPE]
mgmt_prefix = NETWORK_PREFIX_NAMES[self.naming_type][MGMT_TYPE]
if self.conf.has_section(infra_prefix + '_NETWORK'):
if (self.system_dc_role ==
DISTRIBUTED_CLOUD_ROLE_SYSTEMCONTROLLER):
# Disallow infrastructure network on systemcontroller,
# as services located on infrastructure network will not
# be reachable by subclouds.
raise ConfigFail("%s network not "
"supported on Distributed Cloud "
"SystemController." % infra_prefix)
self.infra_network = Network()
try:
self.infra_network.parse_config(self.conf, self.config_type,

View File

@ -2300,7 +2300,12 @@ class ConfigAssistant():
self.input_dc_selection()
self.input_pxeboot_config()
self.input_management_config()
self.input_infrastructure_config()
if self.system_dc_role != \
sysinv_constants.DISTRIBUTED_CLOUD_ROLE_SYSTEMCONTROLLER:
# Disallow infrastructure network on systemcontroller,
# as services located on infrastructure network will not
# be reachable by subclouds.
self.input_infrastructure_config()
self.input_external_oam_config()
self.input_authentication_config()