Use neutron conf path as a constant
Path to neutron config usually is the same for a certain type of environment. This patch makes the path to be a constant value selected automatically according to environment type and thus it's no longer required from user to specify/override it. Change-Id: If85f38d40f29a2dfd1a72eacd97e9dd5fcbdc004
This commit is contained in:
parent
7e9f7ae2e2
commit
d95aa56920
@ -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
|
||||
|
@ -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.'),
|
||||
|
@ -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
|
||||
|
@ -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='',
|
||||
|
@ -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])
|
||||
|
@ -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:
|
||||
|
@ -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='',
|
||||
|
@ -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(',')
|
||||
|
@ -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')
|
||||
|
@ -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.')
|
||||
|
Loading…
x
Reference in New Issue
Block a user