summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/newton_base/registration/registration.py15
-rw-r--r--windriver/titanium_cloud/resource/views/infra_workload.py6
2 files changed, 13 insertions, 8 deletions
diff --git a/share/newton_base/registration/registration.py b/share/newton_base/registration/registration.py
index d5b75cf6..afcd0761 100644
--- a/share/newton_base/registration/registration.py
+++ b/share/newton_base/registration/registration.py
@@ -40,11 +40,16 @@ class Registry(APIView):
def _get_list_resources(
self, resource_url, service_type, session, viminfo,
vimid, content_key):
- service = {'service_type': service_type,
- 'interface': 'public',
- 'region_name': viminfo['openstack_region_id']
- if viminfo.get('openstack_region_id')
- else viminfo['cloud_region_id']}
+ service = {
+ 'service_type': service_type,
+ 'interface': 'public'
+ }
+
+ # identity service should not filtered by region since it is might be first call
+ # to figure out available region list
+ if service_type != 'identity':
+ service['region_name'] = viminfo['openstack_region_id']\
+ if viminfo.get('openstack_region_id') else viminfo['cloud_region_id']
self._logger.info("making request with URI:%s" % resource_url)
resp = session.get(resource_url, endpoint_filter=service)
diff --git a/windriver/titanium_cloud/resource/views/infra_workload.py b/windriver/titanium_cloud/resource/views/infra_workload.py
index 100496f9..49f8f2b5 100644
--- a/windriver/titanium_cloud/resource/views/infra_workload.py
+++ b/windriver/titanium_cloud/resource/views/infra_workload.py
@@ -270,7 +270,7 @@ class InfraWorkload(APIView):
#find and update resources
transactions = []
for resource in resources:
- if resource.get('resource_status', None) != "CREATED_COMPLETE":
+ if resource.get('resource_status', None) != "CREATE_COMPLETE":
continue
if resource.get('resource_type', None) == 'OS::Nova::Server':
# retrieve vserver details
@@ -325,10 +325,10 @@ class InfraWorkload(APIView):
if resource.get('resource_status', None) != "CREATE_COMPLETE":
continue
if resource.get('resource_type', None) == 'OS::Neutron::Port':
- # retrieve vserver details
+ # retrieve vport details
service_type = "network"
resource_uri = "/v2.0/ports/%s" % (resource['physical_resource_id'])
- self._logger.info("retrieve vserver detail, URI:%s" % resource_uri)
+ self._logger.info("retrieve vport detail, URI:%s" % resource_uri)
retcode, content, os_status = helper.MultiCloudServiceHelper(cloud_owner, regionid, v2_token_resp_json, service_type,
resource_uri, None, "GET")
self._logger.debug(" resp data:%s" % content)