From f8b82f2dff2f211d53244db7cfcb02684ea0a8c4 Mon Sep 17 00:00:00 2001 From: Teresa Ho Date: Mon, 17 Sep 2018 13:08:37 -0400 Subject: [PATCH] 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 --- .../configutilities/configutilities/common/validator.py | 4 ---- .../controllerconfig/tests/test_region_config.py | 9 --------- .../controllerconfig/tests/test_system_config.py | 9 --------- 3 files changed, 22 deletions(-) mode change 100755 => 100644 controllerconfig/controllerconfig/controllerconfig/tests/test_region_config.py diff --git a/configutilities/configutilities/configutilities/common/validator.py b/configutilities/configutilities/configutilities/common/validator.py index 12cb6d7b14..072742e355 100755 --- a/configutilities/configutilities/configutilities/common/validator.py +++ b/configutilities/configutilities/configutilities/common/validator.py @@ -606,10 +606,6 @@ class ConfigValidator(object): self.configured_vlans.append(self.infra_network.vlan) infrastructure_interface_name += '.' + ( 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 if not is_mtu_valid(mtu): diff --git a/controllerconfig/controllerconfig/controllerconfig/tests/test_region_config.py b/controllerconfig/controllerconfig/controllerconfig/tests/test_region_config.py old mode 100755 new mode 100644 index 1fe3cb25e1..d077411e65 --- a/controllerconfig/controllerconfig/controllerconfig/tests/test_region_config.py +++ b/controllerconfig/controllerconfig/controllerconfig/tests/test_region_config.py @@ -736,15 +736,6 @@ def test_region_config_validation(): with pytest.raises(exceptions.ConfigFail): 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 region_config = cr.parse_system_config(lag_vlan_regionfile) region_config.set('CAN_NETWORK', 'CAN_CIDR', '192.168.203.0/26') diff --git a/controllerconfig/controllerconfig/controllerconfig/tests/test_system_config.py b/controllerconfig/controllerconfig/controllerconfig/tests/test_system_config.py index 9923078366..c179e7f1f9 100644 --- a/controllerconfig/controllerconfig/controllerconfig/tests/test_system_config.py +++ b/controllerconfig/controllerconfig/controllerconfig/tests/test_system_config.py @@ -330,15 +330,6 @@ def test_system_config_validation(): with pytest.raises(exceptions.ConfigFail): 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 system_config = cr.parse_system_config(lag_vlan_systemfile) system_config.set('OAM_NETWORK', 'CIDR', '192.168.203.0/26')