neulab/tldr huggingface dataset:
salt-cloud -f cleanup_unattached_disks my-azure name=my_disk salt-cloud -f cleanup_unattached_disks my-azure name=my_disk delete_vhd=True
salt.cloud.clouds.msazure.create(vm_) Create a single VM from a data dict
salt.cloud.clouds.msazure.create_affinity_group(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Create a new affinity group
salt-cloud -f create_affinity_group my-azure name=my_affinity_group
salt.cloud.clouds.msazure.create_attach_volumes(name, kwargs, call=None, wait_to_finish=True) Create and attach volumes to created node
salt.cloud.clouds.msazure.create_service(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Create a new hosted service
salt-cloud -f create_service my-azure name=my_service label=my_service location='West US'
salt.cloud.clouds.msazure.create_storage(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Create a new storage account
salt-cloud -f create_storage my-azure name=my_storage label=my_storage location='West US'
salt.cloud.clouds.msazure.create_storage_container(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
Create a storage container
name:  Name of container to create.
meta_name_values: Optional. A dict with name_value pairs to associate with the container as metadata. Example:{'Category':'test'}
blob_public_access: Optional. Possible values include: container, blob
fail_on_exist: Specify whether to throw an exception when the container exists.
salt.cloud.clouds.msazure.delete_affinity_group(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Delete a specific affinity group associated with the account
salt.cloud.clouds.msazure.delete_disk(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Delete a specific disk associated with the account
salt-cloud -f delete_disk my-azure name=my_disk salt-cloud -f delete_disk my-azure name=my_disk delete_vhd=True
salt.cloud.clouds.msazure.delete_input_endpoint(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Delete an input endpoint from the deployment. Please note that there may be a delay before the changes show up.
salt.cloud.clouds.msazure.delete_management_certificate(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Delete a specific certificate associated with the management
salt-cloud -f delete_management_certificate my-azure name=my_management_certificate \ thumbalgorithm=sha1 thumbprint=0123456789ABCDEF
salt.cloud.clouds.msazure.delete_service(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Delete a specific service associated with the account
salt-cloud -f delete_service my-azure name=my_service
salt.cloud.clouds.msazure.delete_service_certificate(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Delete a specific certificate associated with the service
salt-cloud -f delete_service_certificate my-azure name=my_service_certificate \ thumbalgorithm=sha1 thumbprint=0123456789ABCDEF
salt.cloud.clouds.msazure.delete_storage(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Delete a specific storage account
salt-cloud -f delete_storage my-azure name=my_storage
salt.cloud.clouds.msazure.delete_storage_container(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
Delete a container associated with the storage account
fail_not_exist: Specify whether to throw an exception when the container exists.
lease_id: If specified, delete_storage_container only succeeds if the container's lease is active and matches this ID.
salt.cloud.clouds.msazure.destroy(name, conn=None, call=None, kwargs=None) Destroy a VM
salt.cloud.clouds.msazure.get_affinity_group(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Show an affinity group associated with the account
salt.cloud.clouds.msazure.get_blob(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
Download a blob
container: Name of existing container.
name:  Name of existing blob.
local_path: The path on the local machine to download the blob to. Either this or return_content must be specified.
return_content: Whether or not to return the content directly from the blob. If specified, must be True or False. Either this or the local_path must be specified.
snapshot: Optional. The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve.
lease_id: Required if the blob has an active lease.
progress_callback: callback for progress with signature function(current, total) where current is the number of bytes transferred so far, and total is the size of the blob.
max_connections: Maximum number of parallel connections to use when the blob size exceeds 64MB.  Set to 1 to download the blob chunks sequentially.  Set to 2 or more to download the blob chunks in parallel. This uses more system resources but will download faster.
max_retries: Number of times to retry download of blob chunk if an error occurs.
retry_wait: Sleep time in secs between retries.
salt.cloud.clouds.msazure.get_blob_properties(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
Returns all user-defined metadata, standard HTTP properties, and system properties for the blob.
blob:  Name of existing blob.
salt.cloud.clouds.msazure.get_blob_service_properties(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
Show a blob's service properties
salt.cloud.clouds.msazure.get_configured_provider() Return the first configured instance.
salt.cloud.clouds.msazure.get_conn() Return a conn object for the passed VM data
salt.cloud.clouds.msazure.get_dependencies() Warn if dependencies aren't met.
salt.cloud.clouds.msazure.get_deployment(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Return information about a deployment
salt-cloud -f show_deployment my-azure name=my_deployment
salt.cloud.clouds.msazure.get_disk(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Return information about a disk
salt-cloud -f show_disk my-azure name=my_disk
salt.cloud.clouds.msazure.get_input_endpoint(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Show an input endpoint associated with the deployment
salt.cloud.clouds.msazure.get_management_certificate(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Return information about a management_certificate
salt-cloud -f get_management_certificate my-azure name=my_management_certificate \ thumbalgorithm=sha1 thumbprint=0123456789ABCDEF
salt.cloud.clouds.msazure.get_operation_status(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Get Operation Status, based on a request ID
salt-cloud -f get_operation_status my-azure id=0123456789abcdef0123456789abcdef
salt.cloud.clouds.msazure.get_service_certificate(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Return information about a service certificate
salt.cloud.clouds.msazure.get_storage(kwargs=None, conn=None, call=None) New in version 2015.8.0.
List storage service properties
salt-cloud -f show_storage my-azure name=my_storage
salt.cloud.clouds.msazure.get_storage_conn(storage_account=None, storage_key=None, conn_kwargs=None) New in version 2015.8.0.
Return a storage_conn object for the storage account
salt.cloud.clouds.msazure.get_storage_container(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
Show a container associated with the storage account
name:  Name of container to show.
salt.cloud.clouds.msazure.get_storage_container_acl(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
Show a storage container's acl
name:  Name of existing container.
lease_id: If specified, show_storage_container_acl only succeeds if the container's lease is active and matches this ID.
salt.cloud.clouds.msazure.get_storage_container_metadata(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
Show a storage container's metadata
lease_id: If specified, show_storage_container_metadata only succeeds if the container's lease is active and matches this ID.
salt.cloud.clouds.msazure.get_storage_keys(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Show storage account keys
salt-cloud -f show_storage_keys my-azure name=my_storage
salt.cloud.clouds.msazure.lease_storage_container(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
Lease a container associated with the storage account
lease_action: Required. Possible values: acquire|renew|release|break|change
lease_id: Required if the container has an active lease.
lease_duration: Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change. For backwards compatibility, the default is 60, and the value is only used on an acquire operation.
lease_break_period: Optional. For a break operation, this is the proposed duration of seconds that the lease should continue before it is broken, between 0 and 60 seconds. This break period is only used if it is shorter than the time remaining on the lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break period has expired, but the lease may be held for longer than the break period. If this header does not appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks immediately.
proposed_lease_id: Optional for acquire, required for change. Proposed lease ID, in a GUID string format.
salt.cloud.clouds.msazure.list_affinity_groups(kwargs=None, conn=None, call=None) New in version 2015.8.0.
List input endpoints associated with the deployment
salt.cloud.clouds.msazure.list_blobs(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
List blobs associated with the container
container: The name of the storage container
prefix: Optional. Filters the results to return only blobs whose names begin with the specified prefix.
marker: Optional. A string value that identifies the portion of the list to be returned with the next list operation. The operation returns a marker value within the response body if the list returned was not complete. The marker value may then be used in a subsequent call to request the next set of list items. The marker value is opaque to the client.
maxresults: Optional. Specifies the maximum number of blobs to return, including all BlobPrefix elements. If the request does not specify maxresults or specifies a value greater than 5,000, the server will return up to 5,000 items. Setting maxresults to a value less than or equal to zero results in error response code 400 (Bad Request).
include: Optional. Specifies one or more datasets to include in the response. To specify more than one of these options on the URI, you must separate each option with a comma. Valid values are:
snapshots: Specifies that snapshots should be included in the enumeration. Snapshots are listed from oldest to newest in the response.
metadata: Specifies that blob metadata be returned in the response.
uncommittedblobs: Specifies that blobs for which blocks have been uploaded, but which have not been committed using Put Block List (REST API), be included in the response.
copy:  Version 2012-02-12 and newer. Specifies that metadata related to any current or previous Copy Blob operation should be included in the response.
delimiter: Optional. When the request includes this parameter, the operation returns a BlobPrefix element in the response body that acts as a placeholder for all blobs whose names begin with the same substring up to the appearance of the delimiter character. The delimiter may be a single character or a string.
salt.cloud.clouds.msazure.list_disks(kwargs=None, conn=None, call=None) New in version 2015.8.0.
List disks associated with the account
salt.cloud.clouds.msazure.list_hosted_services(conn=None, call=None) List VMs on this Azure account, with full information
salt.cloud.clouds.msazure.list_input_endpoints(kwargs=None, conn=None, call=None) New in version 2015.8.0.
salt.cloud.clouds.msazure.list_management_certificates(kwargs=None, conn=None, call=None) New in version 2015.8.0.
List management certificates associated with the subscription
salt-cloud -f list_management_certificates my-azure name=my_management
salt.cloud.clouds.msazure.list_nodes(conn=None, call=None) List VMs on this Azure account
salt.cloud.clouds.msazure.list_nodes_full(conn=None, call=None) List VMs on this Azure account, with full information
salt.cloud.clouds.msazure.list_nodes_select(conn=None, call=None) Return a list of the VMs that are on the provider, with select fields
salt.cloud.clouds.msazure.list_service_certificates(kwargs=None, conn=None, call=None) New in version 2015.8.0.
List certificates associated with the service
salt-cloud -f list_service_certificates my-azure name=my_service
salt.cloud.clouds.msazure.list_services(kwargs=None, conn=None, call=None) New in version 2015.8.0.
List hosted services associated with the account
salt-cloud -f list_services my-azure
salt.cloud.clouds.msazure.list_storage(kwargs=None, conn=None, call=None) New in version 2015.8.0.
List storage accounts associated with the account
salt-cloud -f list_storage my-azure
salt.cloud.clouds.msazure.list_storage_containers(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
List containers associated with the storage account
salt.cloud.clouds.msazure.list_storage_services(conn=None, call=None) List VMs on this Azure account, with full information
salt.cloud.clouds.msazure.list_virtual_networks(kwargs=None, conn=None, call=None) New in version 2015.8.0.
salt.cloud.clouds.msazure.make_blob_url(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
Creates the URL to access a blob
container: Name of the container.
blob:  Name of the blob.
account: Name of the storage account. If not specified, derives the host base from the provider configuration.
protocol: Protocol to use: 'http' or 'https'. If not specified, derives the host base from the provider configuration.
host_base: Live host base URL.  If not specified, derives the host base from the provider configuration.
salt.cloud.clouds.msazure.put_blob(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
Upload a blob
blob_path: The path on the local machine of the file to upload as a blob. Either this or blob_content must be specified.
blob_content: The actual content to be uploaded as a blob. Either this or blob_path must me specified.
cache_control: Optional. The Blob service stores this value but does not use or modify it.
content_language: Optional. Specifies the natural languages used by this resource.
content_md5: Optional. An MD5 hash of the blob content. This hash is used to verify the integrity of the blob during transport. When this header is specified, the storage service checks the hash that has arrived with the one that was sent. If the two hashes do not match, the operation will fail with error code 400 (Bad Request).
blob_content_type: Optional. Set the blob's content type.
blob_content_encoding: Optional. Set the blob's content encoding.
blob_content_language: Optional. Set the blob's content language.
blob_content_md5: Optional. Set the blob's MD5 hash.
blob_cache_control: Optional. Sets the blob's cache control.
meta_name_values: A dict containing name, value for metadata.
salt.cloud.clouds.msazure.query(path, method='GET', data=None, params=None, header_dict=None, decode=True) Perform a query directly against the Azure REST API
salt.cloud.clouds.msazure.regenerate_storage_keys(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Regenerate storage account keys. Requires a key_type ("primary" or "secondary") to be specified.
salt-cloud -f regenerate_storage_keys my-azure name=my_storage key_type=primary
salt.cloud.clouds.msazure.script(vm_) Return the script deployment object
salt.cloud.clouds.msazure.set_blob_properties(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
Set a blob's properties
blob_cache_control: Optional. Modifies the cache control string for the blob.
blob_content_type: Optional. Sets the blob's content type.
blob_content_md5: Optional. Sets the blob's MD5 hash.
blob_content_encoding: Optional. Sets the blob's content encoding.
blob_content_language: Optional. Sets the blob's content language.
blob_content_disposition: Optional. Sets the blob's Content-Disposition header.  The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified.
salt.cloud.clouds.msazure.set_blob_service_properties(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
Sets the properties of a storage account's Blob service, including Windows Azure Storage Analytics. You can also use this operation to set the default request version for all incoming requests that do not have a version specified.
properties: a StorageServiceProperties object.
timeout: Optional. The timeout parameter is expressed in seconds.
salt.cloud.clouds.msazure.set_storage_container_acl(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
Set a storage container's acl
signed_identifiers: SignedIdentifers instance
lease_id: If specified, set_storage_container_acl only succeeds if the container's lease is active and matches this ID.
salt.cloud.clouds.msazure.set_storage_container_metadata(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
Set a storage container's metadata
meta_name_values: A dict containing name, value for metadata.  Example: {'category':'test'}
lease_id: If specified, set_storage_container_metadata only succeeds if the container's lease is active and matches this ID.
salt.cloud.clouds.msazure.show_affinity_group(kwargs=None, conn=None, call=None) New in version 2015.8.0.
salt.cloud.clouds.msazure.show_blob_properties(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
salt.cloud.clouds.msazure.show_blob_service_properties(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
salt.cloud.clouds.msazure.show_deployment(kwargs=None, conn=None, call=None) New in version 2015.8.0.
salt.cloud.clouds.msazure.show_disk(kwargs=None, conn=None, call=None) New in version 2015.8.0.
salt.cloud.clouds.msazure.show_input_endpoint(kwargs=None, conn=None, call=None) New in version 2015.8.0.
salt.cloud.clouds.msazure.show_instance(name, call=None) Show the details from the provider concerning an instance
salt.cloud.clouds.msazure.show_management_certificate(kwargs=None, conn=None, call=None) New in version 2015.8.0.
salt.cloud.clouds.msazure.show_service(kwargs=None, conn=None, call=None) New in version 2015.8.0.
List hosted service properties
salt-cloud -f show_service my-azure name=my_service
salt.cloud.clouds.msazure.show_service_certificate(kwargs=None, conn=None, call=None) New in version 2015.8.0.
salt.cloud.clouds.msazure.show_storage(kwargs=None, conn=None, call=None) New in version 2015.8.0.
salt.cloud.clouds.msazure.show_storage_container(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
salt.cloud.clouds.msazure.show_storage_container_acl(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
salt.cloud.clouds.msazure.show_storage_container_metadata(kwargs=None, storage_conn=None, call=None) New in version 2015.8.0.
salt.cloud.clouds.msazure.show_storage_keys(kwargs=None, conn=None, call=None) New in version 2015.8.0.
salt.cloud.clouds.msazure.update_affinity_group(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Update an affinity group's properties
salt.cloud.clouds.msazure.update_disk(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Update a disk's properties
salt-cloud -f update_disk my-azure name=my_disk label=my_disk salt-cloud -f update_disk my-azure name=my_disk new_name=another_disk
salt.cloud.clouds.msazure.update_input_endpoint(kwargs=None, conn=None, call=None, activity='update') New in version 2015.8.0.
Update an input endpoint associated with the deployment. Please note that there may be a delay before the changes show up.
salt.cloud.clouds.msazure.update_storage(kwargs=None, conn=None, call=None) New in version 2015.8.0.
Update a storage account's properties
salt-cloud -f update_storage my-azure name=my_storage label=my_storage
salt.cloud.clouds.oneandone 1&1 Cloud Server Module The 1&1 SaltStack cloud module allows a 1&1 server to be automatically deployed and bootstrapped with Salt. It also has functions to create block storages and ssh keys.
depends 1and1 >= 1.2.0
The module requires the 1&1 api_token to be provided.  The server should also be assigned a public LAN, a private LAN, or both along with SSH key pairs.
Set up the cloud configuration at /etc/salt/cloud.providers or /etc/salt/cloud.providers.d/oneandone.conf:
my-oneandone-config: driver: oneandone # The 1&1 api token api_token: <your-token> # SSH private key filename ssh_private_key: /path/to/private_key # SSH public key filename ssh_public_key: /path/to/public_key
my-oneandone-profile: provider: my-oneandone-config # Either provide fixed_instance_size_id or vcore, cores_per_processor, ram, and hdds. # Size of the ID desired for the server fixed_instance_size: S # Total amount of processors vcore: 2 # Number of cores per processor cores_per_processor: 2 # RAM memory size in GB ram: 4 # Hard disks hdds: - is_main: true size: 20 - is_main: false size: 20 # ID of the appliance image that will be installed on server appliance_id: <ID> # ID of the datacenter where the server will be created datacenter_id: <ID> # Description of the server description: My server description # Password of the server. Password must contain more than 8 characters # using uppercase letters, numbers and other special symbols. password: P4$$w0rD # Power on server after creation - default True power_on: true # Firewall policy ID. If it is not provided, the server will assign # the best firewall policy, creating a new one if necessary. # If the parameter is sent with a 0 value, the server will be created with all ports blocked. firewall_policy_id: <ID> # IP address ID ip_id: <ID> # Load balancer ID load_balancer_id: <ID> # Monitoring policy ID monitoring_policy_id: <ID>
Set deploy to False if Salt should not be installed on the node.
my-oneandone-profile: deploy: False
Create an SSH key
Create a block storage
salt.cloud.clouds.oneandone.avail_images(conn=None, call=None) Return a list of the server appliances that are on the provider
salt.cloud.clouds.oneandone.avail_locations(conn=None, call=None) List available locations/datacenters for 1&1
salt.cloud.clouds.oneandone.avail_sizes(call=None) Return a dict of all available VM sizes on the cloud provider with relevant data.
salt.cloud.clouds.oneandone.create(vm_) Create a single VM from a data dict
salt.cloud.clouds.oneandone.create_block_storage(kwargs=None, call=None) Create a block storage
salt.cloud.clouds.oneandone.create_ssh_key(kwargs=None, call=None) Create an ssh key
salt.cloud.clouds.oneandone.destroy(name, call=None) destroy a server by name
• name -- name given to the server
salt.cloud.clouds.oneandone.get_configured_provider() Return the first configured instance.
salt.cloud.clouds.oneandone.get_conn() Return a conn object for the passed VM data
salt.cloud.clouds.oneandone.get_dependencies() Warn if dependencies are not met.
salt.cloud.clouds.oneandone.get_image(vm_) Return the image object to use
salt.cloud.clouds.oneandone.get_key_filename(vm_) Check SSH private key file and return absolute path if exists.
salt.cloud.clouds.oneandone.get_node(conn, name) Return a node for the named VM
salt.cloud.clouds.oneandone.get_size(vm_) Return the VM's size object
salt.cloud.clouds.oneandone.get_wait_timeout(vm_) Return the wait_for_timeout for resource provisioning.
salt.cloud.clouds.oneandone.list_nodes(conn=None, call=None) Return a list of VMs that are on the provider
salt.cloud.clouds.oneandone.list_nodes_full(conn=None, call=None) Return a list of the VMs that are on the provider, with all fields
salt.cloud.clouds.oneandone.list_nodes_select(conn=None, call=None) Return a list of the VMs that are on the provider, with select fields
salt.cloud.clouds.oneandone.load_public_key(vm_) Load the public key file if exists.
salt.cloud.clouds.oneandone.reboot(name, call=None) reboot a server by name :param name: name given to the machine :param call: call value in this case is 'action' :return: true if successful
salt.cloud.clouds.oneandone.script(vm_) Return the script deployment object
salt.cloud.clouds.oneandone.show_instance(name, call=None) Show the details from the provider concerning an instance
salt.cloud.clouds.oneandone.start(name, call=None) start a server by name :param name: name given to the machine :param call: call value in this case is 'action' :return: true if successful
salt.cloud.clouds.oneandone.stop(name, call=None) stop a server by name :param name: name given to the machine :param call: call value in this case is 'action' :return: true if successful
salt.cloud.clouds.opennebula OpenNebula Cloud Module The OpenNebula cloud module is used to control access to an OpenNebula cloud.
depends lxml
depends OpenNebula installation running version 4.14 or later.
Use of this module requires the xml_rpc, user, and password parameters to be set.
Set up the cloud configuration at /etc/salt/cloud.providers or /etc/salt/cloud.providers.d/opennebula.conf:
my-opennebula-config: xml_rpc: http://localhost:2633/RPC2 user: oneadmin password: JHGhgsayu32jsa driver: opennebula
This driver supports accessing new VM instances via DNS entry instead of IP address.  To enable this feature, in the provider or profile file add fqdn_base with a value matching the base of your fully-qualified domain name.  Example:
my-opennebula-config: [...] fqdn_base: <my.basedomain.com> [...]
The driver will prepend the hostname to the fqdn_base and do a DNS lookup to find the IP of the new VM.
salt-cloud -f image_allocate opennebula datastore_name=default \ data='NAME="My New Image" DESCRIPTION="Description of the image." \ PATH=/home/one_user/images/image_name.img' salt-cloud -f secgroup_allocate opennebula \ data="Name = test RULE = [PROTOCOL = TCP, RULE_TYPE = inbound, \ RANGE = 1000:2000]"
salt.cloud.clouds.opennebula.avail_images(call=None) Return available OpenNebula images.
salt-cloud --list-images opennebula salt-cloud --function avail_images opennebula salt-cloud -f avail_images opennebula
salt.cloud.clouds.opennebula.avail_locations(call=None) Return available OpenNebula locations.
salt-cloud --list-locations opennebula salt-cloud --function avail_locations opennebula salt-cloud -f avail_locations opennebula
salt.cloud.clouds.opennebula.avail_sizes(call=None) Because sizes are built into templates with OpenNebula, there will be no sizes to return here.
salt.cloud.clouds.opennebula.create(vm_) Create a single VM from a data dict.
vm_    The dictionary use to create a VM.
Optional vm_ dict options for overwriting template:
region_id Optional - OpenNebula Zone ID
memory Optional - In MB
cpu    Optional - Percent of host CPU to allocate
vcpu Optional - Amount of vCPUs to allocate
salt-cloud -p my-opennebula-profile vm_name
salt-cloud -p my-opennebula-profile vm_name memory=16384 cpu=2.5 vcpu=16
salt.cloud.clouds.opennebula.destroy(name, call=None) Destroy a node. Will check termination protection and warn if enabled.
name   The name of the vm to be destroyed.
salt-cloud --destroy vm_name salt-cloud -d vm_name salt-cloud --action destroy vm_name salt-cloud -a destroy vm_name
salt.cloud.clouds.opennebula.get_cluster_id(kwargs=None, call=None) Returns a cluster's ID from the given cluster name.
salt-cloud -f get_cluster_id opennebula name=my-cluster-name
salt.cloud.clouds.opennebula.get_configured_provider() Return the first configured instance.
salt.cloud.clouds.opennebula.get_datastore_id(kwargs=None, call=None) Returns a data store's ID from the given data store name.
salt-cloud -f get_datastore_id opennebula name=my-datastore-name
salt.cloud.clouds.opennebula.get_dependencies() Warn if dependencies aren't met.
salt.cloud.clouds.opennebula.get_host_id(kwargs=None, call=None) Returns a host's ID from the given host name.
salt-cloud -f get_host_id opennebula name=my-host-name
salt.cloud.clouds.opennebula.get_image(vm_) Return the image object to use.
vm_    The VM dictionary for which to obtain an image.
salt.cloud.clouds.opennebula.get_image_id(kwargs=None, call=None) Returns an image's ID from the given image name.
salt-cloud -f get_image_id opennebula name=my-image-name
salt.cloud.clouds.opennebula.get_location(vm_) Return the VM's location.
vm_    The VM dictionary for which to obtain a location.
salt.cloud.clouds.opennebula.get_one_version(kwargs=None, call=None) Returns the OpenNebula version.
New in version 2016.3.5.
salt-cloud -f get_one_version one_provider_name
salt.cloud.clouds.opennebula.get_secgroup_id(kwargs=None, call=None) Returns a security group's ID from the given security group name.
salt-cloud -f get_secgroup_id opennebula name=my-secgroup-name
salt.cloud.clouds.opennebula.get_template(vm_) Return the template id for a VM.
vm_    The VM dictionary for which to obtain a template.
salt.cloud.clouds.opennebula.get_template_id(kwargs=None, call=None) Returns a template's ID from the given template name.
salt-cloud -f get_template_id opennebula name=my-template-name
salt.cloud.clouds.opennebula.get_template_image(kwargs=None, call=None) Returns a template's image from the given template name.
salt-cloud -f get_template_image opennebula name=my-template-name
salt.cloud.clouds.opennebula.get_vm_id(kwargs=None, call=None) Returns a virtual machine's ID from the given virtual machine's name.
salt-cloud -f get_vm_id opennebula name=my-vm
salt.cloud.clouds.opennebula.get_vn_id(kwargs=None, call=None) Returns a virtual network's ID from the given virtual network's name.
salt-cloud -f get_vn_id opennebula name=my-vn-name
salt.cloud.clouds.opennebula.image_allocate(call=None, kwargs=None) Allocates a new image in OpenNebula.
path   The path to a file containing the template of the image to allocate.  Syntax within the file can be the usual attribute=value or XML. Can be used instead of data.
data   The data containing the template of the image to allocate. Syntax can be the usual attribute=value or XML. Can be used instead of path.
datastore_id The ID of the data-store to be used for the new image. Can be used instead of datastore_name.
datastore_name The name of the data-store to be used for the new image. Can be used instead of datastore_id.
salt-cloud -f image_allocate opennebula path=/path/to/image_file.txt datastore_id=1 salt-cloud -f image_allocate opennebula datastore_name=default \ data='NAME="Ubuntu 14.04" PATH="/home/one_user/images/ubuntu_desktop.img" \ DESCRIPTION="Ubuntu 14.04 for development."'
salt.cloud.clouds.opennebula.image_clone(call=None, kwargs=None) Clones an existing image.
name   The name of the new image.
image_id The ID of the image to be cloned. Can be used instead of image_name.
image_name The name of the image to be cloned. Can be used instead of image_id.
salt-cloud -f image_clone opennebula name=my-new-image image_id=10 salt-cloud -f image_clone opennebula name=my-new-image image_name=my-image-to-clone
salt.cloud.clouds.opennebula.image_delete(call=None, kwargs=None) Deletes the given image from OpenNebula. Either a name or an image_id must be supplied.
name   The name of the image to delete. Can be used instead of image_id.
image_id The ID of the image to delete. Can be used instead of name.
salt-cloud -f image_delete opennebula name=my-image salt-cloud --function image_delete opennebula image_id=100
salt.cloud.clouds.opennebula.image_info(call=None, kwargs=None) Retrieves information for a given image. Either a name or an image_id must be supplied.
name   The name of the image for which to gather information. Can be used instead of image_id.
image_id The ID of the image for which to gather information. Can be used instead of name.
salt-cloud -f image_info opennebula name=my-image salt-cloud --function image_info opennebula image_id=5
salt.cloud.clouds.opennebula.image_persistent(call=None, kwargs=None) Sets the Image as persistent or not persistent.
name   The name of the image to set. Can be used instead of image_id.
image_id The ID of the image to set. Can be used instead of name.
persist A boolean value to set the image as persistent or not. Set to true for persistent, false for non-persistent.
salt-cloud -f image_persistent opennebula name=my-image persist=True salt-cloud --function image_persistent opennebula image_id=5 persist=False
salt.cloud.clouds.opennebula.image_snapshot_delete(call=None, kwargs=None) Deletes a snapshot from the image.
image_id The ID of the image from which to delete the snapshot. Can be used instead of image_name.
image_name The name of the image from which to delete the snapshot. Can be used instead of image_id.
snapshot_id The ID of the snapshot to delete.
salt-cloud -f image_snapshot_delete vm_id=106 snapshot_id=45 salt-cloud -f image_snapshot_delete vm_name=my-vm snapshot_id=111
salt.cloud.clouds.opennebula.image_snapshot_flatten(call=None, kwargs=None) Flattens the snapshot of an image and discards others.
image_id The ID of the image. Can be used instead of image_name.
image_name The name of the image. Can be used instead of image_id.
snapshot_id The ID of the snapshot to flatten.
salt-cloud -f image_snapshot_flatten vm_id=106 snapshot_id=45 salt-cloud -f image_snapshot_flatten vm_name=my-vm snapshot_id=45
salt.cloud.clouds.opennebula.image_snapshot_revert(call=None, kwargs=None) Reverts an image state to a previous snapshot.
image_id The ID of the image to revert. Can be used instead of image_name.
image_name The name of the image to revert. Can be used instead of image_id.
snapshot_id The ID of the snapshot to which the image will be reverted.
salt-cloud -f image_snapshot_revert vm_id=106 snapshot_id=45 salt-cloud -f image_snapshot_revert vm_name=my-vm snapshot_id=120
salt.cloud.clouds.opennebula.image_update(call=None, kwargs=None) Replaces the image template contents.
image_id The ID of the image to update. Can be used instead of image_name.
image_name The name of the image to update. Can be used instead of image_id.
path   The path to a file containing the template of the image. Syntax within the file can be the usual attribute=value or XML. Can be used instead of data.
data   Contains the template of the image. Syntax can be the usual attribute=value or XML. Can be used instead of path.
update_type There are two ways to update an image: replace the whole template or merge the new template with the existing one.
salt-cloud -f image_update opennebula image_id=0 file=/path/to/image_update_file.txt update_type=replace salt-cloud -f image_update opennebula image_name="Ubuntu 14.04" update_type=merge \ data='NAME="Ubuntu Dev" PATH="/home/one_user/images/ubuntu_desktop.img" \ DESCRIPTION = "Ubuntu 14.04 for development."'
salt.cloud.clouds.opennebula.list_clusters(call=None) Returns a list of clusters in OpenNebula.
salt-cloud -f list_clusters opennebula
salt.cloud.clouds.opennebula.list_datastores(call=None) Returns a list of data stores on OpenNebula.
salt-cloud -f list_datastores opennebula
salt.cloud.clouds.opennebula.list_hosts(call=None) Returns a list of hosts on OpenNebula.
salt-cloud -f list_hosts opennebula
salt.cloud.clouds.opennebula.list_nodes(call=None) Return a list of VMs on OpenNebula.
salt-cloud -Q salt-cloud --query salt-cloud --function list_nodes opennebula salt-cloud -f list_nodes opennebula
salt.cloud.clouds.opennebula.list_nodes_full(call=None) Return a list of the VMs on OpenNebula.
salt-cloud -F salt-cloud --full-query salt-cloud --function list_nodes_full opennebula salt-cloud -f list_nodes_full opennebula
salt.cloud.clouds.opennebula.list_nodes_select(call=None) Return a list of the VMs that are on the provider, with select fields.
salt.cloud.clouds.opennebula.list_security_groups(call=None) Lists all security groups available to the user and the user's groups.
salt-cloud -f list_security_groups opennebula
salt.cloud.clouds.opennebula.list_templates(call=None) Lists all templates available to the user and the user's groups.
salt-cloud -f list_templates opennebula
salt.cloud.clouds.opennebula.list_vns(call=None) Lists all virtual networks available to the user and the user's groups.
salt-cloud -f list_vns opennebula
salt.cloud.clouds.opennebula.reboot(name, call=None) Reboot a VM.
salt-cloud -a reboot my-vm
salt.cloud.clouds.opennebula.secgroup_allocate(call=None, kwargs=None) Allocates a new security group in OpenNebula.
path   The path to a file containing the template of the security group. Syntax within the file can be the usual attribute=value or XML. Can be used instead of data.
data   The template data of the security group. Syntax can be the usual attribute=value or XML. Can be used instead of path.
salt-cloud -f secgroup_allocate opennebula path=/path/to/secgroup_file.txt salt-cloud -f secgroup_allocate opennebula \ data="NAME = test RULE = [PROTOCOL = TCP, RULE_TYPE = inbound, \ RANGE = 1000:2000]"
salt.cloud.clouds.opennebula.secgroup_clone(call=None, kwargs=None) Clones an existing security group.
name   The name of the new template.
secgroup_id The ID of the security group to be cloned. Can be used instead of secgroup_name.
secgroup_name The name of the security group to be cloned. Can be used instead of secgroup_id.
salt-cloud -f secgroup_clone opennebula name=my-cloned-secgroup secgroup_id=0 salt-cloud -f secgroup_clone opennebula name=my-cloned-secgroup secgroup_name=my-secgroup
salt.cloud.clouds.opennebula.secgroup_delete(call=None, kwargs=None) Deletes the given security group from OpenNebula. Either a name or a secgroup_id must be supplied.
name   The name of the security group to delete. Can be used instead of secgroup_id.
secgroup_id The ID of the security group to delete. Can be used instead of name.
salt-cloud -f secgroup_delete opennebula name=my-secgroup salt-cloud --function secgroup_delete opennebula secgroup_id=100
salt.cloud.clouds.opennebula.secgroup_info(call=None, kwargs=None) Retrieves information for the given security group. Either a name or a secgroup_id must be supplied.
name   The name of the security group for which to gather information. Can be used instead of secgroup_id.
secgroup_id The ID of the security group for which to gather information. Can be used instead of name.
salt-cloud -f secgroup_info opennebula name=my-secgroup salt-cloud --function secgroup_info opennebula secgroup_id=5
salt.cloud.clouds.opennebula.secgroup_update(call=None, kwargs=None) Replaces the security group template contents.
secgroup_id The ID of the security group to update. Can be used instead of secgroup_name.
secgroup_name The name of the security group to update. Can be used instead of secgroup_id.
update_type There are two ways to update a security group: replace the whole template or merge the new template with the existing one.
salt-cloud --function secgroup_update opennebula secgroup_id=100 \ path=/path/to/secgroup_update_file.txt \ update_type=replace salt-cloud -f secgroup_update opennebula secgroup_name=my-secgroup update_type=merge \ data="Name = test RULE = [PROTOCOL = TCP, RULE_TYPE = inbound, RANGE = 1000:2000]"
salt.cloud.clouds.opennebula.show_instance(name, call=None) Show the details from OpenNebula concerning a named VM.
call   Type of call to use with this function such as function.
salt-cloud --action show_instance vm_name salt-cloud -a show_instance vm_name
salt.cloud.clouds.opennebula.start(name, call=None) Start a VM.
salt-cloud -a start my-vm
salt.cloud.clouds.opennebula.stop(name, call=None) Stop a VM.
salt-cloud -a stop my-vm
salt.cloud.clouds.opennebula.template_allocate(call=None, kwargs=None) Allocates a new template in OpenNebula.
path   The path to a file containing the elements of the template to be allocated.  Syntax within the file can be the usual attribute=value or XML. Can be used instead of data.
data   Contains the elements of the template to be allocated. Syntax can be the usual attribute=value or XML. Can be used instead of path.
salt-cloud -f template_allocate opennebula path=/path/to/template_file.txt salt-cloud -f template_allocate opennebula \ data='CPU="1.0" DISK=[IMAGE="Ubuntu-14.04"] GRAPHICS=[LISTEN="0.0.0.0",TYPE="vnc"] \ MEMORY="1024" NETWORK="yes" NIC=[NETWORK="192net",NETWORK_UNAME="oneadmin"] \ OS=[ARCH="x86_64"] SUNSTONE_CAPACITY_SELECT="YES" SUNSTONE_NETWORK_SELECT="YES" \ VCPU="1"'
salt.cloud.clouds.opennebula.template_clone(call=None, kwargs=None) Clones an existing virtual machine template.
template_id The ID of the template to be cloned. Can be used instead of template_name.
template_name The name of the template to be cloned. Can be used instead of template_id.
clone_images Optional, defaults to False. Indicates if the images attached to the template should be cloned as well.
salt-cloud -f template_clone opennebula name=my-new-template template_id=0 salt-cloud -f template_clone opennebula name=my-new-template template_name=my-template
salt.cloud.clouds.opennebula.template_delete(call=None, kwargs=None) Deletes the given template from OpenNebula. Either a name or a template_id must be supplied.
name   The name of the template to delete. Can be used instead of template_id.
template_id The ID of the template to delete. Can be used instead of name.
salt-cloud -f template_delete opennebula name=my-template salt-cloud --function template_delete opennebula template_id=5
salt.cloud.clouds.opennebula.template_instantiate(call=None, kwargs=None) Instantiates a new virtual machine from a template.
NOTE: template_instantiate creates a VM on OpenNebula from a template, but it does not install Salt on the new VM. Use the create function for that functionality: salt-cloud -p opennebula-profile vm-name.
vm_name Name for the new VM instance.
template_id The ID of the template from which the VM will be created. Can be used instead of template_name.
template_name The name of the template from which the VM will be created. Can be used instead of template_id.
salt-cloud -f template_instantiate opennebula vm_name=my-new-vm template_id=0
salt.cloud.clouds.opennebula.template_update(call=None, kwargs=None) Replaces the template contents.
template_id The ID of the template to update. Can be used instead of template_name.
template_name The name of the template to update. Can be used instead of template_id.
path   The path to a file containing the elements of the template to be updated.  Syntax within the file can be the usual attribute=value or XML. Can be used instead of data.
data   Contains the elements of the template to be updated. Syntax can be the usual attribute=value or XML. Can be used instead of path.
update_type There are two ways to update a template: replace the whole template or merge the new template with the existing one.
salt-cloud --function template_update opennebula template_id=1 update_type=replace \ path=/path/to/template_update_file.txt salt-cloud -f template_update opennebula template_name=my-template update_type=merge \ data='CPU="1.0" DISK=[IMAGE="Ubuntu-14.04"] GRAPHICS=[LISTEN="0.0.0.0",TYPE="vnc"] \ MEMORY="1024" NETWORK="yes" NIC=[NETWORK="192net",NETWORK_UNAME="oneadmin"] \ OS=[ARCH="x86_64"] SUNSTONE_CAPACITY_SELECT="YES" SUNSTONE_NETWORK_SELECT="YES" \ VCPU="1"'
salt.cloud.clouds.opennebula.vm_action(name, kwargs=None, call=None) Submits an action to be performed on a given virtual machine.
name   The name of the VM to action.
The action to be performed on the VM. Available options include:
• boot
• delete
• delete-recreate
• hold
• poweroff
• poweroff-hard
• reboot
• reboot-hard
• release
• resched
• resume
• shutdown
• shutdown-hard
• stop
• suspend
• undeploy
• undeploy-hard
• unresched
salt-cloud -a vm_action my-vm action='release'
salt.cloud.clouds.opennebula.vm_allocate(call=None, kwargs=None) Allocates a new virtual machine in OpenNebula.
path   The path to a file defining the template of the VM to allocate.  Syntax within the file can be the usual attribute=value or XML.  Can be used instead of data.
data   Contains the template definitions of the VM to allocate. Syntax can be the usual attribute=value or XML. Can be used instead of path.
hold   If this parameter is set to True, the VM will be created in the HOLD state. If not set, the VM is created in the PENDING state. Default is False.
salt-cloud -f vm_allocate path=/path/to/vm_template.txt salt-cloud --function vm_allocate path=/path/to/vm_template.txt hold=True
salt.cloud.clouds.opennebula.vm_attach(name, kwargs=None, call=None) Attaches a new disk to the given virtual machine.
name   The name of the VM for which to attach the new disk.
path   The path to a file containing a single disk vector attribute.  Syntax within the file can be the usual attribute=value or XML.  Can be used instead of data.
data   Contains the data needed to attach a single disk vector attribute.  Syntax can be the usual attribute=value or XML. Can be used instead of path.
salt-cloud -a vm_attach my-vm path=/path/to/disk_file.txt salt-cloud -a vm_attach my-vm data="DISK=[DISK_ID=1]"
salt.cloud.clouds.opennebula.vm_attach_nic(name, kwargs=None, call=None) Attaches a new network interface to the given virtual machine.
name   The name of the VM for which to attach the new network interface.
path   The path to a file containing a single NIC vector attribute.  Syntax within the file can be the usual attribute=value or XML. Can be used instead of data.
data   Contains the single NIC vector attribute to attach to the VM.  Syntax can be the usual attribute=value or XML. Can be used instead of path.
salt-cloud -a vm_attach_nic my-vm path=/path/to/nic_file.txt salt-cloud -a vm_attach_nic my-vm data="NIC=[NETWORK_ID=1]"
salt.cloud.clouds.opennebula.vm_deploy(name, kwargs=None, call=None) Initiates the instance of the given VM on the target host.
name   The name of the VM to deploy.
host_id The ID of the target host where the VM will be deployed. Can be used instead of host_name.
host_name The name of the target host where the VM will be deployed. Can be used instead of host_id.
capacity_maintained True to enforce the Host capacity is not over-committed. This parameter is only acknowledged for users in the oneadmin group. Host capacity will be always enforced for regular users.
datastore_id The ID of the target system data-store where the VM will be deployed. Optional and can be used instead of datastore_name. If neither datastore_id nor datastore_name are set, OpenNebula will choose the data-store.
datastore_name The name of the target system data-store where the VM will be deployed. Optional, and can be used instead of datastore_id. If neither datastore_id nor datastore_name are set, OpenNebula will choose the data-store.
salt-cloud -a vm_deploy my-vm host_id=0 salt-cloud -a vm_deploy my-vm host_id=1 capacity_maintained=False salt-cloud -a vm_deploy my-vm host_name=host01 datastore_id=1 salt-cloud -a vm_deploy my-vm host_name=host01 datastore_name=default
salt.cloud.clouds.opennebula.vm_detach(name, kwargs=None, call=None) Detaches a disk from a virtual machine.
name   The name of the VM from which to detach the disk.
disk_id The ID of the disk to detach.
salt-cloud -a vm_detach my-vm disk_id=1
salt.cloud.clouds.opennebula.vm_detach_nic(name, kwargs=None, call=None) Detaches a disk from a virtual machine.
name   The name of the VM from which to detach the network interface.
nic_id The ID of the nic to detach.
salt-cloud -a vm_detach_nic my-vm nic_id=1
salt.cloud.clouds.opennebula.vm_disk_save(name, kwargs=None, call=None) Sets the disk to be saved in the given image.
name   The name of the VM containing the disk to save.
disk_id The ID of the disk to save.
image_name The name of the new image where the disk will be saved.
image_type The type for the new image. If not set, then the default ONED Configuration will be used. Other valid types include: OS, CDROM, DATABLOCK, KERNEL, RAMDISK, and CONTEXT.
snapshot_id The ID of the snapshot to export. If not set, the current image state will be used.
salt-cloud -a vm_disk_save my-vm disk_id=1 image_name=my-new-image salt-cloud -a vm_disk_save my-vm disk_id=1 image_name=my-new-image image_type=CONTEXT snapshot_id=10
salt.cloud.clouds.opennebula.vm_disk_snapshot_create(name, kwargs=None, call=None) Takes a new snapshot of the disk image.
name   The name of the VM of which to take the snapshot.
description The description for the snapshot.
salt-cloud -a vm_disk_snapshot_create my-vm disk_id=0 description="My Snapshot Description"