summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--newton/newton/proxy/views/identityV3.py11
-rw-r--r--newton/newton/proxy/views/proxy_utils.py4
2 files changed, 11 insertions, 4 deletions
diff --git a/newton/newton/proxy/views/identityV3.py b/newton/newton/proxy/views/identityV3.py
index bc2b06e9..7395fac8 100644
--- a/newton/newton/proxy/views/identityV3.py
+++ b/newton/newton/proxy/views/identityV3.py
@@ -156,8 +156,14 @@ class TokensV2(Tokens):
}
#convert endpoints
- v2_catalog1_endpoints = {"id": v3_catalog['id']}
+ v2_catalog1_endpoints = None
for v3_endpoint in v3_catalog['endpoints']:
+ v2_catalog1_endpoints = {
+ "id": v3_endpoint['id'],
+ "region":v3_endpoint['region'],
+ "region_id": v3_endpoint['region_id'],
+ 'interface':v3_endpoint['interface']
+ }
if v3_endpoint['interface'] == 'public':
v2_catalog1_endpoints['publicURL'] = v3_endpoint['url']
elif v3_endpoint['interface'] == 'admin':
@@ -165,7 +171,8 @@ class TokensV2(Tokens):
elif v3_endpoint['interface'] == 'internal':
v2_catalog1_endpoints['internalURL'] = v3_endpoint['url']
- v2_catalog1['endpoints'].append(v2_catalog1_endpoints)
+ if v2_catalog1_endpoints:
+ v2_catalog1['endpoints'].append(v2_catalog1_endpoints)
v2_catalog.append(v2_catalog1)
diff --git a/newton/newton/proxy/views/proxy_utils.py b/newton/newton/proxy/views/proxy_utils.py
index c80b9680..68182d4a 100644
--- a/newton/newton/proxy/views/proxy_utils.py
+++ b/newton/newton/proxy/views/proxy_utils.py
@@ -158,13 +158,13 @@ class ProxyUtils(object):
"name":"dns-delegate",
"type":"dns",
"id": str(uuid.uuid1()),
- "endpoints": {
+ "endpoints": [{
"interface": "public",
"region": cloud_dns_delegate_info.get("cloud-region-id"),
"region_id": cloud_dns_delegate_info.get("cloud-region-id"),
"id": str(uuid.uuid1()),
"url": multicould_namespace + "/%s/dns-delegate" % vimid,
- }
+ }]
}
catalog.append(dns_catalog)