Class: Ansible::Ruby::Modules::One_vm

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb

Overview

Manages OpenNebula instances

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

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_passwordObject?

Returns Password of the user to login into OpenNebula RPC server. If not set.

Returns:

  • (Object, nil)

    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_urlObject?

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.

Returns:

  • (Object, nil)

    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_usernameObject?

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.

Returns:

  • (Object, nil)

    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

#attributesObject?

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.

Returns:

  • (Object, nil)

    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

#countInteger?

Returns Number of instances to launch.

Returns:

  • (Integer, nil)

    Number of instances to launch



63
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 63

attribute :count

#count_attributesHash?

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.

Returns:

  • (Hash, nil)

    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_labelsArray<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.

Returns:

  • (Array<String>, String, nil)

    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

#cpuObject?

Returns Percentage of CPU divided by 100 required for the new instance. Half a,processor is written 0.5.

Returns:

  • (Object, nil)

    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_saveasHash?

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.

Returns:

  • (Hash, nil)

    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_sizeString?

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.

Returns:

  • (String, nil)

    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_countInteger?

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.

Returns:

  • (Integer, nil)

    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_idInteger?

Returns ID of the group which will be set as the group of the instance.

Returns:

  • (Integer, nil)

    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

#hardSymbol?

Returns Reboot, power-off or terminate instances C(hard).

Returns:

  • (Symbol, nil)

    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_idsArray<Integer>, ...

Returns A list of instance ids used for states’:‘ C(absent), C(running), C(rebooted), C(poweredoff).

Returns:

  • (Array<Integer>, Integer, nil)

    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

#labelsObject?

Returns A list of labels to associate with new instances, or for setting,C(state) of instances with these labels.

Returns:

  • (Object, nil)

    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

#memoryString?

Returns The size of the memory for new instances (in MB, GB, …).

Returns:

  • (String, nil)

    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

#modeInteger?

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.

Returns:

  • (Integer, nil)

    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

#networksObject?

Returns A list of dictionaries with network parameters. See examples for more details.

Returns:

  • (Object, nil)

    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_idObject?

Returns ID of the user which will be set as the owner of the instance.

Returns:

  • (Object, nil)

    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.

Returns:

  • (:present, :absent, :running, :rebooted, :poweredoff, nil)

    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_idInteger?

Returns ID of a VM template to use to create a new instance.

Returns:

  • (Integer, nil)

    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_nameString?

Returns Name of VM template to use to create a new instace.

Returns:

  • (String, nil)

    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

#vcpuInteger?

Returns Number of CPUs (cores) new VM will have.

Returns:

  • (Integer, nil)

    Number of CPUs (cores) new VM will have.



93
# File 'lib/ansible/ruby/modules/generated/cloud/opennebula/one_vm.rb', line 93

attribute :vcpu

#waitBoolean?

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.

Returns:

  • (Boolean, nil)

    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_timeoutInteger?

Returns How long before wait gives up, in seconds.

Returns:

  • (Integer, nil)

    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