Class: Com::Vmware::Appliance::Techpreview::NtpService

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

Overview

``Com::Vmware::Appliance::Techpreview::Ntp`` class provides methods Gets NTP configuration status and tests connection to ntp servers.

Defined Under Namespace

Classes: Message, MessageStatus, NTPConfig, NTPStatus, TestStatus, TestStatusInfo

Instance Method Summary (collapse)

Constructor Details

- (NtpService) initialize(config)

Constructs a new instance.

Parameters:

  • config (VAPI::Bindings::StubConfig)

    A hash with the api provider details.



62
63
64
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/techpreview.rb', line 62

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

Instance Method Details

- (Com::Vmware::Appliance::Techpreview::Ntp::NTPConfig) get

Get the NTP configuration status. If you run the ‘timesync.get’ command, you can retrieve the current time synchronization method (NTP- or VMware Tools-based). The ‘ntp’ command always returns the NTP server information, even when the time synchronization mode is not set to NTP. If the time synchronization mode is not NTP-based, the NTP server status is displayed as down.

Returns:

  • (Com::Vmware::Appliance::Techpreview::Ntp::NTPConfig)

    NTP config

Raises:



88
89
90
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/techpreview.rb', line 88

def get()
    invoke_with_info(@@get_info)
end

- (Com::Vmware::Appliance::Techpreview::Ntp::TestStatusInfo) test(servers)

Test the connection to a list of ntp servers.

Parameters:

  • servers (Array<String>)

    List of host names or IP addresses of NTP servers.

Returns:

  • (Com::Vmware::Appliance::Techpreview::Ntp::TestStatusInfo)

    NTP connection status

Raises:



75
76
77
78
79
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/techpreview.rb', line 75

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