Class: Ansible::Ruby::Modules::One_vm
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::One_vm
- Defined in:
- lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb
Overview
Manages OpenNebula instances
Instance Method Summary collapse
-
#api_password ⇒ Object?
Password of the user to login into OpenNebula RPC server.
-
#api_url ⇒ Object?
URL of the OpenNebula RPC server.,It is recommended to use HTTPS so that the username/password are not,transferred over the network unencrypted.,If not set then the value of the C(ONE_URL) environment variable is used.
-
#api_username ⇒ Object?
Name of the user to login into the OpenNebula RPC server.
-
#attributes ⇒ Object?
A dictionary of key/value attributes to add to new instances, or for,setting C(state) of instances with these attributes.,Keys are case insensitive and OpenNebula automatically converts them to upper case.,Be aware C(NAME) is a special attribute which sets the name of the VM when it’s deployed.,C(#) character(s) can be appended to the C(NAME) and the module will automatically add,indexes to the names of VMs.,For example’:‘ C(NAME’:‘ foo-###) would create VMs with names C(foo-000), C(foo-001),…,When used with C(count_attributes) and C(exact_count) the module will,match the base name without the index part.
-
#count ⇒ Integer?
Number of instances to launch.
-
#count_attributes ⇒ Hash?
A dictionary of key/value attributes that can only be used with,C(exact_count) to determine how many nodes based on a specific,attributes criteria should be deployed.
-
#count_labels ⇒ Array<String>, ...
A list of labels that can only be used with C(exact_count) to determine,how many nodes based on a specific labels criteria should be deployed.,This can be expressed in multiple ways and is shown in the EXAMPLES,section.
-
#cpu ⇒ Object?
Percentage of CPU divided by 100 required for the new instance.
-
#disk_saveas ⇒ Hash?
Creates an image from a VM disk.,It is a dictionary where you have to specife C(name) of the new image.,Optionally you can specife C(disk_id) of the disk you want to save.
-
#disk_size ⇒ String?
The size of the disk created for new instances (in MB, GB, TB,…).,NOTE’:‘ This option can be used only if the VM template specified with,C(template_id)/C(template_name) has exactly one disk.
-
#exact_count ⇒ Integer?
Indicates how many instances that match C(count_attributes) and,C(count_labels) parameters should be deployed.
-
#group_id ⇒ Integer?
ID of the group which will be set as the group of the instance.
-
#hard ⇒ Symbol?
Reboot, power-off or terminate instances C(hard).
-
#instance_ids ⇒ Array<Integer>, ...
A list of instance ids used for states’:‘ C(absent), C(running), C(rebooted), C(poweredoff).
-
#labels ⇒ Object?
A list of labels to associate with new instances, or for setting,C(state) of instances with these labels.
-
#memory ⇒ String?
The size of the memory for new instances (in MB, GB, …).
-
#mode ⇒ Integer?
Set permission mode of the instance in octet format, e.g.
-
#networks ⇒ Object?
A list of dictionaries with network parameters.
-
#owner_id ⇒ Object?
ID of the user which will be set as the owner of the instance.
-
#state ⇒ :present, ...
C(present) - create instances from a template specified with C(template_id)/C(template_name).,C(running) - run instances,C(poweredoff) - power-off instances,C(rebooted) - reboot instances,C(absent) - terminate instances.
-
#template_id ⇒ Integer?
ID of a VM template to use to create a new instance.
-
#template_name ⇒ String?
Name of VM template to use to create a new instace.
-
#vcpu ⇒ Integer?
Number of CPUs (cores) new VM will have.
-
#wait ⇒ Boolean?
Wait for the instance to reach its desired state before returning.
-
#wait_timeout ⇒ Integer?
How long before wait gives up, in seconds.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#api_password ⇒ Object?
Returns Password of the user to login into OpenNebula RPC server. If not set.
18 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 18 attribute :api_password |
#api_url ⇒ Object?
Returns URL of the OpenNebula RPC server.,It is recommended to use HTTPS so that the username/password are not,transferred over the network unencrypted.,If not set then the value of the C(ONE_URL) environment variable is used.
12 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 12 attribute :api_url |
#api_username ⇒ Object?
Returns Name of the user to login into the OpenNebula RPC server. If not set,then the value of the C(ONE_USERNAME) environment variable is used.
15 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 15 attribute :api_username |
#attributes ⇒ Object?
Returns A dictionary of key/value attributes to add to new instances, or for,setting C(state) of instances with these attributes.,Keys are case insensitive and OpenNebula automatically converts them to upper case.,Be aware C(NAME) is a special attribute which sets the name of the VM when it’s deployed.,C(#) character(s) can be appended to the C(NAME) and the module will automatically add,indexes to the names of VMs.,For example’:‘ C(NAME’:‘ foo-###) would create VMs with names C(foo-000), C(foo-001),…,When used with C(count_attributes) and C(exact_count) the module will,match the base name without the index part.
49 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 49 attribute :attributes |
#count ⇒ Integer?
Returns Number of instances to launch.
63 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 63 attribute :count |
#count_attributes ⇒ Hash?
Returns A dictionary of key/value attributes that can only be used with,C(exact_count) to determine how many nodes based on a specific,attributes criteria should be deployed. This can be expressed in,multiple ways and is shown in the EXAMPLES section.
55 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 55 attribute :count_attributes |
#count_labels ⇒ Array<String>, ...
Returns A list of labels that can only be used with C(exact_count) to determine,how many nodes based on a specific labels criteria should be deployed.,This can be expressed in multiple ways and is shown in the EXAMPLES,section.
59 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 59 attribute :count_labels |
#cpu ⇒ Object?
Returns Percentage of CPU divided by 100 required for the new instance. Half a,processor is written 0.5.
90 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 90 attribute :cpu |
#disk_saveas ⇒ Hash?
Returns Creates an image from a VM disk.,It is a dictionary where you have to specife C(name) of the new image.,Optionally you can specife C(disk_id) of the disk you want to save. By default C(disk_id) is 0.,I(NOTE)‘:’ This operation will only be performed on the first VM (if more than one VM ID is passed),and the VM has to be in the C(poweredoff) state.,Also this operation will fail if an image with specified C(name) already exists.
100 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 100 attribute :disk_saveas |
#disk_size ⇒ String?
Returns The size of the disk created for new instances (in MB, GB, TB,…).,NOTE’:‘ This option can be used only if the VM template specified with,C(template_id)/C(template_name) has exactly one disk.
86 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 86 attribute :disk_size |
#exact_count ⇒ Integer?
Returns Indicates how many instances that match C(count_attributes) and,C(count_labels) parameters should be deployed. Instances are either,created or terminated based on this value.,NOTE’:‘ Instances with the least IDs will be terminated first.
67 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 67 attribute :exact_count |
#group_id ⇒ Integer?
Returns ID of the group which will be set as the group of the instance.
78 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 78 attribute :group_id |
#hard ⇒ Symbol?
Returns Reboot, power-off or terminate instances C(hard).
37 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 37 attribute :hard |
#instance_ids ⇒ Array<Integer>, ...
Returns A list of instance ids used for states’:‘ C(absent), C(running), C(rebooted), C(poweredoff).
29 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 29 attribute :instance_ids |
#labels ⇒ Object?
Returns A list of labels to associate with new instances, or for setting,C(state) of instances with these labels.
52 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 52 attribute :labels |
#memory ⇒ String?
Returns The size of the memory for new instances (in MB, GB, …).
82 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 82 attribute :memory |
#mode ⇒ Integer?
Returns Set permission mode of the instance in octet format, e.g. C(600) to give owner C(use) and C(manage) and nothing to group and others.
71 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 71 attribute :mode |
#networks ⇒ Object?
Returns A list of dictionaries with network parameters. See examples for more details.
97 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 97 attribute :networks |
#owner_id ⇒ Object?
Returns ID of the user which will be set as the owner of the instance.
75 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 75 attribute :owner_id |
#state ⇒ :present, ...
Returns C(present) - create instances from a template specified with C(template_id)/C(template_name).,C(running) - run instances,C(poweredoff) - power-off instances,C(rebooted) - reboot instances,C(absent) - terminate instances.
33 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 33 attribute :state |
#template_id ⇒ Integer?
Returns ID of a VM template to use to create a new instance.
25 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 25 attribute :template_id |
#template_name ⇒ String?
Returns Name of VM template to use to create a new instace.
21 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 21 attribute :template_name |
#vcpu ⇒ Integer?
Returns Number of CPUs (cores) new VM will have.
93 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 93 attribute :vcpu |
#wait ⇒ Boolean?
Returns Wait for the instance to reach its desired state before returning. Keep,in mind if you are waiting for instance to be in running state it,doesn’t mean that you will be able to SSH on that machine only that,boot process have started on that instance, see ‘wait_for’ example for,details.
41 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 41 attribute :wait |
#wait_timeout ⇒ Integer?
Returns How long before wait gives up, in seconds.
45 |
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 45 attribute :wait_timeout |