Set compute API version to 2.1, don't use v3
Microversions since Nova API v2.1 are aimed to replace the v3 work. The /v2.1 is backwards compatible with the legacy /v2 endpoint. What we called in the past /v3 is now something defunct in-tree. The /v2.1 API is based on the v3 work, but there are many things that differ, in particular with the backwards-compat thing. We keep the /v2 path in api-paste.ini for making sure an upgrade doesn't trample operators and users but if you look in tree, that's redirecting to the v2.1 codepath (just not asking for microversions). In summary, we only need one endpoint, ie. /v2.1. Additional information at https://bugzilla.redhat.com/show_bug.cgi?id=1291291 Closes-Bug: #1564372 Change-Id: I6d64b8bcd0f79f1f298ddc809e6d92fbc2985c45
This commit is contained in:
parent
fd26d9d7e1
commit
da41a1048c
|
@ -59,18 +59,10 @@ SERVICES = {
|
|||
'nova': {
|
||||
'description': 'Nova Compute Service',
|
||||
'type': 'compute',
|
||||
'path': '/v2/$(tenant_id)s',
|
||||
'path': '/v2.1/$(tenant_id)s',
|
||||
'port': 8774,
|
||||
'ssl_port': 13774,
|
||||
},
|
||||
'novav3': {
|
||||
'description': 'Nova Compute Service v3',
|
||||
'type': 'computev3',
|
||||
'path': '/v3',
|
||||
'port': 8774,
|
||||
'name': 'nova',
|
||||
'ssl_port': 13774,
|
||||
},
|
||||
'ceilometer': {
|
||||
'description': 'Ceilometer Service',
|
||||
'type': 'metering',
|
||||
|
|
|
@ -347,7 +347,7 @@ class KeystoneTest(base.TestCase):
|
|||
self.client.roles.find.assert_called_once_with(name='admin')
|
||||
self.client.services.findall.assert_called_once_with(type='compute')
|
||||
self.client.endpoints.findall.assert_called_once_with(
|
||||
publicurl='https://192.0.0.4:1234/v2/$(tenant_id)s')
|
||||
publicurl='https://192.0.0.4:1234/v2.1/$(tenant_id)s')
|
||||
|
||||
self.client.users.create.assert_called_once_with(
|
||||
'nova', 'pass',
|
||||
|
@ -364,9 +364,9 @@ class KeystoneTest(base.TestCase):
|
|||
self.client.endpoints.create.assert_called_once_with(
|
||||
'region',
|
||||
self.client.services.create.return_value.id,
|
||||
'https://192.0.0.4:1234/v2/$(tenant_id)s',
|
||||
'http://192.0.0.3:8774/v2/$(tenant_id)s',
|
||||
'http://192.0.0.3:8774/v2/$(tenant_id)s')
|
||||
'https://192.0.0.4:1234/v2.1/$(tenant_id)s',
|
||||
'http://192.0.0.3:8774/v2.1/$(tenant_id)s',
|
||||
'http://192.0.0.3:8774/v2.1/$(tenant_id)s')
|
||||
|
||||
def test_setup_endpoints_ipv6(self):
|
||||
self.client = mock.MagicMock()
|
||||
|
@ -387,7 +387,7 @@ class KeystoneTest(base.TestCase):
|
|||
self.client.services.findall.assert_called_once_with(type='compute')
|
||||
self.client.endpoints.findall.assert_called_once_with(
|
||||
publicurl='https://[2001:db8:fd00:1000:f816:3eff:fec2:8e7c]'
|
||||
':1234/v2/$(tenant_id)s')
|
||||
':1234/v2.1/$(tenant_id)s')
|
||||
|
||||
self.client.users.create.assert_called_once_with(
|
||||
'nova', 'pass',
|
||||
|
@ -405,9 +405,9 @@ class KeystoneTest(base.TestCase):
|
|||
self.client.endpoints.create.assert_called_once_with(
|
||||
'region',
|
||||
self.client.services.create.return_value.id,
|
||||
'https://[%s]:1234/v2/$(tenant_id)s' % ipv6_addr,
|
||||
'http://[%s]:8774/v2/$(tenant_id)s' % ipv6_addr,
|
||||
'http://[%s]:8774/v2/$(tenant_id)s' % ipv6_addr)
|
||||
'https://[%s]:1234/v2.1/$(tenant_id)s' % ipv6_addr,
|
||||
'http://[%s]:8774/v2.1/$(tenant_id)s' % ipv6_addr,
|
||||
'http://[%s]:8774/v2.1/$(tenant_id)s' % ipv6_addr)
|
||||
|
||||
@mock.patch('os_cloud_config.keystone._create_service')
|
||||
def test_create_ssl_endpoint_no_ssl_port(self, mock_create_service):
|
||||
|
|
Loading…
Reference in New Issue