mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
A simpler version of list_nodes_select
Reuse helper Related to saltstack/salt#27089 Saltcloud virtualbox provider
This commit is contained in:
parent
13d49278f0
commit
4bcd687d1d
@ -254,22 +254,15 @@ def list_nodes(kwargs=None, call=None):
|
||||
"private_ips",
|
||||
"public_ips",
|
||||
]
|
||||
machines_full_info = list_nodes_full()
|
||||
return dict([
|
||||
(key, dict([
|
||||
(attribute, value[attribute])
|
||||
for attribute in attributes
|
||||
])
|
||||
)
|
||||
for key, value in machines_full_info.iteritems()
|
||||
])
|
||||
return cloud.list_nodes_select(
|
||||
list_nodes_full('function'), attributes, call,
|
||||
)
|
||||
|
||||
|
||||
def list_nodes_select(call=None):
|
||||
"""
|
||||
Return a list of the VMs that are on the provider, with select fields
|
||||
"""
|
||||
log.info(__opts__)
|
||||
return cloud.list_nodes_select(
|
||||
list_nodes_full('function'), __opts__['query.selection'], call,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user