diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-07-09 15:58:34 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-07-09 15:58:34 +0000 |
| commit | 35dc2bed9ea802f577fd1ce7b3eadd1e18f5772a (patch) | |
| tree | ef1e5f260857041ba38b516824a0962bc9b5c91c | |
| parent | a3f50eafa58b27c576b398ebcbb1bebddf1d56c9 (diff) | |
| parent | 7af00f833f83bf375a4270bff609f62902a6c887 (diff) | |
| download | python-openstackclient-35dc2bed9ea802f577fd1ce7b3eadd1e18f5772a.tar.gz | |
Merge "openstack catalog list always returns publicURL for internalURL and adminURL"
| -rw-r--r-- | openstackclient/identity/v2_0/catalog.py | 2 | ||||
| -rw-r--r-- | openstackclient/tests/identity/v2_0/test_catalog.py | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/openstackclient/identity/v2_0/catalog.py b/openstackclient/identity/v2_0/catalog.py index 7d17fbf5..c10001d0 100644 --- a/openstackclient/identity/v2_0/catalog.py +++ b/openstackclient/identity/v2_0/catalog.py @@ -31,7 +31,7 @@ def _format_endpoints(eps=None): region = eps[index].get('region', '<none>') ret += region + '\n' for url in ['publicURL', 'internalURL', 'adminURL']: - ret += " %s: %s\n" % (url, eps[index]['publicURL']) + ret += " %s: %s\n" % (url, eps[index][url]) return ret diff --git a/openstackclient/tests/identity/v2_0/test_catalog.py b/openstackclient/tests/identity/v2_0/test_catalog.py index 50445954..fe13d78d 100644 --- a/openstackclient/tests/identity/v2_0/test_catalog.py +++ b/openstackclient/tests/identity/v2_0/test_catalog.py @@ -27,11 +27,13 @@ class TestCatalog(utils.TestCommand): { 'region': 'one', 'publicURL': 'https://public.one.example.com', + 'internalURL': 'https://internal.one.example.com', 'adminURL': 'https://admin.one.example.com', }, { 'region': 'two', 'publicURL': 'https://public.two.example.com', + 'internalURL': 'https://internal.two.example.com', 'adminURL': 'https://admin.two.example.com', }, ], @@ -74,11 +76,11 @@ class TestCatalogList(TestCatalog): 'supernova', 'compute', 'one\n publicURL: https://public.one.example.com\n ' - 'internalURL: https://public.one.example.com\n ' - 'adminURL: https://public.one.example.com\n' + 'internalURL: https://internal.one.example.com\n ' + 'adminURL: https://admin.one.example.com\n' 'two\n publicURL: https://public.two.example.com\n ' - 'internalURL: https://public.two.example.com\n ' - 'adminURL: https://public.two.example.com\n', + 'internalURL: https://internal.two.example.com\n ' + 'adminURL: https://admin.two.example.com\n', ), ) self.assertEqual(datalist, tuple(data)) @@ -108,11 +110,11 @@ class TestCatalogShow(TestCatalog): self.assertEqual(collist, columns) datalist = ( 'one\n publicURL: https://public.one.example.com\n ' - 'internalURL: https://public.one.example.com\n ' - 'adminURL: https://public.one.example.com\n' + 'internalURL: https://internal.one.example.com\n ' + 'adminURL: https://admin.one.example.com\n' 'two\n publicURL: https://public.two.example.com\n ' - 'internalURL: https://public.two.example.com\n ' - 'adminURL: https://public.two.example.com\n', + 'internalURL: https://internal.two.example.com\n ' + 'adminURL: https://admin.two.example.com\n', 'qwertyuiop', 'supernova', 'compute', |
