Merge "Method to return the Neutron API service name"

This commit is contained in:
Zuul 2024-09-10 09:56:12 +00:00 committed by Gerrit Code Review
commit a547366a47

View File

@ -28,6 +28,7 @@ from whitebox_neutron_tempest_plugin.common import constants
CONF = config.CONF
LOG = log.getLogger(__name__)
WB_CONF = CONF.whitebox_neutron_plugin_options
def create_payload_file(ssh_client, size):
@ -290,3 +291,13 @@ def wait_for_neutron_api(neutron_client, timeout=100):
return False
common_utils.wait_until_true(_list_agents, timeout=timeout, sleep=1)
def get_neutron_api_service_name():
"""Return the Neutron API service name based on the test configuration"""
if WB_CONF.openstack_type == 'devstack':
# NOTE: in OSP18+, the Neutron API will use WSGI by default (not the
# eventlet server) and the name will be "neutron api"
return 'q svc'
else:
return 'neutron api'