Use service_type and service_name of nova_catalog_admin_info

Masakari has never used service_type and service_name of
nova_catalog_admin_info. However, these can be specified
when masakari creates a novalient object.
This patch modified so that masakari uses these.

Change-Id: I7fdd3b47230bea004a9129234c88d20d611814bf
Closes-Bug: #1724764
This commit is contained in:
Kengo Takahara 2017-10-19 16:41:33 +09:00
parent 7ef4e96949
commit 99dd18d053
2 changed files with 14 additions and 8 deletions

View File

@ -124,6 +124,8 @@ def novaclient(context, timeout=None):
global_request_id=context.global_id, global_request_id=context.global_id,
region_name=CONF.os_region_name, region_name=CONF.os_region_name,
endpoint_type=endpoint_type, endpoint_type=endpoint_type,
service_type=service_type,
service_name=service_name,
cacert=CONF.nova_ca_certificates_file, cacert=CONF.nova_ca_certificates_file,
extensions=nova_extensions) extensions=nova_extensions)

View File

@ -57,8 +57,9 @@ class NovaClientTestCase(test.TestCase):
p_client.assert_called_once_with( p_client.assert_called_once_with(
p_api_version(nova.NOVA_API_VERSION), p_api_version(nova.NOVA_API_VERSION),
session=p_session.return_value, region_name=None, session=p_session.return_value, region_name=None,
insecure=False, endpoint_type='publicURL', cacert=None, insecure=False, endpoint_type='publicURL',
timeout=None, global_request_id=self.ctx.global_id, service_type='compute', service_name='Compute Service',
cacert=None, timeout=None, global_request_id=self.ctx.global_id,
extensions=nova.nova_extensions) extensions=nova.nova_extensions)
@mock.patch('novaclient.api_versions.APIVersion') @mock.patch('novaclient.api_versions.APIVersion')
@ -76,8 +77,9 @@ class NovaClientTestCase(test.TestCase):
p_client.assert_called_once_with( p_client.assert_called_once_with(
p_api_version(nova.NOVA_API_VERSION), p_api_version(nova.NOVA_API_VERSION),
session=p_session.return_value, region_name=None, session=p_session.return_value, region_name=None,
insecure=False, endpoint_type='publicURL', cacert=None, insecure=False, endpoint_type='publicURL',
timeout=None, global_request_id=self.ctx.global_id, service_type='compute', service_name='Compute Service',
cacert=None, timeout=None, global_request_id=self.ctx.global_id,
extensions=nova.nova_extensions) extensions=nova.nova_extensions)
@mock.patch('novaclient.api_versions.APIVersion') @mock.patch('novaclient.api_versions.APIVersion')
@ -97,8 +99,9 @@ class NovaClientTestCase(test.TestCase):
p_client.assert_called_once_with( p_client.assert_called_once_with(
p_api_version(nova.NOVA_API_VERSION), p_api_version(nova.NOVA_API_VERSION),
session=p_session.return_value, region_name=None, session=p_session.return_value, region_name=None,
insecure=False, endpoint_type='publicURL', cacert=None, insecure=False, endpoint_type='publicURL',
timeout=None, global_request_id=self.ctx.global_id, service_type='compute', service_name='Compute Service',
cacert=None, timeout=None, global_request_id=self.ctx.global_id,
extensions=nova.nova_extensions) extensions=nova.nova_extensions)
@mock.patch('novaclient.api_versions.APIVersion') @mock.patch('novaclient.api_versions.APIVersion')
@ -117,8 +120,9 @@ class NovaClientTestCase(test.TestCase):
p_client.assert_called_once_with( p_client.assert_called_once_with(
p_api_version(nova.NOVA_API_VERSION), p_api_version(nova.NOVA_API_VERSION),
session=p_session.return_value, region_name='farfaraway', session=p_session.return_value, region_name='farfaraway',
insecure=False, endpoint_type='publicURL', cacert=None, insecure=False, endpoint_type='publicURL',
timeout=None, global_request_id=self.ctx.global_id, service_type='compute', service_name='Compute Service',
cacert=None, timeout=None, global_request_id=self.ctx.global_id,
extensions=nova.nova_extensions) extensions=nova.nova_extensions)