Class List Method List File List

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

Inherits:
  VAPI::Bindings::VapiService
  - Object
  - VAPI::Bindings::VapiService
  - Com::Vmware::Appliance::Networking::Dns::Servers
  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)

- - (Void) add(server)

  Add a DNS server.

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

  Get DNS server configuration.

- - (Servers) initialize(config) constructor

  Constructs a new instance.

- - (Void) set(config)

  Set the DNS server configuration.

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

  Test if dns servers are reachable.

## 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:

- (`Com::Vmware::Vapi::Std::Errors::Error`) —

  Generic error

    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:

- (`Com::Vmware::Appliance::Networking::Dns::Servers::DNSServerConfig`) —

  DNS server configuration.

Raises:

- (`Com::Vmware::Vapi::Std::Errors::Error`) —

  Generic error

    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:

- config (`Com::Vmware::Appliance::Networking::Dns::Servers::DNSServerConfig`) —

  DNS server configuration.

Returns:

- (`Void`)

Raises:

- (`Com::Vmware::Vapi::Std::Errors::Error`) —

  Generic error

    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:

- (`Com::Vmware::Appliance::Networking::Dns::Servers::TestStatusInfo`) —

  DNS reacable status

Raises:

- (`Com::Vmware::Vapi::Std::Errors::Error`) —

  Generic error

    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