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

#href, #href=

Constructor Details

- (VmPool) initialize(opts = {})

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):

  • :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.



20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
# File 'lib/ovirtsdk4/types.rb', line 20101

def initialize(opts = {})
  super(opts)
  self.cluster = opts[:cluster]
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.display = opts[:display]
  self.id = opts[:id]
  self.instance_type = opts[:instance_type]
  self.max_user_vms = opts[:max_user_vms]
  self.name = opts[:name]
  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

- (Cluster) cluster

Returns the value of the cluster attribute.

Returns:



19689
19690
19691
# File 'lib/ovirtsdk4/types.rb', line 19689

def cluster
  return @cluster
end

- (Object) cluster=(value)

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:



19702
19703
19704
19705
19706
19707
# File 'lib/ovirtsdk4/types.rb', line 19702

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

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


19714
19715
19716
# File 'lib/ovirtsdk4/types.rb', line 19714

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


19723
19724
19725
# File 'lib/ovirtsdk4/types.rb', line 19723

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


19732
19733
19734
# File 'lib/ovirtsdk4/types.rb', line 19732

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


19741
19742
19743
# File 'lib/ovirtsdk4/types.rb', line 19741

def description=(value)
  @description = value
end

- (Display) display

Returns the value of the display attribute.

Returns:



19750
19751
19752
# File 'lib/ovirtsdk4/types.rb', line 19750

def display
  return @display
end

- (Object) display=(value)

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:



19763
19764
19765
19766
19767
19768
# File 'lib/ovirtsdk4/types.rb', line 19763

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

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


19775
19776
19777
# File 'lib/ovirtsdk4/types.rb', line 19775

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


19784
19785
19786
# File 'lib/ovirtsdk4/types.rb', line 19784

def id=(value)
  @id = value
end

- (InstanceType) instance_type

Returns the value of the instance_type attribute.

Returns:



19793
19794
19795
# File 'lib/ovirtsdk4/types.rb', line 19793

def instance_type
  return @instance_type
end

- (Object) instance_type=(value)

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:



19806
19807
19808
19809
19810
19811
# File 'lib/ovirtsdk4/types.rb', line 19806

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

- (Integer) max_user_vms

Returns the value of the max_user_vms attribute.

Returns:

  • (Integer)


19818
19819
19820
# File 'lib/ovirtsdk4/types.rb', line 19818

def max_user_vms
  return @max_user_vms
end

- (Object) max_user_vms=(value)

Sets the value of the max_user_vms attribute.

Parameters:

  • value (Integer)


19827
19828
19829
# File 'lib/ovirtsdk4/types.rb', line 19827

def max_user_vms=(value)
  @max_user_vms = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


19836
19837
19838
# File 'lib/ovirtsdk4/types.rb', line 19836

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


19845
19846
19847
# File 'lib/ovirtsdk4/types.rb', line 19845

def name=(value)
  @name = value
end

- (Array<Permission>) permissions

Returns the value of the permissions attribute.

Returns:



19854
19855
19856
# File 'lib/ovirtsdk4/types.rb', line 19854

def permissions
  return @permissions
end

- (Object) permissions=(list)

Sets the value of the permissions attribute.

Parameters:



19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
# File 'lib/ovirtsdk4/types.rb', line 19862

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

- (Integer) prestarted_vms

Returns the value of the prestarted_vms attribute.

Returns:

  • (Integer)


19879
19880
19881
# File 'lib/ovirtsdk4/types.rb', line 19879

def prestarted_vms
  return @prestarted_vms
end

- (Object) prestarted_vms=(value)

Sets the value of the prestarted_vms attribute.

Parameters:

  • value (Integer)


19888
19889
19890
# File 'lib/ovirtsdk4/types.rb', line 19888

def prestarted_vms=(value)
  @prestarted_vms = value
end

- (RngDevice) rng_device

Returns the value of the rng_device attribute.

Returns:



19897
19898
19899
# File 'lib/ovirtsdk4/types.rb', line 19897

def rng_device
  return @rng_device
end

- (Object) rng_device=(value)

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:



19910
19911
19912
19913
19914
19915
# File 'lib/ovirtsdk4/types.rb', line 19910

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

- (Integer) size

Returns the value of the size attribute.

Returns:

  • (Integer)


19922
19923
19924
# File 'lib/ovirtsdk4/types.rb', line 19922

def size
  return @size
end

- (Object) size=(value)

Sets the value of the size attribute.

Parameters:

  • value (Integer)


19931
19932
19933
# File 'lib/ovirtsdk4/types.rb', line 19931

def size=(value)
  @size = value
end

- (Boolean) soundcard_enabled

Returns the value of the soundcard_enabled attribute.

Returns:

  • (Boolean)


19940
19941
19942
# File 'lib/ovirtsdk4/types.rb', line 19940

def soundcard_enabled
  return @soundcard_enabled
end

- (Object) soundcard_enabled=(value)

Sets the value of the soundcard_enabled attribute.

Parameters:

  • value (Boolean)


19949
19950
19951
# File 'lib/ovirtsdk4/types.rb', line 19949

def soundcard_enabled=(value)
  @soundcard_enabled = value
end

- (Boolean) stateful

Returns the value of the stateful attribute.

Returns:

  • (Boolean)


19958
19959
19960
# File 'lib/ovirtsdk4/types.rb', line 19958

def stateful
  return @stateful
end

- (Object) stateful=(value)

Sets the value of the stateful attribute.

Parameters:

  • value (Boolean)


19967
19968
19969
# File 'lib/ovirtsdk4/types.rb', line 19967

def stateful=(value)
  @stateful = value
end

- (Template) template

Returns the value of the template attribute.

Returns:



19976
19977
19978
# File 'lib/ovirtsdk4/types.rb', line 19976

def template
  return @template
end

- (Object) template=(value)

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:



19989
19990
19991
19992
19993
19994
# File 'lib/ovirtsdk4/types.rb', line 19989

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

- (VmPoolType) type

Returns the value of the type attribute.

Returns:



20001
20002
20003
# File 'lib/ovirtsdk4/types.rb', line 20001

def type
  return @type
end

- (Object) type=(value)

Sets the value of the type attribute.

Parameters:



20010
20011
20012
# File 'lib/ovirtsdk4/types.rb', line 20010

def type=(value)
  @type = value
end

- (Boolean) use_latest_template_version

Returns the value of the use_latest_template_version attribute.

Returns:

  • (Boolean)


20019
20020
20021
# File 'lib/ovirtsdk4/types.rb', line 20019

def use_latest_template_version
  return @use_latest_template_version
end

- (Object) use_latest_template_version=(value)

Sets the value of the use_latest_template_version attribute.

Parameters:

  • value (Boolean)


20028
20029
20030
# File 'lib/ovirtsdk4/types.rb', line 20028

def use_latest_template_version=(value)
  @use_latest_template_version = value
end

- (Vm) vm

Returns the value of the vm attribute.

Returns:



20037
20038
20039
# File 'lib/ovirtsdk4/types.rb', line 20037

def vm
  return @vm
end

- (Object) vm=(value)

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)


20050
20051
20052
20053
20054
20055
# File 'lib/ovirtsdk4/types.rb', line 20050

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