Class: OvirtSDK4::VmPlacementPolicy
- Inherits:
-
Struct
- Object
- Struct
- OvirtSDK4::VmPlacementPolicy
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary (collapse)
-
- (VmAffinity) affinity
Returns the value of the
affinity
attribute. -
- (Object) affinity=(value)
Sets the value of the
affinity
attribute. -
- (Array<Host>) hosts
Returns the value of the
hosts
attribute. -
- (Object) hosts=(list)
Sets the value of the
hosts
attribute. -
- (VmPlacementPolicy) initialize(opts = {})
constructor
Creates a new instance of the VmPlacementPolicy class.
Methods included from Type
Constructor Details
- (VmPlacementPolicy) initialize(opts = {})
Creates a new instance of the OvirtSDK4::VmPlacementPolicy class.
19674 19675 19676 19677 19678 |
# File 'lib/ovirtsdk4/types.rb', line 19674 def initialize(opts = {}) super(opts) self.affinity = opts[:affinity] self.hosts = opts[:hosts] end |
Instance Method Details
- (VmAffinity) affinity
Returns the value of the affinity
attribute.
19624 19625 19626 |
# File 'lib/ovirtsdk4/types.rb', line 19624 def affinity return @affinity end |
- (Object) affinity=(value)
Sets the value of the affinity
attribute.
19633 19634 19635 |
# File 'lib/ovirtsdk4/types.rb', line 19633 def affinity=(value) @affinity = value end |
- (Array<Host>) hosts
Returns the value of the hosts
attribute.
19642 19643 19644 |
# File 'lib/ovirtsdk4/types.rb', line 19642 def hosts return @hosts end |
- (Object) hosts=(list)
Sets the value of the hosts
attribute.
19650 19651 19652 19653 19654 19655 19656 19657 19658 19659 19660 |
# File 'lib/ovirtsdk4/types.rb', line 19650 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 |