Allow mgmt and infra network on single interface
This update allows management and infrastructure interface to share the same interface without VLAN. Removed the restriction that enforce a VLAN to be used. Story: 2003087 Task: 23171 Change-Id: Ic50fa0cd388c664f3277681b4d87b63aeb0c6447 Signed-off-by: Teresa Ho <teresa.ho@windriver.com>
This commit is contained in:
parent
3a5e7c6fd6
commit
f8b82f2dff
|
@ -606,10 +606,6 @@ class ConfigValidator(object):
|
||||||
self.configured_vlans.append(self.infra_network.vlan)
|
self.configured_vlans.append(self.infra_network.vlan)
|
||||||
infrastructure_interface_name += '.' + (
|
infrastructure_interface_name += '.' + (
|
||||||
str(self.infra_network.vlan))
|
str(self.infra_network.vlan))
|
||||||
elif self.infrastructure_interface == self.management_interface:
|
|
||||||
raise ConfigFail(
|
|
||||||
"VLAN required for %s_NETWORK since it uses the same "
|
|
||||||
"interface as another network" % infra_prefix)
|
|
||||||
|
|
||||||
mtu = self.infra_network.logical_interface.mtu
|
mtu = self.infra_network.logical_interface.mtu
|
||||||
if not is_mtu_valid(mtu):
|
if not is_mtu_valid(mtu):
|
||||||
|
|
9
controllerconfig/controllerconfig/controllerconfig/tests/test_region_config.py
Executable file → Normal file
9
controllerconfig/controllerconfig/controllerconfig/tests/test_region_config.py
Executable file → Normal file
|
@ -736,15 +736,6 @@ def test_region_config_validation():
|
||||||
with pytest.raises(exceptions.ConfigFail):
|
with pytest.raises(exceptions.ConfigFail):
|
||||||
validate(region_config, REGION_CONFIG, None, False)
|
validate(region_config, REGION_CONFIG, None, False)
|
||||||
|
|
||||||
# Test BLS_VLAN missing
|
|
||||||
region_config = cr.parse_system_config(lag_vlan_regionfile)
|
|
||||||
region_config.remove_option('BLS_NETWORK', 'BLS_VLAN')
|
|
||||||
with pytest.raises(exceptions.ConfigFail):
|
|
||||||
cr.create_cgcs_config_file(None, region_config, None, None, None,
|
|
||||||
validate_only=True)
|
|
||||||
with pytest.raises(exceptions.ConfigFail):
|
|
||||||
validate(region_config, REGION_CONFIG, None, False)
|
|
||||||
|
|
||||||
# Test overlap of CAN_CIDR
|
# Test overlap of CAN_CIDR
|
||||||
region_config = cr.parse_system_config(lag_vlan_regionfile)
|
region_config = cr.parse_system_config(lag_vlan_regionfile)
|
||||||
region_config.set('CAN_NETWORK', 'CAN_CIDR', '192.168.203.0/26')
|
region_config.set('CAN_NETWORK', 'CAN_CIDR', '192.168.203.0/26')
|
||||||
|
|
|
@ -330,15 +330,6 @@ def test_system_config_validation():
|
||||||
with pytest.raises(exceptions.ConfigFail):
|
with pytest.raises(exceptions.ConfigFail):
|
||||||
validate(system_config, DEFAULT_CONFIG, None, False)
|
validate(system_config, DEFAULT_CONFIG, None, False)
|
||||||
|
|
||||||
# Test INFRA_NETWORK VLAN missing
|
|
||||||
system_config = cr.parse_system_config(lag_vlan_systemfile)
|
|
||||||
system_config.remove_option('INFRA_NETWORK', 'VLAN')
|
|
||||||
with pytest.raises(exceptions.ConfigFail):
|
|
||||||
cr.create_cgcs_config_file(None, system_config, None, None, None, 0,
|
|
||||||
validate_only=True)
|
|
||||||
with pytest.raises(exceptions.ConfigFail):
|
|
||||||
validate(system_config, DEFAULT_CONFIG, None, False)
|
|
||||||
|
|
||||||
# Test overlap of OAM_NETWORK CIDR
|
# Test overlap of OAM_NETWORK CIDR
|
||||||
system_config = cr.parse_system_config(lag_vlan_systemfile)
|
system_config = cr.parse_system_config(lag_vlan_systemfile)
|
||||||
system_config.set('OAM_NETWORK', 'CIDR', '192.168.203.0/26')
|
system_config.set('OAM_NETWORK', 'CIDR', '192.168.203.0/26')
|
||||||
|
|
Loading…
Reference in New Issue