Merge pull request #8534 from techhat/cloudapi

Adding show_instance to all current libcloud providers
This commit is contained in:
Joseph Hall 2013-11-14 13:45:55 -08:00
commit b456fb95f3
8 changed files with 20 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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__

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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