Merge "Fix versions.list for v2.1 Nova API"
This commit is contained in:
commit
72190ba9a2
@ -404,7 +404,7 @@ class HTTPClient(object):
|
||||
# a nova endpoint directly without "v2/<tenant-id>".
|
||||
magic_tuple = parse.urlsplit(self.management_url)
|
||||
scheme, netloc, path, query, frag = magic_tuple
|
||||
path = re.sub(r'v[1-9]/[a-z0-9]+$', '', path)
|
||||
path = re.sub(r'v[1-9](\.[1-9][0-9]*)?/[a-z0-9]+$', '', path)
|
||||
url = parse.urlunsplit((scheme, netloc, path, None, None))
|
||||
else:
|
||||
if self.service_catalog and not self.bypass_url:
|
||||
|
@ -137,10 +137,16 @@ class ClientTest(utils.TestCase):
|
||||
|
||||
def test_client_version_url(self):
|
||||
self._check_version_url('http://foo.com/v2/%s', 'http://foo.com/')
|
||||
self._check_version_url('http://foo.com/v2.1/%s', 'http://foo.com/')
|
||||
self._check_version_url('http://foo.com/v3.785/%s', 'http://foo.com/')
|
||||
|
||||
def test_client_version_url_with_project_name(self):
|
||||
self._check_version_url('http://foo.com/nova/v2/%s',
|
||||
'http://foo.com/nova/')
|
||||
self._check_version_url('http://foo.com/nova/v2.1/%s',
|
||||
'http://foo.com/nova/')
|
||||
self._check_version_url('http://foo.com/nova/v3.785/%s',
|
||||
'http://foo.com/nova/')
|
||||
|
||||
def test_get_client_class_v2(self):
|
||||
output = novaclient.client.get_client_class('2')
|
||||
|
Loading…
Reference in New Issue
Block a user