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.



26146
26147
26148
26149
26150
26151
26152
26153
26154
26155
26156
26157
26158
26159
26160
26161
26162
26163
# File 'lib/ovirtsdk4/types.rb', line 26146

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.



26168
26169
26170
26171
26172
26173
26174
26175
26176
26177
26178
26179
26180
26181
26182
26183
26184
26185
# File 'lib/ovirtsdk4/types.rb', line 26168

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)


25713
25714
25715
# File 'lib/ovirtsdk4/types.rb', line 25713

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)


25722
25723
25724
# File 'lib/ovirtsdk4/types.rb', line 25722

def auto_storage_select=(value)
  @auto_storage_select = value
end

#clusterCluster

Returns the value of the cluster attribute.

Returns:



25731
25732
25733
# File 'lib/ovirtsdk4/types.rb', line 25731

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:



25744
25745
25746
25747
25748
25749
# File 'lib/ovirtsdk4/types.rb', line 25744

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)


25756
25757
25758
# File 'lib/ovirtsdk4/types.rb', line 25756

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


25765
25766
25767
# File 'lib/ovirtsdk4/types.rb', line 25765

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


25774
25775
25776
# File 'lib/ovirtsdk4/types.rb', line 25774

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


25783
25784
25785
# File 'lib/ovirtsdk4/types.rb', line 25783

def description=(value)
  @description = value
end

#displayDisplay

Returns the value of the display attribute.

Returns:



25792
25793
25794
# File 'lib/ovirtsdk4/types.rb', line 25792

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:



25805
25806
25807
25808
25809
25810
# File 'lib/ovirtsdk4/types.rb', line 25805

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

#hashObject

Generates a hash value for this object.



26190
26191
26192
26193
26194
26195
26196
26197
26198
26199
26200
26201
26202
26203
26204
26205
26206
26207
# File 'lib/ovirtsdk4/types.rb', line 26190

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)


25817
25818
25819
# File 'lib/ovirtsdk4/types.rb', line 25817

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


25826
25827
25828
# File 'lib/ovirtsdk4/types.rb', line 25826

def id=(value)
  @id = value
end

#instance_typeInstanceType

Returns the value of the instance_type attribute.

Returns:



25835
25836
25837
# File 'lib/ovirtsdk4/types.rb', line 25835

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:



25848
25849
25850
25851
25852
25853
# File 'lib/ovirtsdk4/types.rb', line 25848

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)


25860
25861
25862
# File 'lib/ovirtsdk4/types.rb', line 25860

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)


25869
25870
25871
# File 'lib/ovirtsdk4/types.rb', line 25869

def max_user_vms=(value)
  @max_user_vms = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


25878
25879
25880
# File 'lib/ovirtsdk4/types.rb', line 25878

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


25887
25888
25889
# File 'lib/ovirtsdk4/types.rb', line 25887

def name=(value)
  @name = value
end

#permissionsArray<Permission>

Returns the value of the permissions attribute.

Returns:



25896
25897
25898
# File 'lib/ovirtsdk4/types.rb', line 25896

def permissions
  @permissions
end

#permissions=(list) ⇒ Object

Sets the value of the permissions attribute.

Parameters:



25905
25906
25907
25908
25909
25910
25911
25912
25913
25914
25915
# File 'lib/ovirtsdk4/types.rb', line 25905

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)


25922
25923
25924
# File 'lib/ovirtsdk4/types.rb', line 25922

def prestarted_vms
  @prestarted_vms
end

#prestarted_vms=(value) ⇒ Object

Sets the value of the prestarted_vms attribute.

Parameters:

  • value (Integer)


25931
25932
25933
# File 'lib/ovirtsdk4/types.rb', line 25931

def prestarted_vms=(value)
  @prestarted_vms = value
end

#rng_deviceRngDevice

Returns the value of the rng_device attribute.

Returns:



25940
25941
25942
# File 'lib/ovirtsdk4/types.rb', line 25940

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:



25953
25954
25955
25956
25957
25958
# File 'lib/ovirtsdk4/types.rb', line 25953

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)


25965
25966
25967
# File 'lib/ovirtsdk4/types.rb', line 25965

def size
  @size
end

#size=(value) ⇒ Object

Sets the value of the size attribute.

Parameters:

  • value (Integer)


25974
25975
25976
# File 'lib/ovirtsdk4/types.rb', line 25974

def size=(value)
  @size = value
end

#soundcard_enabledBoolean

Returns the value of the soundcard_enabled attribute.

Returns:

  • (Boolean)


25983
25984
25985
# File 'lib/ovirtsdk4/types.rb', line 25983

def soundcard_enabled
  @soundcard_enabled
end

#soundcard_enabled=(value) ⇒ Object

Sets the value of the soundcard_enabled attribute.

Parameters:

  • value (Boolean)


25992
25993
25994
# File 'lib/ovirtsdk4/types.rb', line 25992

def soundcard_enabled=(value)
  @soundcard_enabled = value
end

#statefulBoolean

Returns the value of the stateful attribute.

Returns:

  • (Boolean)


26001
26002
26003
# File 'lib/ovirtsdk4/types.rb', line 26001

def stateful
  @stateful
end

#stateful=(value) ⇒ Object

Sets the value of the stateful attribute.

Parameters:

  • value (Boolean)


26010
26011
26012
# File 'lib/ovirtsdk4/types.rb', line 26010

def stateful=(value)
  @stateful = value
end

#templateTemplate

Returns the value of the template attribute.

Returns:



26019
26020
26021
# File 'lib/ovirtsdk4/types.rb', line 26019

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:



26032
26033
26034
26035
26036
26037
# File 'lib/ovirtsdk4/types.rb', line 26032

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:



26044
26045
26046
# File 'lib/ovirtsdk4/types.rb', line 26044

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:



26053
26054
26055
# File 'lib/ovirtsdk4/types.rb', line 26053

def type=(value)
  @type = value
end

#use_latest_template_versionBoolean

Returns the value of the use_latest_template_version attribute.

Returns:

  • (Boolean)


26062
26063
26064
# File 'lib/ovirtsdk4/types.rb', line 26062

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)


26071
26072
26073
# File 'lib/ovirtsdk4/types.rb', line 26071

def use_latest_template_version=(value)
  @use_latest_template_version = value
end

#vmVm

Returns the value of the vm attribute.

Returns:



26080
26081
26082
# File 'lib/ovirtsdk4/types.rb', line 26080

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)


26093
26094
26095
26096
26097
26098
# File 'lib/ovirtsdk4/types.rb', line 26093

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