Aggregator Api Provider
Bases: vmware.vapi.core.ApiProvider
AggregatorProvider is an aggregating implementation of the ApiProvider interface. It aggregates a bunch of ApiProvider instances and expose it.
Return the connection information of ApiProviders registered with the AggregatorProvider
| Return type: | list of tuple of (str, str, str) |
|---|---|
| Returns: | Tuple containing rpc protocol, msg protocol and uri |
Invokes introspection service list on the Api Provider and retrieves the list of services
| Parameters: | api_provider (vmware.vapi.core.ApiProvider) – ApiProvider instance to be used for retrieving service identifiers |
|---|---|
| Return type: | list of str |
| Returns: | List of service identifiers |
| Raise : | Exception: if service identifiers could not be retrieved |
Invokes the specified method using the execution context and the input provided
| Parameters: |
|
|---|---|
| Return type: | |
| Returns: | Result of the method invocation |
Register a provider using a properties dictionary
| Parameters: | properties (dict) – Properties dictionary |
|---|
Register a ApiProvider with the AggregatorProvider
| Parameters: |
|
|---|
Register an service with the AggregatorProvider
| Parameters: |
|
|---|
Unregister a provider from AggregatorProvider
| Parameters: | provider_name (str) – Provider to be unregistered |
|---|
Authentication API Provider filter
Bases: vmware.vapi.provider.filter.ApiProviderFilter
AuthenticationFilter in API Provider chain enforces the authentication schemes specified in the authentication metadata file
Initialize AuthenticationFilter
| Parameters: | next_provider (vmware.vapi.core.ApiProvider or None) – API Provider to invoke the requests |
|---|
Invoke an API request
| Parameters: |
|
|---|---|
| Return type: | |
| Returns: | Result of the method invocation |
Returns the singleton AuthenticationFilter instance
| Return type: | vmware.vapi.provider.authentication.AuthenticationFilter |
|---|---|
| Returns: | AuthenticationFilter instance |
API Provider filter
Bases: vmware.vapi.core.ApiProvider
ApiProviderFilter is a base class for all ApiProvider filters. This handles all the common methods and also takes care of augmenting errors reported by an ApiProvider filter.
| Variables: | next_provider – Next API Provider in the chain |
|---|
Initialize ApiProviderFilter
| Parameters: |
|
|---|
Invoke an API request. Derived classes of ApiProviderFilter should call this method to invoke the request. This can be done by: ApiProviderFilter.invoke(self, ctx, method_id, input_value).
This method calls the next API Provider. If the request is made to “get” operation of vAPI Operation Introspection service, errors are augmented to the method result.
| Parameters: |
|
|---|---|
| Return type: | |
| Returns: | Result of the method invocation |
Introspection services
Bases: vmware.vapi.provider.introspection.ApiProviderIntrospector
Specialization of vmware.vapi.provider.introspection.ApiProviderIntrospector that uses data available in Aggregator Provider to process the Introspection service API requests
Initialize AggregatorIntrospector
| Parameters: |
|
|---|
Add a new service to the introspector
| Parameters: |
|
|---|
Bases: object
Abstract class for fetching introspection information
Initialize ApiProviderIntrospector
| Parameters: | name (str) – Name of the provider |
|---|
Returns the checksum of the API information available
| Return type: | str |
|---|---|
| Returns: | Checksum of the API information available |
Returns the list of introspection services
| Return type: | list of vmware.vapi.core.ApiInterface |
|---|---|
| Returns: | list of introspection services |
Get the operation information
| Parameters: |
|
|---|---|
| Return type: | |
| Returns: | Result that contains operation information. The DataValue in the output represents :class:’com.vmware.vapi.std.introspection.Operation.Info’ |
Get the list of available operations for a particular service
| Parameters: | service_id (str) – Service identifier |
|---|---|
| Return type: | vmware.vapi.core.MethodResult |
| Returns: | Result that contains list of available operations. The DataValue in the output is list of StringValues containing the operation names. |
Get information about a particular service
| Parameters: | service_id (str) – Service identifier |
|---|---|
| Return type: | vmware.vapi.core.MethodResult |
| Returns: | Introspection service info. The DataValue in the output represents :class:’com.vmware.vapi.std.introspection.Service.Info’ |
Bases: vmware.vapi.core.ApiInterface
Helper base class for all Introspection VMODL2 dynamic services
Initialize the Api Interface instance
| Parameters: |
|
|---|
Returns interface definition
| Return type: | InterfaceDefinition |
|---|---|
| Returns: | Interface definition |
Returns interface identifier
| Return type: | InterfaceIdentifier |
|---|---|
| Returns: | Interface identifier |
Returns the method definition
| Return type: | MethodDefinition |
|---|---|
| Returns: | Method definition |
Invokes the specified method using the execution context and the input provided
| Parameters: |
|
|---|---|
| Return type: | MethodResult |
| Returns: | Result of the method invocation |
Bases: vmware.vapi.provider.introspection.ApiProviderIntrospector
Specialization of vmware.vapi.provider.introspection.ApiProviderIntrospector that uses data available in Local Provider to process the Introspection service API requests
Initialize LocalProviderIntrospector
| Parameters: | name (str) – Name of the provider |
|---|
Add a new service to the introspector
| Parameters: |
|
|---|
Bases: vmware.vapi.provider.introspection.IntrospectionBaseApiInterface
This service exposes a list of operations to retrieve information about the operations present in a vAPI service
Initialize OperationApiInterface
| Parameters: |
|
|---|
Bases: vmware.vapi.provider.introspection.IntrospectionBaseApiInterface
This service provides operations to retrieve information of a vAPI Provider. A provider represents a vAPI endpoint that is exposing a collection of vAPI services.
Initialize ProviderApiInterface
| Parameters: |
|
|---|
Bases: vmware.vapi.provider.introspection.IntrospectionBaseApiInterface
This service exposes operations to retrieve information about the services exposed by a vAPI endpoint
Initialize ServiceApiInterface
| Parameters: |
|
|---|
Returns the checksum of services registered with LocalProvider
| Parameters: | api_services (dict) – Dictionary of all the services registered with local provider Key is vmware.vapi.core.InterfaceIdentifier and value is vmware.vapi.core.ApiInterface |
|---|---|
| Return type: | str |
| Returns: | checksum of the service information |
Services to be registered with LocalProvider
| Return type: | list of vmware.vapi.core.ApiInterface |
|---|---|
| Returns: | List of services to be registered with LocalProvider |
Utility library for Provider modules
Add errors reported by this ApiProviderFilter to a method definition. This method clones the input method definition and appends errors. It does not modify the parameter.
| Parameters: |
|
|---|---|
| Return type: | |
| Returns: | Method definition after augmenting the errors |
Returns a new method result that is identical to method_result except that the errors_definition field in the output (which is of type Operation.Info from Introspection service) contains the errors from the Info structure in method_result plus the errors in errors_to_augment. This code will be executed only for “get” operation in vAPI Operation Introspection service.
| Parameters: |
|
|---|---|
| Return type: | |
| Returns: | Output data value |
Local Api Provider
Bases: vmware.vapi.core.ApiProvider
LocalProvider is a local in-process implementation of the ApiProvider interface
Initialize LocalProvider
| Parameters: | load_introspection (bool) – If true, load introspection services |
|---|
Register an interface with LocalProvider
| Parameters: | ifaces (list of vmware.vapi.core.ApiInterface) – Interfaces to be registered |
|---|
Returns the singleton LocalProvider instance
| Return type: | LocalProvider |
|---|---|
| Returns: | LocalProvider instance |
Helper classes for aggregator services