Class: OvirtSDK4::Dns

Inherits:
Struct
  • Object
show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (Dns) initialize(opts = {})

Creates a new instance of the OvirtSDK4::Dns class.

Parameters:

  • opts (Hash) (defaults to: {})

    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.

Options Hash (opts):

  • :search_domains (Array<Host>, Array<Hash>)

    The values of attribute search_domains.

  • :servers (Array<Host>, Array<Hash>)

    The values of attribute servers.



2514
2515
2516
2517
2518
# File 'lib/ovirtsdk4/types.rb', line 2514

def initialize(opts = {})
  super(opts)
  self.search_domains = opts[:search_domains]
  self.servers = opts[:servers]
end

Instance Method Details

- (Array<Host>) search_domains

Returns the value of the search_domains attribute.

Returns:



2457
2458
2459
# File 'lib/ovirtsdk4/types.rb', line 2457

def search_domains
  return @search_domains
end

- (Object) search_domains=(list)

Sets the value of the search_domains attribute.

Parameters:

  • list (Array<Host>)


2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
# File 'lib/ovirtsdk4/types.rb', line 2465

def search_domains=(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
  @search_domains = list
end

- (Array<Host>) servers

Returns the value of the servers attribute.

Returns:



2482
2483
2484
# File 'lib/ovirtsdk4/types.rb', line 2482

def servers
  return @servers
end

- (Object) servers=(list)

Sets the value of the servers attribute.

Parameters:

  • list (Array<Host>)


2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
# File 'lib/ovirtsdk4/types.rb', line 2490

def servers=(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
  @servers = list
end