metamodel Package

metamodel Package

resource_client Module

The com.vmware.vapi.metadata.metamodel.resource_client module provides classes to retrieve metamodel information for resource types.

class com.vmware.vapi.metadata.metamodel.resource_client.Model(config)[source]

Bases: vmware.vapi.bindings.stub.VapiInterface

The Model class provides methods to retrieve information about models.

A structure is used as a model if it is used for persisting data about an entity. Some of the fields in the model structure are also used for creating indexes for querying.

One or more services can operate on the same resource type. One or more services can provide the model structure for an entity of this resource type. Using Model class you can retrieve the list of all the structure elements that are model structures for a given resource type.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
list(resource_id)[source]

Returns the set of identifiers for the structure elements that are models for the resource type corresponding to resource_id.

The com.vmware.vapi.metadata.metamodel_client.Structure class provides methods to retrieve more details about the structure elements corresponding to the identifiers returned by this method.

Parameters:resource_id (str) – Identifier of the resource type. The parameter must be an identifier for the resource type: com.vmware.vapi.resource.
Return type:set of str
Returns:The set of identifiers for the models that are associated with the resource type in resource_id. The return value will contain identifiers for the resource type: com.vmware.vapi.structure.
Raise :com.vmware.vapi.std.errors_client.NotFound if the resource type associated with resource_id does not exist.

service_client Module

The com.vmware.vapi.metadata.metamodel.service_client module provides classes to retrieve metamodel information about the elements contained in a service element.

class com.vmware.vapi.metadata.metamodel.service_client.Hidden(config)[source]

Bases: vmware.vapi.bindings.stub.VapiInterface

The Hidden class provides methods to retrieve the list of classes that are hidden and should not be exposed in various presentation layers of API infrastructure.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
list()[source]

Returns the class identifiers that should be hidden.

Return type:list of str
Returns:The list of class identifiers that should be hidden. The return value will contain identifiers for the resource type: com.vmware.vapi.service.
class com.vmware.vapi.metadata.metamodel.service_client.Operation(config)[source]

Bases: vmware.vapi.bindings.stub.VapiInterface

The Operation class provides methods to retrieve metamodel information of an operation element in the interface definition language.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
RESOURCE_TYPE = 'com.vmware.vapi.operation'

Resource type for operation element.

get(service_id, operation_id)[source]

Retrieves the metamodel information about an operation element corresponding to operation_id contained in the service element corresponding to service_id.

Parameters:
  • service_id (str) – Identifier of the service element. The parameter must be an identifier for the resource type: com.vmware.vapi.service.
  • operation_id (str) – Identifier of the operation element. The parameter must be an identifier for the resource type: com.vmware.vapi.operation.
Return type:

com.vmware.vapi.metadata.metamodel_client.OperationInfo

Returns:

The com.vmware.vapi.metadata.metamodel_client.OperationInfo instance that corresponds to operation_id defined in scope service_id.

Raise :

com.vmware.vapi.std.errors_client.NotFound if the service element associated with service_id does not exist in any of the package elements.

Raise :

com.vmware.vapi.std.errors_client.NotFound if the operation element associated with operation_id does not exist in the service element.

list(service_id)[source]

Returns the identifiers for the operation elements that are defined in the scope of service_id.

Parameters:service_id (str) – Identifier of the service element. The parameter must be an identifier for the resource type: com.vmware.vapi.service.
Return type:list of str
Returns:The list of identifiers for the operation elements that are defined in the scope of service_id. The return value will contain identifiers for the resource type: com.vmware.vapi.operation.
Raise :com.vmware.vapi.std.errors_client.NotFound if the service element associated with service_id does not exist in any of the package elements.

Table Of Contents

Previous topic

authentication Package

Next topic

privilege Package

This Page