salt.runners.cloud

The Salt Cloud Runner

This runner wraps the functionality of salt cloud making salt cloud routines available to all internal apis via the runner system

salt.runners.cloud.action(func=None, cloudmap=None, instances=None, provider=None, instance=None, opts=None, **kwargs)

Execute a single action on the given map/provider/instance

CLI Example:

salt-run cloud.action start my-salt-vm
salt.runners.cloud.create(provider, instances, opts=None, **kwargs)

Create an instance using Salt Cloud

CLI Example:

salt-run cloud.create my-ec2-config myinstance \
    image=ami-1624987f size='t1.micro' ssh_username=ec2-user \
    securitygroup=default delvol_on_destroy=True
salt.runners.cloud.destroy(instances, opts=None)

Destroy the named vm(s)

salt.runners.cloud.full_query(query_type='list_nodes_full')

List all available cloud provider data

salt.runners.cloud.list_images(provider='all')

List cloud provider images for the given providers

salt.runners.cloud.list_locations(provider='all')

List cloud provider sizes for the given providers

salt.runners.cloud.list_sizes(provider='all')

List cloud provider sizes for the given providers

salt.runners.cloud.map_run(path=None, opts=None, **kwargs)

Execute a salt cloud map file

salt.runners.cloud.profile(prof=None, instances=None, opts=None, **kwargs)

Create a cloud vm with the given profile and instances, instances can be a list or comma-delimited string

CLI Example:

salt-run cloud.profile prof=my-ec2 instances=node1,node2,node3
salt.runners.cloud.query(query_type='list_nodes')

List cloud provider data for all providers

salt.runners.cloud.select_query(query_type='list_nodes_select')

List selected nodes