Class: OvirtSDK4::AffinityGroup
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::AffinityGroup
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
trueifselfandotherhave the same attributes and values. -
#broken ⇒ Boolean
Returns the value of the
brokenattribute. -
#broken=(value) ⇒ Object
Sets the value of the
brokenattribute. -
#cluster ⇒ Cluster
Returns the value of the
clusterattribute. -
#cluster=(value) ⇒ Object
Sets the value of the
clusterattribute. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#enforcing ⇒ Boolean
Returns the value of the
enforcingattribute. -
#enforcing=(value) ⇒ Object
Sets the value of the
enforcingattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host_labels ⇒ Array<AffinityLabel>
Returns the value of the
host_labelsattribute. -
#host_labels=(list) ⇒ Object
Sets the value of the
host_labelsattribute. -
#hosts ⇒ Array<Host>
Returns the value of the
hostsattribute. -
#hosts=(list) ⇒ Object
Sets the value of the
hostsattribute. -
#hosts_rule ⇒ AffinityRule
Returns the value of the
hosts_ruleattribute. -
#hosts_rule=(value) ⇒ Object
Sets the value of the
hosts_ruleattribute. -
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ AffinityGroup
constructor
Creates a new instance of the AffinityGroup class.
-
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#positive ⇒ Boolean
Returns the value of the
positiveattribute. -
#positive=(value) ⇒ Object
Sets the value of the
positiveattribute. -
#priority ⇒ Float
Returns the value of the
priorityattribute. -
#priority=(value) ⇒ Object
Sets the value of the
priorityattribute. -
#vm_labels ⇒ Array<AffinityLabel>
Returns the value of the
vm_labelsattribute. -
#vm_labels=(list) ⇒ Object
Sets the value of the
vm_labelsattribute. -
#vms ⇒ Array<Vm>
Returns the value of the
vmsattribute. -
#vms=(list) ⇒ Object
Sets the value of the
vmsattribute. -
#vms_rule ⇒ AffinityRule
Returns the value of the
vms_ruleattribute. -
#vms_rule=(value) ⇒ Object
Sets the value of the
vms_ruleattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ AffinityGroup
Creates a new instance of the OvirtSDK4::AffinityGroup class.
31674 31675 31676 31677 31678 31679 31680 31681 31682 31683 31684 31685 31686 31687 |
# File 'lib/ovirtsdk4/types.rb', line 31674 def initialize(opts = {}) super(opts) self.broken = opts[:broken] self.cluster = opts[:cluster] self.enforcing = opts[:enforcing] self.host_labels = opts[:host_labels] self.hosts = opts[:hosts] self.hosts_rule = opts[:hosts_rule] self.positive = opts[:positive] self.priority = opts[:priority] self.vm_labels = opts[:vm_labels] self.vms = opts[:vms] self.vms_rule = opts[:vms_rule] end |
Instance Method Details
#==(other) ⇒ Object
Returns true if self and other have the same attributes and values.
31692 31693 31694 31695 31696 31697 31698 31699 31700 31701 31702 31703 31704 31705 |
# File 'lib/ovirtsdk4/types.rb', line 31692 def ==(other) super && @broken == other.broken && @cluster == other.cluster && @enforcing == other.enforcing && @host_labels == other.host_labels && @hosts == other.hosts && @hosts_rule == other.hosts_rule && @positive == other.positive && @priority == other.priority && @vm_labels == other.vm_labels && @vms == other.vms && @vms_rule == other.vms_rule end |
#broken ⇒ Boolean
Returns the value of the broken attribute.
31318 31319 31320 |
# File 'lib/ovirtsdk4/types.rb', line 31318 def broken @broken end |
#broken=(value) ⇒ Object
Sets the value of the broken attribute.
31327 31328 31329 |
# File 'lib/ovirtsdk4/types.rb', line 31327 def broken=(value) @broken = value end |
#cluster ⇒ Cluster
Returns the value of the cluster attribute.
31336 31337 31338 |
# File 'lib/ovirtsdk4/types.rb', line 31336 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.
31349 31350 31351 31352 31353 31354 |
# File 'lib/ovirtsdk4/types.rb', line 31349 def cluster=(value) if value.is_a?(Hash) value = Cluster.new(value) end @cluster = value end |
#comment ⇒ String
Returns the value of the comment attribute.
31361 31362 31363 |
# File 'lib/ovirtsdk4/types.rb', line 31361 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
31370 31371 31372 |
# File 'lib/ovirtsdk4/types.rb', line 31370 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
31379 31380 31381 |
# File 'lib/ovirtsdk4/types.rb', line 31379 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
31388 31389 31390 |
# File 'lib/ovirtsdk4/types.rb', line 31388 def description=(value) @description = value end |
#enforcing ⇒ Boolean
Returns the value of the enforcing attribute.
31397 31398 31399 |
# File 'lib/ovirtsdk4/types.rb', line 31397 def enforcing @enforcing end |
#enforcing=(value) ⇒ Object
Sets the value of the enforcing attribute.
31406 31407 31408 |
# File 'lib/ovirtsdk4/types.rb', line 31406 def enforcing=(value) @enforcing = value end |
#hash ⇒ Object
Generates a hash value for this object.
31710 31711 31712 31713 31714 31715 31716 31717 31718 31719 31720 31721 31722 31723 |
# File 'lib/ovirtsdk4/types.rb', line 31710 def hash super + @broken.hash + @cluster.hash + @enforcing.hash + @host_labels.hash + @hosts.hash + @hosts_rule.hash + @positive.hash + @priority.hash + @vm_labels.hash + @vms.hash + @vms_rule.hash end |
#host_labels ⇒ Array<AffinityLabel>
Returns the value of the host_labels attribute.
31415 31416 31417 |
# File 'lib/ovirtsdk4/types.rb', line 31415 def host_labels @host_labels end |
#host_labels=(list) ⇒ Object
Sets the value of the host_labels attribute.
31424 31425 31426 31427 31428 31429 31430 31431 31432 31433 31434 |
# File 'lib/ovirtsdk4/types.rb', line 31424 def host_labels=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = AffinityLabel.new(value) end end end @host_labels = list end |
#hosts ⇒ Array<Host>
Returns the value of the hosts attribute.
31441 31442 31443 |
# File 'lib/ovirtsdk4/types.rb', line 31441 def hosts @hosts end |
#hosts=(list) ⇒ Object
Sets the value of the hosts attribute.
31450 31451 31452 31453 31454 31455 31456 31457 31458 31459 31460 |
# File 'lib/ovirtsdk4/types.rb', line 31450 def hosts=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Host.new(value) end end end @hosts = list end |
#hosts_rule ⇒ AffinityRule
Returns the value of the hosts_rule attribute.
31467 31468 31469 |
# File 'lib/ovirtsdk4/types.rb', line 31467 def hosts_rule @hosts_rule end |
#hosts_rule=(value) ⇒ Object
Sets the value of the hosts_rule attribute.
The value parameter can be an instance of OvirtSDK4::AffinityRule 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.
31480 31481 31482 31483 31484 31485 |
# File 'lib/ovirtsdk4/types.rb', line 31480 def hosts_rule=(value) if value.is_a?(Hash) value = AffinityRule.new(value) end @hosts_rule = value end |
#id ⇒ String
Returns the value of the id attribute.
31492 31493 31494 |
# File 'lib/ovirtsdk4/types.rb', line 31492 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
31501 31502 31503 |
# File 'lib/ovirtsdk4/types.rb', line 31501 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name attribute.
31510 31511 31512 |
# File 'lib/ovirtsdk4/types.rb', line 31510 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
31519 31520 31521 |
# File 'lib/ovirtsdk4/types.rb', line 31519 def name=(value) @name = value end |
#positive ⇒ Boolean
Returns the value of the positive attribute.
31528 31529 31530 |
# File 'lib/ovirtsdk4/types.rb', line 31528 def positive @positive end |
#positive=(value) ⇒ Object
Sets the value of the positive attribute.
31537 31538 31539 |
# File 'lib/ovirtsdk4/types.rb', line 31537 def positive=(value) @positive = value end |
#priority ⇒ Float
Returns the value of the priority attribute.
31546 31547 31548 |
# File 'lib/ovirtsdk4/types.rb', line 31546 def priority @priority end |
#priority=(value) ⇒ Object
Sets the value of the priority attribute.
31555 31556 31557 |
# File 'lib/ovirtsdk4/types.rb', line 31555 def priority=(value) @priority = value end |
#vm_labels ⇒ Array<AffinityLabel>
Returns the value of the vm_labels attribute.
31564 31565 31566 |
# File 'lib/ovirtsdk4/types.rb', line 31564 def vm_labels @vm_labels end |
#vm_labels=(list) ⇒ Object
Sets the value of the vm_labels attribute.
31573 31574 31575 31576 31577 31578 31579 31580 31581 31582 31583 |
# File 'lib/ovirtsdk4/types.rb', line 31573 def vm_labels=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = AffinityLabel.new(value) end end end @vm_labels = list end |
#vms ⇒ Array<Vm>
Returns the value of the vms attribute.
31590 31591 31592 |
# File 'lib/ovirtsdk4/types.rb', line 31590 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms attribute.
31599 31600 31601 31602 31603 31604 31605 31606 31607 31608 31609 |
# File 'lib/ovirtsdk4/types.rb', line 31599 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 |
#vms_rule ⇒ AffinityRule
Returns the value of the vms_rule attribute.
31616 31617 31618 |
# File 'lib/ovirtsdk4/types.rb', line 31616 def vms_rule @vms_rule end |
#vms_rule=(value) ⇒ Object
Sets the value of the vms_rule attribute.
The value parameter can be an instance of OvirtSDK4::AffinityRule 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.
31629 31630 31631 31632 31633 31634 |
# File 'lib/ovirtsdk4/types.rb', line 31629 def vms_rule=(value) if value.is_a?(Hash) value = AffinityRule.new(value) end @vms_rule = value end |