The OpenNebula cloud module is used to control access to an OpenNebula cloud.
2014.7.0 新版功能.
depends: | lxml |
---|---|
depends: | OpenNebula installation running version 4.14 . |
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
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.
命令行接口CLI 范例:
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.
命令行接口CLI 范例:
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.
命令行接口CLI 范例:
salt-cloud -p my-opennebula-profile vm_name
salt.cloud.clouds.opennebula.
destroy
(name, call=None)¶Destroy a node. Will check termination protection and warn if enabled.
命令行接口CLI 范例:
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.
2016.3.0 新版功能.
命令行接口CLI 范例:
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.
2016.3.0 新版功能.
命令行接口CLI 范例:
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.
2016.3.0 新版功能.
命令行接口CLI 范例:
salt-cloud -f get_host_id opennebula name=my-host-name
salt.cloud.clouds.opennebula.
get_image
(vm_)¶Return the image object to use.
salt.cloud.clouds.opennebula.
get_image_id
(kwargs=None, call=None)¶Returns an image's ID from the given image name.
2016.3.0 新版功能.
命令行接口CLI 范例:
salt-cloud -f get_image_id opennebula name=my-image-name
salt.cloud.clouds.opennebula.
get_location
(vm_)¶Return the VM's location.
salt.cloud.clouds.opennebula.
get_secgroup_id
(kwargs=None, call=None)¶Returns a security group's ID from the given security group name.
2016.3.0 新版功能.
命令行接口CLI 范例:
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.
Carbon 新版功能.
salt.cloud.clouds.opennebula.
get_template_id
(kwargs=None, call=None)¶Returns a template's ID from the given template name.
2016.3.0 新版功能.
命令行接口CLI 范例:
salt-cloud -f get_template_id 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.
2016.3.0 新版功能.
命令行接口CLI 范例:
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.
2016.3.0 新版功能.
命令行接口CLI 范例:
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.
2016.3.0 新版功能.
data
.path
.datastore_name
.datastore_id
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
image_name
.image_id
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
image_id
.name
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
image_id
.name
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
image_id
.name
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
image_name
.image_id
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
image_name
.image_id
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
image_name
.image_id
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
image_name
.image_id
.data
.path
.replace
the whole template
or merge
the new template with the existing one.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
命令行接口CLI 范例:
salt-cloud -f list_clusters opennebula
salt.cloud.clouds.opennebula.
list_datastores
(call=None)¶Returns a list of data stores on OpenNebula.
2016.3.0 新版功能.
命令行接口CLI 范例:
salt-cloud -f list_datastores opennebula
salt.cloud.clouds.opennebula.
list_hosts
(call=None)¶Returns a list of hosts on OpenNebula.
2016.3.0 新版功能.
命令行接口CLI 范例:
salt-cloud -f list_hosts opennebula
salt.cloud.clouds.opennebula.
list_nodes
(call=None)¶Return a list of VMs on OpenNebula.
命令行接口CLI 范例:
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.
命令行接口CLI 范例:
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.
2016.3.0 新版功能.
命令行接口CLI 范例:
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.
2016.3.0 新版功能.
命令行接口CLI 范例:
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.
2016.3.0 新版功能.
命令行接口CLI 范例:
salt-cloud -f list_vns opennebula
salt.cloud.clouds.opennebula.
reboot
(name, call=None)¶Reboot a VM.
2016.3.0 新版功能.
命令行接口CLI 范例:
salt-cloud -a reboot my-vm
salt.cloud.clouds.opennebula.
secgroup_allocate
(call=None, kwargs=None)¶Allocates a new security group in OpenNebula.
2016.3.0 新版功能.
data
.path
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
secgroup_name
.secgroup_id
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
secgroup_id
.name
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
secgroup_id
.name
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
secgroup_name
.secgroup_id
.data
.path
.replace
the whole template
or merge
the new template with the existing one.命令行接口CLI 范例:
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.
function
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
命令行接口CLI 范例:
salt-cloud -a start my-vm
salt.cloud.clouds.opennebula.
stop
(name, call=None)¶Stop a VM.
2016.3.0 新版功能.
命令行接口CLI 范例:
salt-cloud -a stop my-vm
salt.cloud.clouds.opennebula.
template_allocate
(call=None, kwargs=None)¶Allocates a new template in OpenNebula.
2016.3.0 新版功能.
data
.path
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
template_name
.template_id
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
template_id
.name
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
注解
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
.
template_name
.template_id
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
template_name
.template_id
.data
.path
.replace
the whole template
or merge
the new template with the existing one.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
命令行接口CLI 范例:
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.
2016.3.0 新版功能.
data
.path
.True
, the VM will be created in
the HOLD
state. If not set, the VM is created in the PENDING
state. Default is False
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
data
.path
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
data
.path
.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
host_name
.host_id
.oneadmin
group. Host capacity will be always
enforced for regular users.datastore_name
. If neither datastore_id
nor
datastore_name
are set, OpenNebula will choose the data-store.datastore_id
. If neither datastore_id
nor
datastore_name
are set, OpenNebula will choose the data-store.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
命令行接口CLI 范例:
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.
2016.3.0 新版功能.
命令行接口CLI 范例:
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.
2016.3.0 新版功能.
ONED
Configuration
will be used. Other valid types include: OS, CDROM, DATABLOCK, KERNEL, RAMDISK,
and CONTEXT.命令行接口CLI 范例:
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.
2016.3.0 新版功能.
命令行接口CLI 范例:
salt-cloud -a vm_disk_snapshot_create my-vm disk_id=0 description="My Snapshot Description"
salt.cloud.clouds.opennebula.
vm_disk_snapshot_delete
(name, kwargs=None, call=None)¶Deletes a disk snapshot based on the given VM and the disk_id.
2016.3.0 新版功能.
命令行接口CLI 范例:
salt-cloud -a vm_disk_snapshot_delete my-vm disk_id=0 snapshot_id=6
salt.cloud.clouds.opennebula.
vm_disk_snapshot_revert
(name, kwargs=None, call=None)¶Reverts a disk state to a previously taken snapshot.
2016.3.0 新版功能.
命令行接口CLI 范例:
salt-cloud -a vm_disk_snapshot_revert my-vm disk_id=0 snapshot_id=6
salt.cloud.clouds.opennebula.
vm_info
(name, call=None)¶Retrieves information for a given virtual machine. A VM name must be supplied.
2016.3.0 新版功能.
命令行接口CLI 范例:
salt-cloud -a vm_info my-vm
salt.cloud.clouds.opennebula.
vm_migrate
(name, kwargs=None, call=None)¶Migrates the specified virtual machine to the specified target host.
2016.3.0 新版功能.
host_name
.host_id
.True
, a live-migration will be performed. Default is False
.oneadmin
group. Host capacity will be always
enforced for regular users.datastore_name
.datastore_id
.命令行接口CLI 范例:
salt-cloud -a vm_migrate my-vm host_id=0 datastore_id=1
salt-cloud -a vm_migrate my-vm host_id=0 datastore_id=1 live_migration=True
salt-cloud -a vm_migrate my-vm host_name=host01 datastore_name=default
salt.cloud.clouds.opennebula.
vm_monitoring
(name, call=None)¶Returns the monitoring records for a given virtual machine. A VM name must be supplied.
The monitoring information returned is a list of VM elements. Each VM element contains the complete dictionary of the VM with the updated information returned by the poll action.
2016.3.0 新版功能.
命令行接口CLI 范例:
salt-cloud -a vm_monitoring my-vm
salt.cloud.clouds.opennebula.
vm_resize
(name, kwargs=None, call=None)¶Changes the capacity of the virtual machine.
2016.3.0 新版功能.
data
.path
.oneadmin
group. Host capacity will be always
enforced for regular users.命令行接口CLI 范例:
salt-cloud -a vm_resize my-vm path=/path/to/capacity_template.txt
salt-cloud -a vm_resize my-vm path=/path/to/capacity_template.txt capacity_maintained=False
salt-cloud -a vm_resize my-vm data="CPU=1 VCPU=1 MEMORY=1024"
salt.cloud.clouds.opennebula.
vm_snapshot_create
(vm_name, kwargs=None, call=None)¶Creates a new virtual machine snapshot from the provided VM.
2016.3.0 新版功能.
命令行接口CLI 范例:
salt-cloud -a vm_snapshot_create my-vm snapshot_name=my-new-snapshot
salt.cloud.clouds.opennebula.
vm_snapshot_delete
(vm_name, kwargs=None, call=None)¶Deletes a virtual machine snapshot from the provided VM.
2016.3.0 新版功能.
命令行接口CLI 范例:
salt-cloud -a vm_snapshot_delete my-vm snapshot_id=8
salt.cloud.clouds.opennebula.
vm_snapshot_revert
(vm_name, kwargs=None, call=None)¶Reverts a virtual machine to a snapshot
2016.3.0 新版功能.
命令行接口CLI 范例:
salt-cloud -a vm_snapshot_revert my-vm snapshot_id=42
salt.cloud.clouds.opennebula.
vm_update
(name, kwargs=None, call=None)¶Replaces the user template contents.
2016.3.0 新版功能.
data
.path
.replace
the whole template
or merge
the new template with the existing one.命令行接口CLI 范例:
salt-cloud -a vm_update my-vm path=/path/to/user_template_file.txt update_type='replace'
salt.cloud.clouds.opennebula.
vn_add_ar
(call=None, kwargs=None)¶Adds address ranges to a given virtual network.
2016.3.0 新版功能.
vn_name
.vn_id
.data
.path
.命令行接口CLI 范例:
salt-cloud -f vn_add_ar opennebula vn_id=3 path=/path/to/address_range.txt
salt-cloud -f vn_add_ar opennebula vn_name=my-vn \
data="AR=[TYPE=IP4, IP=192.168.0.5, SIZE=10]"
salt.cloud.clouds.opennebula.
vn_allocate
(call=None, kwargs=None)¶Allocates a new virtual network in OpenNebula.
2016.3.0 新版功能.
data
.path
.cluster_name
. If neither cluster_id
nor cluster_name
are provided, the virtual network won’t be added to any cluster.cluster_id
. If neither cluster_name
nor cluster_id
are
provided, the virtual network won't be added to any cluster.命令行接口CLI 范例:
salt-cloud -f vn_allocate opennebula path=/path/to/vn_file.txt
salt.cloud.clouds.opennebula.
vn_delete
(call=None, kwargs=None)¶Deletes the given virtual network from OpenNebula. Either a name or a vn_id must be supplied.
2016.3.0 新版功能.
vn_id
.name
.命令行接口CLI 范例:
salt-cloud -f vn_delete opennebula name=my-virtual-network
salt-cloud --function vn_delete opennebula vn_id=3
salt.cloud.clouds.opennebula.
vn_free_ar
(call=None, kwargs=None)¶Frees a reserved address range from a virtual network.
2016.3.0 新版功能.
vn_name
.vn_id
.命令行接口CLI 范例:
salt-cloud -f vn_free_ar opennebula vn_id=3 ar_id=1
salt-cloud -f vn_free_ar opennebula vn_name=my-vn ar_id=1
salt.cloud.clouds.opennebula.
vn_hold
(call=None, kwargs=None)¶Holds a virtual network lease as used.
2016.3.0 新版功能.
vn_name
.vn_id
.data
.path
.命令行接口CLI 范例:
salt-cloud -f vn_hold opennebula vn_id=3 path=/path/to/vn_hold_file.txt
salt-cloud -f vn_hold opennebula vn_name=my-vn data="LEASES=[IP=192.168.0.5]"
salt.cloud.clouds.opennebula.
vn_info
(call=None, kwargs=None)¶Retrieves information for the virtual network.
2016.3.0 新版功能.
vn_id
.name
.命令行接口CLI 范例:
salt-cloud -f vn_info opennebula vn_id=3
salt-cloud --function vn_info opennebula name=public
salt.cloud.clouds.opennebula.
vn_release
(call=None, kwargs=None)¶Releases a virtual network lease that was previously on hold.
2016.3.0 新版功能.
vn_name
.vn_id
.data
.path
.命令行接口CLI 范例:
salt-cloud -f vn_release opennebula vn_id=3 path=/path/to/vn_release_file.txt
salt-cloud =f vn_release opennebula vn_name=my-vn data="LEASES=[IP=192.168.0.5]"
salt.cloud.clouds.opennebula.
vn_reserve
(call=None, kwargs=None)¶Reserve network addresses.
2016.3.0 新版功能.
data
.path
.命令行接口CLI 范例:
salt-cloud -f vn_reserve opennebula vn_id=3 path=/path/to/vn_reserve_file.txt
salt-cloud -f vn_reserve opennebula vn_name=my-vn data="SIZE=10 AR_ID=8 NETWORK_ID=1"