Break loop if find nova_url

Change-Id: I83c87a0e7de1fb80f904e24f5e7c18b84bcab3c9
Closes-Bug: 1556738
This commit is contained in:
Sahdev Zala 2016-03-13 21:05:23 -07:00
parent 24974d0f45
commit 3c7baa44fd

View File

@ -159,6 +159,7 @@ class ToscaCompute(HotResource):
for service in service_catalog:
if service['type'] == 'compute':
nova_url = service['endpoints'][0]['publicURL']
break
if not nova_url:
return None
nova_response = requests.get(nova_url + '/flavors/detail',