VMware vSphere Automation SDK Perl The VMware vSphere Automation SDK for Perl supports the client-side vSphere Automation API for access to vSphere services and capabilities

- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Files Functions
Classes | List of all members
Com::Vmware::Appliance::Techpreview::Ntp Class Reference
Inheritance diagram for Com::Vmware::Appliance::Techpreview::Ntp:

## Classes
class | Message
class | MessageStatus
class | NTPConfig
class | NTPStatus
class | TestStatus
class | TestStatusInfo

## Avaliable Methods
public method | test ()
public method | get ()
public method | new ()

## Detailed Description

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

## Member Function Documentation

public method Com::Vmware::Appliance::Techpreview::Ntp::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.

Return values

  NTP | config The return type will be Com::Vmware::Appliance::Techpreview::Ntp::NTPConfig

Exceptions

  Com::Vmware::Vapi::Std::Errors::Error | Generic error

Code:
click to view
# Number of lines of code in get: 4
sub get {
my ($self, %args) = @_;
return $self->invoke(method_name => 'get', method_args => {});
}

public method Com::Vmware::Appliance::Techpreview::Ntp::new | ( |  | ) |

Constructor to initialize the object

Parameters

  api_provider | - protocol connection to use with stubs created by this factory
  StubConfig | - Stub's additional configuration

Return values

  Blessed | object

Code:
click to view
# Number of lines of code in new: 11
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $stub_config = $args {stub_config};
my $api_provider = $args {api_provider};
my $self = $class->SUPER::new('stub_config' => $stub_config,
'api_provider' => $api_provider);
bless $self, $class;
return $self;
}

public method Com::Vmware::Appliance::Techpreview::Ntp::test | ( |  | ) |

Test the connection to a list of ntp servers.

Parameters

  servers | [REQUIRED] List of host names or IP addresses of NTP servers. . The value must be Array of String.

Return values

  NTP | connection status The return type will be Com::Vmware::Appliance::Techpreview::Ntp::TestStatusInfo

Exceptions

  Com::Vmware::Vapi::Std::Errors::Error | Generic error

Code:
click to view
# Number of lines of code in test: 10
sub test {
my ($self, %args) = @_;
my $servers = $args {servers};
$self->validate_args (method_name => 'test',
method_args => \%args);
return $self->invoke (method_name => 'test',
method_args => \%args);
}

The documentation for this class was generated from the following file:

- Com/Vmware/Appliance/Techpreview/Ntp.pm