class OvirtSDK4::VmPool

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {VmPool} class.

@param opts [Hash] A hash containing the attributes of the object. The keys of the hash

should be symbols corresponding to the names of the attributes. The values of the hash
should be the values of the attributes.

@option opts [Boolean] :auto_storage_select The value of attribute `auto_storage_select`.

@option opts [Cluster, Hash] :cluster The value of attribute `cluster`.

@option opts [String] :comment The value of attribute `comment`.

@option opts [String] :description The value of attribute `description`.

@option opts [Display, Hash] :display The value of attribute `display`.

@option opts [String] :id The value of attribute `id`.

@option opts [InstanceType, Hash] :instance_type The value of attribute `instance_type`.

@option opts [Integer] :max_user_vms The value of attribute `max_user_vms`.

@option opts [String] :name The value of attribute `name`.

@option opts [Array<Permission>, Array<Hash>] :permissions The values of attribute `permissions`.

@option opts [Integer] :prestarted_vms The value of attribute `prestarted_vms`.

@option opts [RngDevice, Hash] :rng_device The value of attribute `rng_device`.

@option opts [Integer] :size The value of attribute `size`.

@option opts [Boolean] :soundcard_enabled The value of attribute `soundcard_enabled`.

@option opts [Boolean] :stateful The value of attribute `stateful`.

@option opts [Template, Hash] :template The value of attribute `template`.

@option opts [Boolean] :tpm_enabled The value of attribute `tpm_enabled`.

@option opts [VmPoolType] :type The value of attribute `type`.

@option opts [Boolean] :use_latest_template_version The value of attribute `use_latest_template_version`.

@option opts [Vm, Hash] :vm The value of attribute `vm`.

Calls superclass method OvirtSDK4::Identified::new
# File lib/ovirtsdk4/types.rb, line 27460
def initialize(opts = {})
  super(opts)
  self.auto_storage_select = opts[:auto_storage_select]
  self.cluster = opts[:cluster]
  self.display = opts[:display]
  self.instance_type = opts[:instance_type]
  self.max_user_vms = opts[:max_user_vms]
  self.permissions = opts[:permissions]
  self.prestarted_vms = opts[:prestarted_vms]
  self.rng_device = opts[:rng_device]
  self.size = opts[:size]
  self.soundcard_enabled = opts[:soundcard_enabled]
  self.stateful = opts[:stateful]
  self.template = opts[:template]
  self.tpm_enabled = opts[:tpm_enabled]
  self.type = opts[:type]
  self.use_latest_template_version = opts[:use_latest_template_version]
  self.vm = opts[:vm]
end

Public Instance Methods

==(other) click to toggle source

Returns `true` if `self` and `other` have the same attributes and values.

Calls superclass method OvirtSDK4::Identified#==
# File lib/ovirtsdk4/types.rb, line 27483
def ==(other)
  super &&
  @auto_storage_select == other.auto_storage_select &&
  @cluster == other.cluster &&
  @display == other.display &&
  @instance_type == other.instance_type &&
  @max_user_vms == other.max_user_vms &&
  @permissions == other.permissions &&
  @prestarted_vms == other.prestarted_vms &&
  @rng_device == other.rng_device &&
  @size == other.size &&
  @soundcard_enabled == other.soundcard_enabled &&
  @stateful == other.stateful &&
  @template == other.template &&
  @tpm_enabled == other.tpm_enabled &&
  @type == other.type &&
  @use_latest_template_version == other.use_latest_template_version &&
  @vm == other.vm
end
auto_storage_select() click to toggle source

Returns the value of the `auto_storage_select` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 27007
def auto_storage_select
  @auto_storage_select
end
auto_storage_select=(value) click to toggle source

Sets the value of the `auto_storage_select` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 27016
def auto_storage_select=(value)
  @auto_storage_select = value
end
cluster() click to toggle source

Returns the value of the `cluster` attribute.

@return [Cluster]

# File lib/ovirtsdk4/types.rb, line 27025
def cluster
  @cluster
end
cluster=(value) click to toggle source

Sets the value of the `cluster` attribute.

@param value [Cluster, Hash]

The `value` parameter can be an instance of {OvirtSDK4::Cluster} or a hash. If it is a hash then a new instance will be created passing the hash as the `opts` parameter to the constructor.

# File lib/ovirtsdk4/types.rb, line 27038
def cluster=(value)
  if value.is_a?(Hash)
    value = Cluster.new(value)
  end
  @cluster = value
end
comment() click to toggle source

Returns the value of the `comment` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 27050
def comment
  @comment
end
comment=(value) click to toggle source

Sets the value of the `comment` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 27059
def comment=(value)
  @comment = value
end
description() click to toggle source

Returns the value of the `description` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 27068
def description
  @description
end
description=(value) click to toggle source

Sets the value of the `description` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 27077
def description=(value)
  @description = value
end
display() click to toggle source

Returns the value of the `display` attribute.

@return [Display]

# File lib/ovirtsdk4/types.rb, line 27086
def display
  @display
end
display=(value) click to toggle source

Sets the value of the `display` attribute.

@param value [Display, Hash]

The `value` parameter can be an instance of {OvirtSDK4::Display} or a hash. If it is a hash then a new instance will be created passing the hash as the `opts` parameter to the constructor.

# File lib/ovirtsdk4/types.rb, line 27099
def display=(value)
  if value.is_a?(Hash)
    value = Display.new(value)
  end
  @display = value
end
hash() click to toggle source

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Identified#hash
# File lib/ovirtsdk4/types.rb, line 27506
def hash
  super +
  @auto_storage_select.hash +
  @cluster.hash +
  @display.hash +
  @instance_type.hash +
  @max_user_vms.hash +
  @permissions.hash +
  @prestarted_vms.hash +
  @rng_device.hash +
  @size.hash +
  @soundcard_enabled.hash +
  @stateful.hash +
  @template.hash +
  @tpm_enabled.hash +
  @type.hash +
  @use_latest_template_version.hash +
  @vm.hash
end
id() click to toggle source

Returns the value of the `id` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 27111
def id
  @id
end
id=(value) click to toggle source

Sets the value of the `id` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 27120
def id=(value)
  @id = value
end
instance_type() click to toggle source

Returns the value of the `instance_type` attribute.

@return [InstanceType]

# File lib/ovirtsdk4/types.rb, line 27129
def instance_type
  @instance_type
end
instance_type=(value) click to toggle source

Sets the value of the `instance_type` attribute.

@param value [InstanceType, Hash]

The `value` parameter can be an instance of {OvirtSDK4::InstanceType} or a hash. If it is a hash then a new instance will be created passing the hash as the `opts` parameter to the constructor.

# File lib/ovirtsdk4/types.rb, line 27142
def instance_type=(value)
  if value.is_a?(Hash)
    value = InstanceType.new(value)
  end
  @instance_type = value
end
max_user_vms() click to toggle source

Returns the value of the `max_user_vms` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 27154
def max_user_vms
  @max_user_vms
end
max_user_vms=(value) click to toggle source

Sets the value of the `max_user_vms` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 27163
def max_user_vms=(value)
  @max_user_vms = value
end
name() click to toggle source

Returns the value of the `name` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 27172
def name
  @name
end
name=(value) click to toggle source

Sets the value of the `name` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 27181
def name=(value)
  @name = value
end
permissions() click to toggle source

Returns the value of the `permissions` attribute.

@return [Array<Permission>]

# File lib/ovirtsdk4/types.rb, line 27190
def permissions
  @permissions
end
permissions=(list) click to toggle source

Sets the value of the `permissions` attribute.

@param list [Array<Permission>]

# File lib/ovirtsdk4/types.rb, line 27199
def permissions=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Permission.new(value)
      end
    end
  end
  @permissions = list
end
prestarted_vms() click to toggle source

Returns the value of the `prestarted_vms` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 27216
def prestarted_vms
  @prestarted_vms
end
prestarted_vms=(value) click to toggle source

Sets the value of the `prestarted_vms` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 27225
def prestarted_vms=(value)
  @prestarted_vms = value
end
rng_device() click to toggle source

Returns the value of the `rng_device` attribute.

@return [RngDevice]

# File lib/ovirtsdk4/types.rb, line 27234
def rng_device
  @rng_device
end
rng_device=(value) click to toggle source

Sets the value of the `rng_device` attribute.

@param value [RngDevice, Hash]

The `value` parameter can be an instance of {OvirtSDK4::RngDevice} or a hash. If it is a hash then a new instance will be created passing the hash as the `opts` parameter to the constructor.

# File lib/ovirtsdk4/types.rb, line 27247
def rng_device=(value)
  if value.is_a?(Hash)
    value = RngDevice.new(value)
  end
  @rng_device = value
end
size() click to toggle source

Returns the value of the `size` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 27259
def size
  @size
end
size=(value) click to toggle source

Sets the value of the `size` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 27268
def size=(value)
  @size = value
end
soundcard_enabled() click to toggle source

Returns the value of the `soundcard_enabled` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 27277
def soundcard_enabled
  @soundcard_enabled
end
soundcard_enabled=(value) click to toggle source

Sets the value of the `soundcard_enabled` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 27286
def soundcard_enabled=(value)
  @soundcard_enabled = value
end
stateful() click to toggle source

Returns the value of the `stateful` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 27295
def stateful
  @stateful
end
stateful=(value) click to toggle source

Sets the value of the `stateful` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 27304
def stateful=(value)
  @stateful = value
end
template() click to toggle source

Returns the value of the `template` attribute.

@return [Template]

# File lib/ovirtsdk4/types.rb, line 27313
def template
  @template
end
template=(value) click to toggle source

Sets the value of the `template` attribute.

@param value [Template, Hash]

The `value` parameter can be an instance of {OvirtSDK4::Template} or a hash. If it is a hash then a new instance will be created passing the hash as the `opts` parameter to the constructor.

# File lib/ovirtsdk4/types.rb, line 27326
def template=(value)
  if value.is_a?(Hash)
    value = Template.new(value)
  end
  @template = value
end
tpm_enabled() click to toggle source

Returns the value of the `tpm_enabled` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 27338
def tpm_enabled
  @tpm_enabled
end
tpm_enabled=(value) click to toggle source

Sets the value of the `tpm_enabled` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 27347
def tpm_enabled=(value)
  @tpm_enabled = value
end
type() click to toggle source

Returns the value of the `type` attribute.

@return [VmPoolType]

# File lib/ovirtsdk4/types.rb, line 27356
def type
  @type
end
type=(value) click to toggle source

Sets the value of the `type` attribute.

@param value [VmPoolType]

# File lib/ovirtsdk4/types.rb, line 27365
def type=(value)
  @type = value
end
use_latest_template_version() click to toggle source

Returns the value of the `use_latest_template_version` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 27374
def use_latest_template_version
  @use_latest_template_version
end
use_latest_template_version=(value) click to toggle source

Sets the value of the `use_latest_template_version` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 27383
def use_latest_template_version=(value)
  @use_latest_template_version = value
end
vm() click to toggle source

Returns the value of the `vm` attribute.

@return [Vm]

# File lib/ovirtsdk4/types.rb, line 27392
def vm
  @vm
end
vm=(value) click to toggle source

Sets the value of the `vm` attribute.

@param value [Vm, Hash]

The `value` parameter can be an instance of {OvirtSDK4::Vm} or a hash. If it is a hash then a new instance will be created passing the hash as the `opts` parameter to the constructor.

# File lib/ovirtsdk4/types.rb, line 27405
def vm=(value)
  if value.is_a?(Hash)
    value = Vm.new(value)
  end
  @vm = value
end