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::Vapi::Metadata::Privilege::Source Class Reference
Inheritance diagram for Com::Vmware::Vapi::Metadata::Privilege::Source:

## Classes
class | CreateSpec
class | Info

## Avaliable Methods
public method | reload ()
public method | create ()
public method | get ()
public method | delete ()
public method | fingerprint ()
public method | new ()
public method | list ()

## Detailed Description

The `Com::Vmware::Vapi::Metadata::Privilege::Source` interface provides methods* to manage the sources of privilege metadata information.

The interface definition language infrastructure provides tools to generate various kinds of metadata in JSON format from the interface definition files and additional properties files. One of the generated files contains privilege information. The generated file can be registered as a source of metadata.

The privilege file contains all the data present in the interface definition files. Each privilege file contains data about one component element. When a privilege file is added as a source, each source contributes only one component element's metadata.

Privilege metadata can also be discovered from a remote server that supports the privilege metadata interfaces (see :mod:`com.vmware.vapi.metadata.privilege` ). Since multiple components can be registered with a single metadata server, when a remote server is registered as a source, that source can contribute more than one component.

Constant String::RESOURCE_TYPE # Resource type for metadata source.

## Member Function Documentation

public method Com::Vmware::Vapi::Metadata::Privilege::Source::create | ( |  | ) |

Creates a new metadata source. Once the server validates the registration information of the metadata source, the privilege metadata is retrieved from the source. This populates elements in all the interfaces defined in :mod:`com.vmware.vapi.metadata.privilege` package* .

Parameters

  source_id | [REQUIRED] metadata source identifier. The value must be an identifier for the resource type getQualifiedName(com.vmware.vapi.metadata.privilege.source). . The value must be str.
  spec | [REQUIRED] create specification. . The value must be Com::Vmware::Vapi::Metadata::Privilege::Source::CreateSpec.

Exceptions

  Com::Vmware::Vapi::Std::Errors::AlreadyExists | if the metadata source identifier is already registered with the infrastructure.
  Com::Vmware::Vapi::Std::Errors::InvalidArgument | if the type of the source specified in null is invalid.
  Com::Vmware::Vapi::Std::Errors::InvalidArgument | if the file specified in null is not a valid JSON file or if the format of the privilege metadata in the JSON file is invalid.
  Com::Vmware::Vapi::Std::Errors::InvalidArgument | if the URI specified in null is unreachable or if there is a transport protocol or message protocol mismatch between the client and the server or if the remote server do not have interfaces present in :mod:`com.vmware.vapi.metadata.privilege` package* .
  Com::Vmware::Vapi::Std::Errors::NotFound | if the file specified in null does not exist.

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

public method Com::Vmware::Vapi::Metadata::Privilege::Source::delete | ( |  | ) |

Deletes an existing privilege metadata source from the infrastructure.

Parameters

  source_id | [REQUIRED] Identifier of the metadata source. The value must be an identifier for the resource type getQualifiedName(com.vmware.vapi.metadata.privilege.source). . The value must be str.

Exceptions

  Com::Vmware::Vapi::Std::Errors::NotFound | if the metadata source associated with `source_id` is not found.

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

public method Com::Vmware::Vapi::Metadata::Privilege::Source::fingerprint | ( |  | ) |

Returns the aggregate fingerprint of metadata from all the metadata sources or from a particular metadata source if `source_id` is specified.

Parameters

  source_id | [OPTIONAL] Identifier of the metadata source. The value must be an identifier for the resource type getQualifiedName(com.vmware.vapi.metadata.privilege.source). If unspecified, the fingerprint of all the metadata sources is returned. . The value must be str or None.

Return values

  Aggregate | fingerprint of all the metadata sources or of a particular metadata source. The return type will be String

Exceptions

  Com::Vmware::Vapi::Std::Errors::NotFound | if the metadata source associated with `source_id` is not found.

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

public method Com::Vmware::Vapi::Metadata::Privilege::Source::get | ( |  | ) |

Retrieves information about the metadata source corresponding to `source_id` .

Parameters

  source_id | [REQUIRED] Identifier of the metadata source. The value must be an identifier for the resource type getQualifiedName(com.vmware.vapi.metadata.privilege.source). . The value must be str.

Return values

  The | class Com::Vmware::Vapi::Metadata::Privilege::Source::Info instance that corresponds to `source_id` The return type will be Com::Vmware::Vapi::Metadata::Privilege::Source::Info

Exceptions

  Com::Vmware::Vapi::Std::Errors::NotFound | if the metadata source associated with `source_id` is not found.

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

public method Com::Vmware::Vapi::Metadata::Privilege::Source::list | ( |  | ) |

Returns the identifiers of the metadata sources currently registered with the infrastructure.

Return values

  The | list of identifiers for metadata sources currently registered. The value will be an identifier for the resource type getQualifiedName(com.vmware.vapi.metadata.privilege.source). The return type will be Array of str

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::Vapi::Metadata::Privilege::Source::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::Vapi::Metadata::Privilege::Source::reload | ( |  | ) |

Reloads the privilege metadata from all the metadata sources or of a particular metadata source if `source_id` is specified.

Parameters

  source_id | [OPTIONAL] Identifier of the metadata source. The value must be an identifier for the resource type getQualifiedName(com.vmware.vapi.metadata.privilege.source). If unspecified, all the metadata sources are reloaded. . The value must be str or None.

Exceptions

  Com::Vmware::Vapi::Std::Errors::NotFound | if the metadata source associated with `source_id` is not found.

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

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

- Com/Vmware/Vapi/Metadata/Privilege/Source.pm