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
List of all members
Com::Vmware::Vapi::Metadata::Metamodel::Component Class Reference
Inheritance diagram for Com::Vmware::Vapi::Metadata::Metamodel::Component:

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

## Detailed Description

The `Com::Vmware::Vapi::Metadata::Metamodel::Component` interface providers methods* to retrieve metamodel information of a component element.

A component defines a set of functionality that is deployed together and versioned together. For example, all the interfaces that belong to VMware Content Library are part of a single component. A component element describes a component. A component element contains one or more package elements.

The methods for package elements are provided by interface class Com::Vmware::Vapi::Metadata::Metamodel::Package .

Constant String::RESOURCE_TYPE # Resource type for component.

## Member Function Documentation

public method Com::Vmware::Vapi::Metadata::Metamodel::Component::fingerprint | ( |  | ) |

Retrieves the fingerprint computed from the metamodel metadata of the component element corresponding to `component_id` .

The fingerprint provides clients an efficient way to check if the metadata for a particular component element has been modified on the server. The client can do this by comparing the result of this operation with the fingerprint returned in the result of :func:`Com::Vmware::Vapi::Metadata::Metamodel::Component.get` .

Parameters

  component_id | [REQUIRED] Identifier of the component element. The value must be an identifier for the resource type getQualifiedName(com.vmware.vapi.component). . The value must be str.

Return values

  The | fingerprint computed from the metamodel metadata of the component element. The return type will be String

Exceptions

  Com::Vmware::Vapi::Std::Errors::NotFound | if the component element associated with `component_id` is not registered with the infrastructure.

Code:
click to view
# Number of lines of code in fingerprint: 10
sub fingerprint {
my ($self, %args) = @_;
my $component_id = $args {component_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::Metamodel::Component::get | ( |  | ) |

Retrieves metamodel information about the component element corresponding to `component_id` .

The class Com::Vmware::Vapi::Metadata::Metamodel::ComponentData contains the metamodel information about the component and it's fingerprint. It contains information about all the package elements that are contained in this component element.

Parameters

  component_id | [REQUIRED] Identifier of the component element. The value must be an identifier for the resource type getQualifiedName(com.vmware.vapi.component). . The value must be str.

Return values

  The | class Com::Vmware::Vapi::Metadata::Metamodel::ComponentData instance that corresponds to `component_id` . The return type will be Com::Vmware::Vapi::Metadata::Metamodel::ComponentData

Exceptions

  Com::Vmware::Vapi::Std::Errors::NotFound | if the component element associated with `component_id` is not registered with the infrastructure.

Code:
click to view
# Number of lines of code in get: 10
sub get {
my ($self, %args) = @_;
my $component_id = $args {component_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::Metamodel::Component::list | ( |  | ) |

Returns the identifiers for the component elements that are registered with the infrastructure.

Return values

  The | list of identifiers for the component elements that are registered with the infrastructure. The value will be an identifier for the resource type getQualifiedName(com.vmware.vapi.component). 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::Metamodel::Component::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;
}

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

- Com/Vmware/Vapi/Metadata/Metamodel/Component.pm