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::Services Class Reference
Inheritance diagram for Com::Vmware::Appliance::Techpreview::Services:

## Classes
class | ServiceInfo
class | ServiceOps

## Avaliable Methods
public method | restart ()
public method | stop ()
public method | new ()
public method | list ()
public method | control ()

## Detailed Description

`Com::Vmware::Appliance::Techpreview::Services` interface provides methods Manages services.

## Member Function Documentation

public method Com::Vmware::Appliance::Techpreview::Services::control | ( |  | ) |

Manage a service with arbitrary command and arguments.

Parameters

  args | [REQUIRED] Array of arguments. . The value must be Array of String.
  name | [REQUIRED] Name of the service. . The value must be String.
  timeout | [REQUIRED] Timeout in seconds. Zero (0) means no timeout. . The value must be Long.

Exceptions

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

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

public method Com::Vmware::Appliance::Techpreview::Services::list | ( |  | ) |

Get a list of all known services.

Return values

  List | of services. The return type will be Array of Com::Vmware::Appliance::Techpreview::Services::ServiceInfo

Exceptions

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

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

public method Com::Vmware::Appliance::Techpreview::Services::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::Services::restart | ( |  | ) |

start or restart a service

Parameters

  name | [REQUIRED] Name of the service to start or restart. . The value must be String.
  timeout | [REQUIRED] Timeout in seconds. Zero (0) means no timeout. . The value must be Long.

Exceptions

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

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

public method Com::Vmware::Appliance::Techpreview::Services::stop | ( |  | ) |

Stop a service

Parameters

  name | [REQUIRED] Name of service. . The value must be String.
  timeout | [REQUIRED] Timeout in seconds. Zero (0) means no timeout. . The value must be Long.

Exceptions

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

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

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

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