Class: OvirtSDK4::AffinityGroup
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::AffinityGroup
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary (collapse)
-
- (Cluster) cluster
Returns the value of the
cluster
attribute. -
- (Object) cluster=(value)
Sets the value of the
cluster
attribute. -
- (String) comment
Returns the value of the
comment
attribute. -
- (Object) comment=(value)
Sets the value of the
comment
attribute. -
- (String) description
Returns the value of the
description
attribute. -
- (Object) description=(value)
Sets the value of the
description
attribute. -
- (Boolean) enforcing
Returns the value of the
enforcing
attribute. -
- (Object) enforcing=(value)
Sets the value of the
enforcing
attribute. -
- (String) id
Returns the value of the
id
attribute. -
- (Object) id=(value)
Sets the value of the
id
attribute. -
- (AffinityGroup) initialize(opts = {})
constructor
Creates a new instance of the AffinityGroup class.
-
- (String) name
Returns the value of the
name
attribute. -
- (Object) name=(value)
Sets the value of the
name
attribute. -
- (Boolean) positive
Returns the value of the
positive
attribute. -
- (Object) positive=(value)
Sets the value of the
positive
attribute. -
- (Array<Vm>) vms
Returns the value of the
vms
attribute. -
- (Object) vms=(list)
Sets the value of the
vms
attribute.
Methods included from Type
Constructor Details
- (AffinityGroup) initialize(opts = {})
Creates a new instance of the OvirtSDK4::AffinityGroup class.
22553 22554 22555 22556 22557 22558 22559 22560 22561 22562 22563 |
# File 'lib/ovirtsdk4/types.rb', line 22553 def initialize(opts = {}) super(opts) self.cluster = opts[:cluster] self.comment = opts[:comment] self.description = opts[:description] self.enforcing = opts[:enforcing] self.id = opts[:id] self.name = opts[:name] self.positive = opts[:positive] self.vms = opts[:vms] end |
Instance Method Details
- (Cluster) cluster
Returns the value of the cluster
attribute.
22376 22377 22378 |
# File 'lib/ovirtsdk4/types.rb', line 22376 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.
22389 22390 22391 22392 22393 22394 |
# File 'lib/ovirtsdk4/types.rb', line 22389 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.
22401 22402 22403 |
# File 'lib/ovirtsdk4/types.rb', line 22401 def comment return @comment end |
- (Object) comment=(value)
Sets the value of the comment
attribute.
22410 22411 22412 |
# File 'lib/ovirtsdk4/types.rb', line 22410 def comment=(value) @comment = value end |
- (String) description
Returns the value of the description
attribute.
22419 22420 22421 |
# File 'lib/ovirtsdk4/types.rb', line 22419 def description return @description end |
- (Object) description=(value)
Sets the value of the description
attribute.
22428 22429 22430 |
# File 'lib/ovirtsdk4/types.rb', line 22428 def description=(value) @description = value end |
- (Boolean) enforcing
Returns the value of the enforcing
attribute.
22437 22438 22439 |
# File 'lib/ovirtsdk4/types.rb', line 22437 def enforcing return @enforcing end |
- (Object) enforcing=(value)
Sets the value of the enforcing
attribute.
22446 22447 22448 |
# File 'lib/ovirtsdk4/types.rb', line 22446 def enforcing=(value) @enforcing = value end |
- (String) id
Returns the value of the id
attribute.
22455 22456 22457 |
# File 'lib/ovirtsdk4/types.rb', line 22455 def id return @id end |
- (Object) id=(value)
Sets the value of the id
attribute.
22464 22465 22466 |
# File 'lib/ovirtsdk4/types.rb', line 22464 def id=(value) @id = value end |
- (String) name
Returns the value of the name
attribute.
22473 22474 22475 |
# File 'lib/ovirtsdk4/types.rb', line 22473 def name return @name end |
- (Object) name=(value)
Sets the value of the name
attribute.
22482 22483 22484 |
# File 'lib/ovirtsdk4/types.rb', line 22482 def name=(value) @name = value end |
- (Boolean) positive
Returns the value of the positive
attribute.
22491 22492 22493 |
# File 'lib/ovirtsdk4/types.rb', line 22491 def positive return @positive end |
- (Object) positive=(value)
Sets the value of the positive
attribute.
22500 22501 22502 |
# File 'lib/ovirtsdk4/types.rb', line 22500 def positive=(value) @positive = value end |
- (Array<Vm>) vms
Returns the value of the vms
attribute.
22509 22510 22511 |
# File 'lib/ovirtsdk4/types.rb', line 22509 def vms return @vms end |
- (Object) vms=(list)
Sets the value of the vms
attribute.
22517 22518 22519 22520 22521 22522 22523 22524 22525 22526 22527 |
# File 'lib/ovirtsdk4/types.rb', line 22517 def vms=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Vm.new(value) end end end @vms = list end |