class OvirtSDK4::NetworkConfiguration
Public Class Methods
new(opts = {})
click to toggle source
Creates a new instance of the {NetworkConfiguration} 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 [Dns, Hash] :dns The value of attribute `dns`.
@option opts [Array<Nic>, Array<Hash>] :nics The values of attribute `nics`.
Calls superclass method
OvirtSDK4::Struct.new
# File lib/ovirtsdk4/types.rb, line 8254 def initialize(opts = {}) super(opts) self.dns = opts[:dns] self.nics = opts[:nics] end
Public Instance Methods
dns()
click to toggle source
Returns the value of the `dns` attribute.
@return [Dns]
# File lib/ovirtsdk4/types.rb, line 8197 def dns return @dns end
dns=(value)
click to toggle source
Sets the value of the `dns` attribute.
@param value [Dns, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Dns} 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 8210 def dns=(value) if value.is_a?(Hash) value = Dns.new(value) end @dns = value end
nics()
click to toggle source
Returns the value of the `nics` attribute.
@return [Array<Nic>]
# File lib/ovirtsdk4/types.rb, line 8222 def nics return @nics end
nics=(list)
click to toggle source
Sets the value of the `nics` attribute.
@param list [Array<Nic>]
# File lib/ovirtsdk4/types.rb, line 8230 def nics=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Nic.new(value) end end end @nics = list end