Class: Com::Vmware::Appliance::Networking::Dns::Servers

Inherits:
VAPI::Bindings::VapiService
  • Object
show all
Defined in:
/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking/dns.rb

Overview

``Com::Vmware::Appliance::Networking::Dns::Servers`` class provides methods DNS server configuration.

Defined Under Namespace

Classes: DNSServerConfig, DNSServerMode, Message, MessageStatus, TestStatus, TestStatusInfo

Instance Method Summary (collapse)

Constructor Details

- (Servers) initialize(config)

Constructs a new instance.

Parameters:

  • config (VAPI::Bindings::StubConfig)

    A hash with the api provider details.



493
494
495
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking/dns.rb', line 493

def initialize(config)
    super(config, @@service_info)
end

Instance Method Details

- (Void) add(server)

Add a DNS server. This method fails if mode argument is “dhcp“

Parameters:

  • server (String)

    DNS server.

Returns:

  • (Void)

Raises:



520
521
522
523
524
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking/dns.rb', line 520

def add(server)
    invoke_with_info(@@add_info, {
        'server' => server,
    })
end

- (Com::Vmware::Appliance::Networking::Dns::Servers::DNSServerConfig) get

Get DNS server configuration.

Returns:

Raises:



547
548
549
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking/dns.rb', line 547

def get()
    invoke_with_info(@@get_info)
end

- (Void) set(config)

Set the DNS server configuration. If you set the mode argument to “DHCP”, a DHCP refresh is forced.

Parameters:

Returns:

  • (Void)

Raises:



534
535
536
537
538
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking/dns.rb', line 534

def set(config)
    invoke_with_info(@@set_info, {
        'config' => config,
    })
end

- (Com::Vmware::Appliance::Networking::Dns::Servers::TestStatusInfo) test(servers)

Test if dns servers are reachable.

Parameters:

  • servers (Array<String>)

    DNS servers.

Returns:

Raises:



506
507
508
509
510
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking/dns.rb', line 506

def test(servers)
    invoke_with_info(@@test_info, {
        'servers' => servers,
    })
end