summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2017-11-14 07:28:50 +0000
committerGerrit Code Review <review@openstack.org>2017-11-14 07:28:50 +0000
commitbcb7a6b5fefc84aa0c41d5043f372a30c9c929c6 (patch)
treeb87947ac28da20cab2d4adedcb4af72e19bf59e3
parent57bbe7deada89ad35da885451315f216d2f53919 (diff)
parent99dd18d053dd0b06b959eae63b25f423ad9df19b (diff)
Merge "Use service_type and service_name of nova_catalog_admin_info"
-rw-r--r--masakari/compute/nova.py2
-rw-r--r--masakari/tests/unit/compute/test_nova.py20
2 files changed, 14 insertions, 8 deletions
diff --git a/masakari/compute/nova.py b/masakari/compute/nova.py
index b9836eb..ee18ef0 100644
--- a/masakari/compute/nova.py
+++ b/masakari/compute/nova.py
@@ -124,6 +124,8 @@ def novaclient(context, timeout=None):
124 global_request_id=context.global_id, 124 global_request_id=context.global_id,
125 region_name=CONF.os_region_name, 125 region_name=CONF.os_region_name,
126 endpoint_type=endpoint_type, 126 endpoint_type=endpoint_type,
127 service_type=service_type,
128 service_name=service_name,
127 cacert=CONF.nova_ca_certificates_file, 129 cacert=CONF.nova_ca_certificates_file,
128 extensions=nova_extensions) 130 extensions=nova_extensions)
129 131
diff --git a/masakari/tests/unit/compute/test_nova.py b/masakari/tests/unit/compute/test_nova.py
index 04fca4b..3533c80 100644
--- a/masakari/tests/unit/compute/test_nova.py
+++ b/masakari/tests/unit/compute/test_nova.py
@@ -57,8 +57,9 @@ class NovaClientTestCase(test.TestCase):
57 p_client.assert_called_once_with( 57 p_client.assert_called_once_with(
58 p_api_version(nova.NOVA_API_VERSION), 58 p_api_version(nova.NOVA_API_VERSION),
59 session=p_session.return_value, region_name=None, 59 session=p_session.return_value, region_name=None,
60 insecure=False, endpoint_type='publicURL', cacert=None, 60 insecure=False, endpoint_type='publicURL',
61 timeout=None, global_request_id=self.ctx.global_id, 61 service_type='compute', service_name='Compute Service',
62 cacert=None, timeout=None, global_request_id=self.ctx.global_id,
62 extensions=nova.nova_extensions) 63 extensions=nova.nova_extensions)
63 64
64 @mock.patch('novaclient.api_versions.APIVersion') 65 @mock.patch('novaclient.api_versions.APIVersion')
@@ -76,8 +77,9 @@ class NovaClientTestCase(test.TestCase):
76 p_client.assert_called_once_with( 77 p_client.assert_called_once_with(
77 p_api_version(nova.NOVA_API_VERSION), 78 p_api_version(nova.NOVA_API_VERSION),
78 session=p_session.return_value, region_name=None, 79 session=p_session.return_value, region_name=None,
79 insecure=False, endpoint_type='publicURL', cacert=None, 80 insecure=False, endpoint_type='publicURL',
80 timeout=None, global_request_id=self.ctx.global_id, 81 service_type='compute', service_name='Compute Service',
82 cacert=None, timeout=None, global_request_id=self.ctx.global_id,
81 extensions=nova.nova_extensions) 83 extensions=nova.nova_extensions)
82 84
83 @mock.patch('novaclient.api_versions.APIVersion') 85 @mock.patch('novaclient.api_versions.APIVersion')
@@ -97,8 +99,9 @@ class NovaClientTestCase(test.TestCase):
97 p_client.assert_called_once_with( 99 p_client.assert_called_once_with(
98 p_api_version(nova.NOVA_API_VERSION), 100 p_api_version(nova.NOVA_API_VERSION),
99 session=p_session.return_value, region_name=None, 101 session=p_session.return_value, region_name=None,
100 insecure=False, endpoint_type='publicURL', cacert=None, 102 insecure=False, endpoint_type='publicURL',
101 timeout=None, global_request_id=self.ctx.global_id, 103 service_type='compute', service_name='Compute Service',
104 cacert=None, timeout=None, global_request_id=self.ctx.global_id,
102 extensions=nova.nova_extensions) 105 extensions=nova.nova_extensions)
103 106
104 @mock.patch('novaclient.api_versions.APIVersion') 107 @mock.patch('novaclient.api_versions.APIVersion')
@@ -117,8 +120,9 @@ class NovaClientTestCase(test.TestCase):
117 p_client.assert_called_once_with( 120 p_client.assert_called_once_with(
118 p_api_version(nova.NOVA_API_VERSION), 121 p_api_version(nova.NOVA_API_VERSION),
119 session=p_session.return_value, region_name='farfaraway', 122 session=p_session.return_value, region_name='farfaraway',
120 insecure=False, endpoint_type='publicURL', cacert=None, 123 insecure=False, endpoint_type='publicURL',
121 timeout=None, global_request_id=self.ctx.global_id, 124 service_type='compute', service_name='Compute Service',
125 cacert=None, timeout=None, global_request_id=self.ctx.global_id,
122 extensions=nova.nova_extensions) 126 extensions=nova.nova_extensions)
123 127
124 128