diff --git a/whitebox_neutron_tempest_plugin/common/constants.py b/whitebox_neutron_tempest_plugin/common/constants.py index 05133b5..addd287 100644 --- a/whitebox_neutron_tempest_plugin/common/constants.py +++ b/whitebox_neutron_tempest_plugin/common/constants.py @@ -17,6 +17,9 @@ GLOBAL_IP = '1.1.1.1' METADATA_SERVICE_IP = '169.254.169.254' NODE_TUNNEL_INTERFACE = 'genev_sys_6081' OVN_MAX_GW_PORTS_PER_ROUTER = 5 +NEUTRON_CONF = { + 'devstack': '/etc/neutron/neutron.conf', + 'podified': '/etc/neutron/neutron.conf.d/01-neutron.conf'} NCAT_PORT = 65000 NCAT_TIMEOUT = 30 IP_HEADER_LENGTH = 20 diff --git a/whitebox_neutron_tempest_plugin/config.py b/whitebox_neutron_tempest_plugin/config.py index 8e80a57..48ba048 100644 --- a/whitebox_neutron_tempest_plugin/config.py +++ b/whitebox_neutron_tempest_plugin/config.py @@ -113,9 +113,6 @@ WhiteboxNeutronPluginOptions = [ cfg.StrOpt('overcloud_key_file', default='/home/tempest/.ssh/id_rsa', help='ssh private key file path for overcloud nodes access.'), - cfg.StrOpt('neutron_config', - default='/etc/neutron/neutron.conf', - help='Path to neutron configuration file.'), cfg.StrOpt('ml2_plugin_config', default='/etc/neutron/plugins/ml2/ml2_conf.ini', help='Path to ml2 plugin config.'), diff --git a/whitebox_neutron_tempest_plugin/tests/scenario/base.py b/whitebox_neutron_tempest_plugin/tests/scenario/base.py index 3ccecfb..bb78376 100644 --- a/whitebox_neutron_tempest_plugin/tests/scenario/base.py +++ b/whitebox_neutron_tempest_plugin/tests/scenario/base.py @@ -68,6 +68,7 @@ class BaseTempestWhiteboxTestCase(base.BaseTempestTestCase): agent for agent in agents if 'sriov' in agent['binary']] cls.has_sriov_support = True if sriov_agents else False cls.ext_bridge = json.loads(WB_CONF.ext_bridge) + cls.neutron_conf = local_constants.NEUTRON_CONF[WB_CONF.openstack_type] # deployer tool dependent variables if WB_CONF.openstack_type == 'devstack': cls.master_node_client = cls.get_node_client('localhost') @@ -323,7 +324,7 @@ class BaseTempestWhiteboxTestCase(base.BaseTempestTestCase): return cls.proxy_host_client.exec_command( '{} rsh {} find {} -type f'.format( cls.OC, pod, os.path.split( - WB_CONF.neutron_config)[0])).strip().split('\n') + cls.neutron_conf)[0])).strip().split('\n') # TODO(mblue): next gen computes configuration set should be done too, # 'oc patch' for data plane would need more steps and triggers deployment diff --git a/whitebox_neutron_tempest_plugin/tests/scenario/test_dvr_ovn.py b/whitebox_neutron_tempest_plugin/tests/scenario/test_dvr_ovn.py index 3959343..ddc47ae 100644 --- a/whitebox_neutron_tempest_plugin/tests/scenario/test_dvr_ovn.py +++ b/whitebox_neutron_tempest_plugin/tests/scenario/test_dvr_ovn.py @@ -56,11 +56,11 @@ class OvnDvrBase(base.TrafficFlowTest, base.BaseTempestTestCaseOvn): continue cls.check_service_setting( host=node, service='', - config_files=[WB_CONF.neutron_config], + config_files=[cls.neutron_conf], param='enable_dvr') cls.check_service_setting( host=node, service='', - config_files=[WB_CONF.neutron_config], + config_files=[cls.neutron_conf], param='router_distributed') cls.check_service_setting( host=node, service='', diff --git a/whitebox_neutron_tempest_plugin/tests/scenario/test_metadata_rate_limiting.py b/whitebox_neutron_tempest_plugin/tests/scenario/test_metadata_rate_limiting.py index 0c0cc36..b99c7ae 100644 --- a/whitebox_neutron_tempest_plugin/tests/scenario/test_metadata_rate_limiting.py +++ b/whitebox_neutron_tempest_plugin/tests/scenario/test_metadata_rate_limiting.py @@ -49,7 +49,7 @@ class TestMetadataRateLimiting(wb_base.BaseTempestWhiteboxTestCase): cls.metadata_conf_file = ( '/etc/neutron/neutron_ovn_metadata_agent.ini') else: - cls.metadata_conf_file = WB_CONF.neutron_config + cls.metadata_conf_file = cls.neutron_conf # OSP resources cls.rand_name = data_utils.rand_name( cls.__name__.rsplit('.', 1)[-1]) diff --git a/whitebox_neutron_tempest_plugin/tests/scenario/test_neutron_availability_zones_ml2ovs.py b/whitebox_neutron_tempest_plugin/tests/scenario/test_neutron_availability_zones_ml2ovs.py index 4afa958..acc80e2 100644 --- a/whitebox_neutron_tempest_plugin/tests/scenario/test_neutron_availability_zones_ml2ovs.py +++ b/whitebox_neutron_tempest_plugin/tests/scenario/test_neutron_availability_zones_ml2ovs.py @@ -65,7 +65,7 @@ class OvsAvaliabilityzonesTest(base.BaseTempestWhiteboxTestCase): else: cls.dhcp_agent_list[agent.get('host')] = az cmd = '{} crudini --get {} DEFAULT {{}} || echo'.format( - cls.neutron_api_prefix, WB_CONF.neutron_config) + cls.neutron_api_prefix, cls.neutron_conf) def integer(int_var): try: diff --git a/whitebox_neutron_tempest_plugin/tests/scenario/test_qos.py b/whitebox_neutron_tempest_plugin/tests/scenario/test_qos.py index 7dfc7c7..f83c937 100644 --- a/whitebox_neutron_tempest_plugin/tests/scenario/test_qos.py +++ b/whitebox_neutron_tempest_plugin/tests/scenario/test_qos.py @@ -101,7 +101,7 @@ class QosBaseTest(test_qos.QoSTestMixin, base.TrafficFlowTest): continue cls.check_service_setting( host=node, service='', - config_files=[WB_CONF.neutron_config], + config_files=[cls.neutron_conf], param='service_plugins', value='qos') cls.check_service_setting( host=node, service='', diff --git a/whitebox_neutron_tempest_plugin/tests/scenario/test_router_availability_zones_ovn.py b/whitebox_neutron_tempest_plugin/tests/scenario/test_router_availability_zones_ovn.py index fdeb788..3084ce1 100644 --- a/whitebox_neutron_tempest_plugin/tests/scenario/test_router_availability_zones_ovn.py +++ b/whitebox_neutron_tempest_plugin/tests/scenario/test_router_availability_zones_ovn.py @@ -63,7 +63,7 @@ class OvnAvaliabilityzonesTest( cls.ovn_controller_gw_agent_list[ agent.get('host').replace('"', '').split('.')[0]] = az cmd = '{} crudini --get {} DEFAULT {{}} || echo'.format( - cls.neutron_api_prefix, WB_CONF.neutron_config) + cls.neutron_api_prefix, cls.neutron_conf) def array(list_var): return_list = list_var.strip().split(',') diff --git a/whitebox_neutron_tempest_plugin/tests/scenario/test_router_flavors.py b/whitebox_neutron_tempest_plugin/tests/scenario/test_router_flavors.py index c07c714..d196c36 100644 --- a/whitebox_neutron_tempest_plugin/tests/scenario/test_router_flavors.py +++ b/whitebox_neutron_tempest_plugin/tests/scenario/test_router_flavors.py @@ -187,7 +187,7 @@ class RouterFlavorsTestOvn(wb_base.BaseTempestTestCaseOvn): cls.check_service_setting( host=node, service='neutron', - config_files=(WB_CONF.neutron_config,), + config_files=(cls.neutron_conf,), param='service_plugins', value='ovn-router-flavors', msg='OVN router flavors feature not enabled, skipping tests') diff --git a/whitebox_neutron_tempest_plugin/tests/scenario/test_security_group_logging.py b/whitebox_neutron_tempest_plugin/tests/scenario/test_security_group_logging.py index e37d1ea..b2aa5f3 100644 --- a/whitebox_neutron_tempest_plugin/tests/scenario/test_security_group_logging.py +++ b/whitebox_neutron_tempest_plugin/tests/scenario/test_security_group_logging.py @@ -83,7 +83,7 @@ class BaseSecGroupLoggingTest( cls.check_service_setting( host=node, service='neutron', - config_files=(WB_CONF.neutron_config,), + config_files=(cls.neutron_conf,), param='service_plugins', value='log', msg='Security group logging not supported, skipping tests.')