Change nova_catalog_admin_info to default to publicURL
A recent change in devstack [1] reduced the number of endpoints configured by default. This breaks masakari resulting into: "EndpointNotFound: adminURL endpoint for compute service not found" This patch changes the default for the nova_catalog_admin_info to be the normal 'publicURL'. With 'publicURL' masakari-engine is able to call nova's admin restricted apis. [1] Ided7a65c81b3a0b56f0184847fc82e17c29a771e Closes-Bug: #1669280 Change-Id: I90bc214249f8a542f2d40fca544af204e0665821
This commit is contained in:
parent
cc44a33f3d
commit
3f67b04e21
|
@ -18,7 +18,7 @@ from oslo_config import cfg
|
|||
|
||||
nova_opts = [
|
||||
cfg.StrOpt('nova_catalog_admin_info',
|
||||
default='compute:Compute Service:adminURL',
|
||||
default='compute:Compute Service:publicURL',
|
||||
help='Match this value when searching for nova in the '
|
||||
'service catalog. Format is: separated values of '
|
||||
'the form: '
|
||||
|
|
|
@ -33,9 +33,9 @@ class NovaClientTestCase(test.TestCase):
|
|||
auth_token='token', is_admin=True)
|
||||
self.ctx.service_catalog = [
|
||||
{'type': 'compute', 'name': 'nova', 'endpoints':
|
||||
[{'adminURL': 'http://novahost:8774/v2/e3f0833dc08b4cea'}]},
|
||||
[{'publicURL': 'http://novahost:8774/v2/e3f0833dc08b4cea'}]},
|
||||
{'type': 'identity', 'name': 'keystone', 'endpoints':
|
||||
[{'adminURL': 'http://keystonehost:5000/v2.0'}]}]
|
||||
[{'publicURL': 'http://keystonehost:5000/v2.0'}]}]
|
||||
|
||||
self.override_config('os_privileged_user_name', 'adminuser')
|
||||
self.override_config('os_privileged_user_password', 'strongpassword')
|
||||
|
@ -56,7 +56,7 @@ class NovaClientTestCase(test.TestCase):
|
|||
p_client.assert_called_once_with(
|
||||
p_api_version(nova.NOVA_API_VERSION),
|
||||
session=p_session.return_value, region_name=None,
|
||||
insecure=False, endpoint_type='adminURL', cacert=None,
|
||||
insecure=False, endpoint_type='publicURL', cacert=None,
|
||||
timeout=None, extensions=nova.nova_extensions)
|
||||
|
||||
@mock.patch('novaclient.api_versions.APIVersion')
|
||||
|
@ -73,7 +73,7 @@ class NovaClientTestCase(test.TestCase):
|
|||
p_client.assert_called_once_with(
|
||||
p_api_version(nova.NOVA_API_VERSION),
|
||||
session=p_session.return_value, region_name=None,
|
||||
insecure=False, endpoint_type='adminURL', cacert=None,
|
||||
insecure=False, endpoint_type='publicURL', cacert=None,
|
||||
timeout=None, extensions=nova.nova_extensions)
|
||||
|
||||
@mock.patch('novaclient.api_versions.APIVersion')
|
||||
|
@ -92,7 +92,7 @@ class NovaClientTestCase(test.TestCase):
|
|||
p_client.assert_called_once_with(
|
||||
p_api_version(nova.NOVA_API_VERSION),
|
||||
session=p_session.return_value, region_name=None,
|
||||
insecure=False, endpoint_type='adminURL', cacert=None,
|
||||
insecure=False, endpoint_type='publicURL', cacert=None,
|
||||
timeout=None, extensions=nova.nova_extensions)
|
||||
|
||||
@mock.patch('novaclient.api_versions.APIVersion')
|
||||
|
@ -110,7 +110,7 @@ class NovaClientTestCase(test.TestCase):
|
|||
p_client.assert_called_once_with(
|
||||
p_api_version(nova.NOVA_API_VERSION),
|
||||
session=p_session.return_value, region_name='farfaraway',
|
||||
insecure=False, endpoint_type='adminURL', cacert=None,
|
||||
insecure=False, endpoint_type='publicURL', cacert=None,
|
||||
timeout=None, extensions=nova.nova_extensions)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue