mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Fixes #19597
This commit is contained in:
parent
2c57d8ba6a
commit
b4213edbec
@ -410,8 +410,16 @@ def show_instance(name, call=None):
|
|||||||
)
|
)
|
||||||
|
|
||||||
nodes = list_nodes_full()
|
nodes = list_nodes_full()
|
||||||
salt.utils.cloud.cache_node(nodes[name], __active_provider_name__, __opts__)
|
# Find under which cloud service the name is listed, if any
|
||||||
return nodes[name]
|
service_name = None
|
||||||
|
for service in nodes:
|
||||||
|
if name in nodes[service]["role_instance_list"]:
|
||||||
|
service_name = service
|
||||||
|
break
|
||||||
|
if service_name is None:
|
||||||
|
return {}
|
||||||
|
salt.utils.cloud.cache_node(nodes[service_name], __active_provider_name__, __opts__)
|
||||||
|
return nodes[service_name]
|
||||||
|
|
||||||
|
|
||||||
def show_service(kwargs=None, conn=None, call=None):
|
def show_service(kwargs=None, conn=None, call=None):
|
||||||
@ -601,7 +609,7 @@ def create(vm_):
|
|||||||
'''
|
'''
|
||||||
try:
|
try:
|
||||||
conn.get_role(service_name, service_name, vm_["name"])
|
conn.get_role(service_name, service_name, vm_["name"])
|
||||||
data = show_instance(service_name, call='action')
|
data = show_instance(vm_["name"], call='action')
|
||||||
if 'url' in data and data['url'] != str(''):
|
if 'url' in data and data['url'] != str(''):
|
||||||
return data['url']
|
return data['url']
|
||||||
except WindowsAzureMissingResourceError:
|
except WindowsAzureMissingResourceError:
|
||||||
|
Loading…
Reference in New Issue
Block a user