mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #8534 from techhat/cloudapi
Adding show_instance to all current libcloud providers
This commit is contained in:
commit
b456fb95f3
@ -52,6 +52,7 @@ destroy = namespaced_function(destroy, globals())
|
||||
list_nodes = namespaced_function(list_nodes, globals())
|
||||
list_nodes_full = namespaced_function(list_nodes_full, globals())
|
||||
list_nodes_select = namespaced_function(list_nodes_select, globals())
|
||||
show_instance = namespaced_function(show_instance, globals())
|
||||
|
||||
|
||||
# Only load in this module if the CLOUDSTACK configurations are in place
|
||||
|
@ -64,6 +64,7 @@ destroy = namespaced_function(destroy, globals())
|
||||
list_nodes = namespaced_function(list_nodes, globals())
|
||||
list_nodes_full = namespaced_function(list_nodes_full, globals())
|
||||
list_nodes_select = namespaced_function(list_nodes_select, globals())
|
||||
show_instance = namespaced_function(show_instance, globals())
|
||||
|
||||
|
||||
# Only load in this module is the GOGRID configurations are in place
|
||||
|
@ -82,6 +82,7 @@ destroy = namespaced_function(destroy, globals())
|
||||
list_nodes = namespaced_function(list_nodes, globals())
|
||||
list_nodes_full = namespaced_function(list_nodes_full, globals())
|
||||
list_nodes_select = namespaced_function(list_nodes_select, globals())
|
||||
show_instance = namespaced_function(show_instance, globals())
|
||||
|
||||
|
||||
# Only load in this module is the IBMSCE configurations are in place
|
||||
|
@ -143,6 +143,7 @@ def __virtual__():
|
||||
libcloudfuncs_destroy = namespaced_function(
|
||||
libcloudfuncs_destroy, globals(), (conn,)
|
||||
)
|
||||
show_instance = namespaced_function(show_instance, globals())
|
||||
|
||||
log.debug('Loading Libcloud AWS cloud module')
|
||||
return __virtualname__
|
||||
|
@ -56,6 +56,7 @@ destroy = namespaced_function(destroy, globals())
|
||||
list_nodes = namespaced_function(list_nodes, globals())
|
||||
list_nodes_full = namespaced_function(list_nodes_full, globals())
|
||||
list_nodes_select = namespaced_function(list_nodes_select, globals())
|
||||
show_instance = namespaced_function(show_instance, globals())
|
||||
|
||||
|
||||
# Only load in this module if the LINODE configurations are in place
|
||||
|
@ -181,6 +181,7 @@ reboot = namespaced_function(reboot, globals())
|
||||
list_nodes = namespaced_function(list_nodes, globals())
|
||||
list_nodes_full = namespaced_function(list_nodes_full, globals())
|
||||
list_nodes_select = namespaced_function(list_nodes_select, globals())
|
||||
show_instance = namespaced_function(show_instance, globals())
|
||||
|
||||
|
||||
# Only load in this module is the OPENSTACK configurations are in place
|
||||
|
@ -80,6 +80,7 @@ destroy = namespaced_function(destroy, globals())
|
||||
list_nodes = namespaced_function(list_nodes, globals())
|
||||
list_nodes_full = namespaced_function(list_nodes_full, globals())
|
||||
list_nodes_select = namespaced_function(list_nodes_select, globals())
|
||||
show_instance = namespaced_function(show_instance, globals())
|
||||
|
||||
|
||||
# Only load in this module is the RACKSPACE configurations are in place
|
||||
|
@ -413,6 +413,19 @@ def list_nodes_select(conn=None):
|
||||
return ret
|
||||
|
||||
|
||||
def show_instance(name, call=None):
|
||||
'''
|
||||
Show the details from the provider concerning an instance
|
||||
'''
|
||||
if call != 'action':
|
||||
raise SaltCloudSystemExit(
|
||||
'The show_instance action must be called with -a or --action.'
|
||||
)
|
||||
|
||||
nodes = list_nodes_full()
|
||||
return nodes[name]
|
||||
|
||||
|
||||
def conn_has_method(conn, method_name):
|
||||
'''
|
||||
Find if the provided connection object has a specific method
|
||||
|
Loading…
Reference in New Issue
Block a user