mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
streamline nova.server_show() & avoid shadowing server_list()
This commit is contained in:
parent
38a229503c
commit
ac36665d38
@ -530,11 +530,10 @@ def server_show(server_id, profile=None):
|
|||||||
salt '*' nova.server_show <server_id>
|
salt '*' nova.server_show <server_id>
|
||||||
'''
|
'''
|
||||||
ret = {}
|
ret = {}
|
||||||
server_list = server_list_detailed(profile)
|
servers = server_list_detailed(profile)
|
||||||
for item in server_list:
|
for server_name, server in servers.iteritems():
|
||||||
id_ = server_list[item]['id']
|
if str(server['id']) == server_id:
|
||||||
if str(id_) == server_id:
|
ret[server_name] = server
|
||||||
ret[server_list[item]['name']] = server_list[item]
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user