Creates a new instance of the {Bonding} class.
@param opts [Hash] 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.
@option opts [Mac, Hash] :ad_partner_mac The value of attribute `ad_partner_mac`.
@option opts [Array<Option>, Array<Hash>] :options The values of attribute `options`.
@option opts [Array<HostNic>, Array<Hash>] :slaves The values of attribute `slaves`.
# File lib/ovirtsdk4/types.rb, line 1224 def initialize(opts = {}) super(opts) self.ad_partner_mac = opts[:ad_partner_mac] self.options = opts[:options] self.slaves = opts[:slaves] end
Returns the value of the `ad_partner_mac` attribute.
@return [Mac]
# File lib/ovirtsdk4/types.rb, line 1140 def ad_partner_mac return @ad_partner_mac end
Sets the value of the `ad_partner_mac` attribute.
@param value [Mac, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Mac} 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.
# File lib/ovirtsdk4/types.rb, line 1153 def ad_partner_mac=(value) if value.is_a?(Hash) value = Mac.new(value) end @ad_partner_mac = value end
Returns the value of the `options` attribute.
@return [Array<Option>]
# File lib/ovirtsdk4/types.rb, line 1165 def options return @options end
Sets the value of the `options` attribute.
@param list [Array<Option>]
# File lib/ovirtsdk4/types.rb, line 1173 def options=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Option.new(value) end end end @options = list end
Returns the value of the `slaves` attribute.
@return [Array<HostNic>]
# File lib/ovirtsdk4/types.rb, line 1190 def slaves return @slaves end
Sets the value of the `slaves` attribute.
@param list [Array<HostNic>]
# File lib/ovirtsdk4/types.rb, line 1198 def slaves=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = HostNic.new(value) end end end @slaves = list end