Class: OvirtSDK4::VmPool

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ VmPool

Creates a new instance of the OvirtSDK4::VmPool class.

Parameters:

  • opts (Hash) (defaults to: {})

    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.

Options Hash (opts):

  • :auto_storage_select (Boolean)

    The value of attribute auto_storage_select.

  • :cluster (Cluster, Hash)

    The value of attribute cluster.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :display (Display, Hash)

    The value of attribute display.

  • :id (String)

    The value of attribute id.

  • :instance_type (InstanceType, Hash)

    The value of attribute instance_type.

  • :max_user_vms (Integer)

    The value of attribute max_user_vms.

  • :name (String)

    The value of attribute name.

  • :permissions (Array<Permission>, Array<Hash>)

    The values of attribute permissions.

  • :prestarted_vms (Integer)

    The value of attribute prestarted_vms.

  • :rng_device (RngDevice, Hash)

    The value of attribute rng_device.

  • :size (Integer)

    The value of attribute size.

  • :soundcard_enabled (Boolean)

    The value of attribute soundcard_enabled.

  • :stateful (Boolean)

    The value of attribute stateful.

  • :template (Template, Hash)

    The value of attribute template.

  • :type (VmPoolType)

    The value of attribute type.

  • :use_latest_template_version (Boolean)

    The value of attribute use_latest_template_version.

  • :vm (Vm, Hash)

    The value of attribute vm.



26875
26876
26877
26878
26879
26880
26881
26882
26883
26884
26885
26886
26887
26888
26889
26890
26891
26892
# File 'lib/ovirtsdk4/types.rb', line 26875

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.type = opts[:type]
  self.use_latest_template_version = opts[:use_latest_template_version]
  self.vm = opts[:vm]
end

Instance Method Details

#==(other) ⇒ Object

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



26897
26898
26899
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
26911
26912
26913
26914
# File 'lib/ovirtsdk4/types.rb', line 26897

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 &&
  @type == other.type &&
  @use_latest_template_version == other.use_latest_template_version &&
  @vm == other.vm
end

#auto_storage_selectBoolean

Returns the value of the auto_storage_select attribute.

Returns:

  • (Boolean)


26442
26443
26444
# File 'lib/ovirtsdk4/types.rb', line 26442

def auto_storage_select
  @auto_storage_select
end

#auto_storage_select=(value) ⇒ Object

Sets the value of the auto_storage_select attribute.

Parameters:

  • value (Boolean)


26451
26452
26453
# File 'lib/ovirtsdk4/types.rb', line 26451

def auto_storage_select=(value)
  @auto_storage_select = value
end

#clusterCluster

Returns the value of the cluster attribute.

Returns:



26460
26461
26462
# File 'lib/ovirtsdk4/types.rb', line 26460

def cluster
  @cluster
end

#cluster=(value) ⇒ Object

Sets the value of the cluster attribute.

The value parameter can be an instance of 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.

Parameters:



26473
26474
26475
26476
26477
26478
# File 'lib/ovirtsdk4/types.rb', line 26473

def cluster=(value)
  if value.is_a?(Hash)
    value = Cluster.new(value)
  end
  @cluster = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


26485
26486
26487
# File 'lib/ovirtsdk4/types.rb', line 26485

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


26494
26495
26496
# File 'lib/ovirtsdk4/types.rb', line 26494

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


26503
26504
26505
# File 'lib/ovirtsdk4/types.rb', line 26503

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


26512
26513
26514
# File 'lib/ovirtsdk4/types.rb', line 26512

def description=(value)
  @description = value
end

#displayDisplay

Returns the value of the display attribute.

Returns:



26521
26522
26523
# File 'lib/ovirtsdk4/types.rb', line 26521

def display
  @display
end

#display=(value) ⇒ Object

Sets the value of the display attribute.

The value parameter can be an instance of 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.

Parameters:



26534
26535
26536
26537
26538
26539
# File 'lib/ovirtsdk4/types.rb', line 26534

def display=(value)
  if value.is_a?(Hash)
    value = Display.new(value)
  end
  @display = value
end

#hashObject

Generates a hash value for this object.



26919
26920
26921
26922
26923
26924
26925
26926
26927
26928
26929
26930
26931
26932
26933
26934
26935
26936
# File 'lib/ovirtsdk4/types.rb', line 26919

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 +
  @type.hash +
  @use_latest_template_version.hash +
  @vm.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


26546
26547
26548
# File 'lib/ovirtsdk4/types.rb', line 26546

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


26555
26556
26557
# File 'lib/ovirtsdk4/types.rb', line 26555

def id=(value)
  @id = value
end

#instance_typeInstanceType

Returns the value of the instance_type attribute.

Returns:



26564
26565
26566
# File 'lib/ovirtsdk4/types.rb', line 26564

def instance_type
  @instance_type
end

#instance_type=(value) ⇒ Object

Sets the value of the instance_type attribute.

The value parameter can be an instance of 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.

Parameters:



26577
26578
26579
26580
26581
26582
# File 'lib/ovirtsdk4/types.rb', line 26577

def instance_type=(value)
  if value.is_a?(Hash)
    value = InstanceType.new(value)
  end
  @instance_type = value
end

#max_user_vmsInteger

Returns the value of the max_user_vms attribute.

Returns:

  • (Integer)


26589
26590
26591
# File 'lib/ovirtsdk4/types.rb', line 26589

def max_user_vms
  @max_user_vms
end

#max_user_vms=(value) ⇒ Object

Sets the value of the max_user_vms attribute.

Parameters:

  • value (Integer)


26598
26599
26600
# File 'lib/ovirtsdk4/types.rb', line 26598

def max_user_vms=(value)
  @max_user_vms = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


26607
26608
26609
# File 'lib/ovirtsdk4/types.rb', line 26607

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


26616
26617
26618
# File 'lib/ovirtsdk4/types.rb', line 26616

def name=(value)
  @name = value
end

#permissionsArray<Permission>

Returns the value of the permissions attribute.

Returns:



26625
26626
26627
# File 'lib/ovirtsdk4/types.rb', line 26625

def permissions
  @permissions
end

#permissions=(list) ⇒ Object

Sets the value of the permissions attribute.

Parameters:



26634
26635
26636
26637
26638
26639
26640
26641
26642
26643
26644
# File 'lib/ovirtsdk4/types.rb', line 26634

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_vmsInteger

Returns the value of the prestarted_vms attribute.

Returns:

  • (Integer)


26651
26652
26653
# File 'lib/ovirtsdk4/types.rb', line 26651

def prestarted_vms
  @prestarted_vms
end

#prestarted_vms=(value) ⇒ Object

Sets the value of the prestarted_vms attribute.

Parameters:

  • value (Integer)


26660
26661
26662
# File 'lib/ovirtsdk4/types.rb', line 26660

def prestarted_vms=(value)
  @prestarted_vms = value
end

#rng_deviceRngDevice

Returns the value of the rng_device attribute.

Returns:



26669
26670
26671
# File 'lib/ovirtsdk4/types.rb', line 26669

def rng_device
  @rng_device
end

#rng_device=(value) ⇒ Object

Sets the value of the rng_device attribute.

The value parameter can be an instance of 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.

Parameters:



26682
26683
26684
26685
26686
26687
# File 'lib/ovirtsdk4/types.rb', line 26682

def rng_device=(value)
  if value.is_a?(Hash)
    value = RngDevice.new(value)
  end
  @rng_device = value
end

#sizeInteger

Returns the value of the size attribute.

Returns:

  • (Integer)


26694
26695
26696
# File 'lib/ovirtsdk4/types.rb', line 26694

def size
  @size
end

#size=(value) ⇒ Object

Sets the value of the size attribute.

Parameters:

  • value (Integer)


26703
26704
26705
# File 'lib/ovirtsdk4/types.rb', line 26703

def size=(value)
  @size = value
end

#soundcard_enabledBoolean

Returns the value of the soundcard_enabled attribute.

Returns:

  • (Boolean)


26712
26713
26714
# File 'lib/ovirtsdk4/types.rb', line 26712

def soundcard_enabled
  @soundcard_enabled
end

#soundcard_enabled=(value) ⇒ Object

Sets the value of the soundcard_enabled attribute.

Parameters:

  • value (Boolean)


26721
26722
26723
# File 'lib/ovirtsdk4/types.rb', line 26721

def soundcard_enabled=(value)
  @soundcard_enabled = value
end

#statefulBoolean

Returns the value of the stateful attribute.

Returns:

  • (Boolean)


26730
26731
26732
# File 'lib/ovirtsdk4/types.rb', line 26730

def stateful
  @stateful
end

#stateful=(value) ⇒ Object

Sets the value of the stateful attribute.

Parameters:

  • value (Boolean)


26739
26740
26741
# File 'lib/ovirtsdk4/types.rb', line 26739

def stateful=(value)
  @stateful = value
end

#templateTemplate

Returns the value of the template attribute.

Returns:



26748
26749
26750
# File 'lib/ovirtsdk4/types.rb', line 26748

def template
  @template
end

#template=(value) ⇒ Object

Sets the value of the template attribute.

The value parameter can be an instance of 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.

Parameters:



26761
26762
26763
26764
26765
26766
# File 'lib/ovirtsdk4/types.rb', line 26761

def template=(value)
  if value.is_a?(Hash)
    value = Template.new(value)
  end
  @template = value
end

#typeVmPoolType

Returns the value of the type attribute.

Returns:



26773
26774
26775
# File 'lib/ovirtsdk4/types.rb', line 26773

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:



26782
26783
26784
# File 'lib/ovirtsdk4/types.rb', line 26782

def type=(value)
  @type = value
end

#use_latest_template_versionBoolean

Returns the value of the use_latest_template_version attribute.

Returns:

  • (Boolean)


26791
26792
26793
# File 'lib/ovirtsdk4/types.rb', line 26791

def use_latest_template_version
  @use_latest_template_version
end

#use_latest_template_version=(value) ⇒ Object

Sets the value of the use_latest_template_version attribute.

Parameters:

  • value (Boolean)


26800
26801
26802
# File 'lib/ovirtsdk4/types.rb', line 26800

def use_latest_template_version=(value)
  @use_latest_template_version = value
end

#vmVm

Returns the value of the vm attribute.

Returns:



26809
26810
26811
# File 'lib/ovirtsdk4/types.rb', line 26809

def vm
  @vm
end

#vm=(value) ⇒ Object

Sets the value of the vm attribute.

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.

Parameters:

  • value (Vm, Hash)


26822
26823
26824
26825
26826
26827
# File 'lib/ovirtsdk4/types.rb', line 26822

def vm=(value)
  if value.is_a?(Hash)
    value = Vm.new(value)
  end
  @vm = value
end