Method to return the Neutron API service name

Closes-Bug: #OSPRH-9825
Change-Id: I45e941873a640ea75a2a1db0e68fc6abc767e32e
This commit is contained in:
Rodolfo Alonso Hernandez 2024-09-04 10:33:27 +00:00 committed by Rodolfo Alonso
parent 7969981891
commit 57ead07a90

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'