Class List Method List File List

# Class: Com::Vmware::Appliance::Techpreview::Ntp::Server

Inherits:
  VAPI::Bindings::VapiService
  - Object
  - VAPI::Bindings::VapiService
  - Com::Vmware::Appliance::Techpreview::Ntp::Server
  show all
Defined in:
  /build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/techpreview/ntp.rb

## Overview

``Com::Vmware::Appliance::Techpreview::Ntp::Server`` class provides methods Performs NTP configuration.

## Instance Method Summary (collapse)

- - (Void) add(servers)

  Add NTP servers.

- - (Void) delete(servers)

  Delete NTP servers.

- - (Server) initialize(config) constructor

  Constructs a new instance.

- - (Void) set(servers)

  Set NTP servers.

## Constructor Details

### - (`Server`) initialize(config)

Constructs a new instance.

Parameters:

- config (`VAPI::Bindings::StubConfig`) —

  A hash with the api provider details.

    79
    80
    81
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/techpreview/ntp.rb', line 79

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

## Instance Method Details

### - (`Void`) add(servers)

Add NTP servers. This command adds NTP servers to the configuration. If the time synchronization is NTP-based, then NTP daemon is restarted to reload the new NTP servers. Otherwise, this command just adds servers to the NTP configuration.

Parameters:

- servers (`Array<String>`) —

  List of host names or IP addresses of NTP servers.

Returns:

- (`Void`)

Raises:

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

  Generic error

    91
    92
    93
    94
    95
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/techpreview/ntp.rb', line 91

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

### - (`Void`) delete(servers)

Delete NTP servers. This command deletes NTP servers from the configuration. If the time synchronization mode is NTP-based, the NTP daemon is restarted to reload the new NTP configuration. Otherwise, this command just deletes servers from the NTP configuration.

Parameters:

- servers (`Array<String>`) —

  List of host name or ip addresses of ntp servers.

Returns:

- (`Void`)

Raises:

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

  Generic error

    119
    120
    121
    122
    123
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/techpreview/ntp.rb', line 119

    def delete(servers)
        invoke_with_info(@@delete_info, {
            'servers' => servers,
        })
    end

### - (`Void`) set(servers)

Set NTP servers. This command deletes old NTP servers from the configuration and sets the input NTP servers in the configuration. If the time synchronization is NTP-based, the NTP daemon is restarted to reload the new NTP configuration. Otherwise, this command just replaces servers in the NTP configuration.

Parameters:

- servers (`Array<String>`) —

  List of host names or ip addresses of ntp servers.

Returns:

- (`Void`)

Raises:

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

  Generic error

    105
    106
    107
    108
    109
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/techpreview/ntp.rb', line 105

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