com.vmware.vapi.metadata package

Submodules

com.vmware.vapi.metadata.authentication_client module

The com.vmware.vapi.metadata.authentication_client module provides classes that expose authentication information for operation elements across all the service elements.

To calculate the effective authentication information for an operation element, you should first see if there is an authentication scheme specified for the operation element. If it is not specified, then authentication scheme for the service element that contains this operation element is used. If it is not specified for the service element as well, then the authentication scheme for the package element that contains this service element is used.

class com.vmware.vapi.metadata.authentication_client.AuthenticationInfo(scheme_type=None, session_manager=None, scheme=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The AuthenticationInfo class describes the authentication information. Authentication information could be specified for a package element, service elenent or an operation element.

Using the authentication scheme information, a client invoking an API call from any class can figure out what kind of credentials are needed for that API call.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • scheme_type (AuthenticationInfo.SchemeType) – The type of the authentication scheme.

  • session_manager (str) – In a session aware authentication scheme, a session manager is required that supports create, delete and keepAlive methods. The fully qualified class name of the session manager is provided in AuthenticationInfo.session_manager attribute. This class is responsible for handling sessions. This attribute is optional and it is only relevant when the value of schemeType is AuthenticationInfo.SchemeType.SESSION_AWARE.

  • scheme (str) –

    String identifier of the authentication scheme.

    Following are the supported authentication schemes by the infrastructure:

    • The identifier com.vmware.vapi.std.security.saml_hok_token for SAML holder of key token based authentication mechanism.

    • The identifier com.vmware.vapi.std.security.bearer_token for SAML bearer token based authentication mechanism.

    • The identifier com.vmware.vapi.std.security.session_id for session based authentication mechanism.

    • The identifier com.vmware.vapi.std.security.user_pass for username and password based authentication mechanism.

class SchemeType(string)

Bases: vmware.vapi.bindings.enum.Enum

The AuthenticationInfo.SchemeType class provides class attributes for the set of valid authentication scheme types.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the SchemeType instance.

SESSIONLESS = SchemeType(string='SESSIONLESS')

Indicates that the scheme is a session less authentication scheme, the user is authenticated on every method. There is no explicit session establishment.

SESSION_AWARE = SchemeType(string='SESSION_AWARE')

Indicates that the scheme is a session aware authentication scheme. It requires an explicit login before executing a method and logout when a session terminates. A class might choose to have a session aware scheme if it wants to associate some state corresponding to the user until the user logs out or if it wants to mitigate the cost of authenticating the user on every method.

class com.vmware.vapi.metadata.authentication_client.Component(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Component class provides methods to retrieve authentication information of a component element.

A component element is said to contain authentication information if any one of package elements contained in it has authentication information.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

RESOURCE_TYPE = 'com.vmware.vapi.component'

Resource type for component.

fingerprint(component_id)

Retrieves the fingerprint computed from the authentication 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 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 Component.get().

Parameters

component_id (str) – Identifier of the component element. The parameter must be an identifier for the resource type: com.vmware.vapi.component.

Return type

str

Returns

The fingerprint computed from the authentication metadata of the component.

Raise

com.vmware.vapi.std.errors_client.NotFound if the component element associated with component_id does not have any authentication information.

get(component_id)

Retrieves authentication information about the component element corresponding to component_id.

The ComponentData contains the authentication information about the component element and it’s fingerprint. It contains information about all the package elements that belong to this component element.

Parameters

component_id (str) – Identifier of the component element. The parameter must be an identifier for the resource type: com.vmware.vapi.component.

Return type

ComponentData

Returns

The ComponentData instance that corresponds to component_id

Raise

com.vmware.vapi.std.errors_client.NotFound if the component element associated with component_id does not have any authentication information.

list()

Returns the identifiers for the component elements that have authentication information.

Return type

list of str

Returns

The list of identifiers for the component elements that have authentication information. The return value will contain identifiers for the resource type: com.vmware.vapi.component.

class com.vmware.vapi.metadata.authentication_client.ComponentData(info=None, fingerprint=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ComponentData class contains the authentication information of the component along with its fingerprint.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • info (ComponentInfo) – Authentication information of the component. This includes information about all the modules in the component.

  • fingerprint (str) –

    Fingerprint of the metadata of the component.

    Authentication information could change when there is an infrastructure update. Since the data present in ComponentData.info could be quite large, fingerprint provides a convenient way to check if the data for a particular component is updated.

    You should store the fingerprint associated with a component. After an update, by invoking the Component.fingerprint() method, you can retrieve the new fingerprint for the component. If the new fingerprint and the previously stored fingerprint do not match, clients can then use the Component.get() to retrieve the new authentication information for the component.

class com.vmware.vapi.metadata.authentication_client.ComponentInfo(packages=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ComponentInfo class contains authentication information of a component element.

For an explanation of authentication information contained within component elements, see Component.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

packages (dict of str and PackageInfo) –

Authentication information of all the package elements. The key in the dict is the identifier of the package element and the value in the dict is the authentication information for the package element.

For an explanation of authentication information containment within package elements, see Package. When clients pass a value of this class as a parameter, the key in the attribute dict must be an identifier for the resource type: com.vmware.vapi.package. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: com.vmware.vapi.package.

class com.vmware.vapi.metadata.authentication_client.OperationInfo(schemes=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The OperationInfo class contains authentication information of an operation element.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

schemes (list of AuthenticationInfo) – List of authentication schemes used by an operation element. The authentication scheme specified on the service element corresponding to this operation element is ignored.

class com.vmware.vapi.metadata.authentication_client.Package(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Package class provides methods to retrieve authentication information of a package element.

A package element is said to contain authentication information if there is a default authentication assigned to all service elements contained in the package element or if one of the service element contained in this package element has authentication information.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

RESOURCE_TYPE = 'com.vmware.vapi.package'

Resource type for package.

get(package_id)

Retrieves authentication information about the package element corresponding to package_id.

Parameters

package_id (str) – Identifier of the package element. The parameter must be an identifier for the resource type: com.vmware.vapi.package.

Return type

PackageInfo

Returns

The PackageInfo instance that corresponds to package_id

Raise

com.vmware.vapi.std.errors_client.NotFound if the package element associated with package_id does not have any authentication information.

list()

Returns the identifiers for the package elements that have authentication information.

Return type

list of str

Returns

The list of identifiers for the package elements that have authentication information. The return value will contain identifiers for the resource type: com.vmware.vapi.package.

class com.vmware.vapi.metadata.authentication_client.PackageInfo(schemes=None, services=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The PackageInfo class contains authentication information of a package element.

For an explanation of authentication information contained within package elements, see Package.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • schemes (list of AuthenticationInfo) – List of authentication schemes to be used for all the operation elements contained in this package element. If a particular service or operation element has no explicit authentications defined in the authentication defintion file, these authentication schemes are used for authenticating the user.

  • services (dict of str and ServiceInfo) –

    Information about all service elements contained in this package element that contain authentication information. The key in the dict is the identifier of the service element and the value in the dict is the authentication information for the service element.

    For an explanation of authentication information containment within service elements, see Service. When clients pass a value of this class as a parameter, the key in the attribute dict must be an identifier for the resource type: com.vmware.vapi.service. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: com.vmware.vapi.service.

class com.vmware.vapi.metadata.authentication_client.Service(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Service class provides methods to retrieve authentication information of a service element.

A service element is said to contain authentication information if there is a default authentication assigned to all operation elements contained in a service element or if one of the operation elements contained in this service element has authentication information.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

RESOURCE_TYPE = 'com.vmware.vapi.service'

Resource type for service.

get(service_id)

Retrieves authentication information about 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.

Return type

ServiceInfo

Returns

The ServiceInfo instance that corresponds to service_id

Raise

com.vmware.vapi.std.errors_client.NotFound if the service element associated with service_id does not have any authentication information.

list()

Returns the identifiers for the service elements that have authentication information.

Return type

list of str

Returns

The list of identifiers for the service elements that have authentication information. The return value will contain identifiers for the resource type: com.vmware.vapi.service.

class com.vmware.vapi.metadata.authentication_client.ServiceInfo(schemes=None, operations=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ServiceInfo class contains authentication information of a service element.

For an explanation of authentication information contained within service elements, see Service.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • schemes (list of AuthenticationInfo) – List of authentication schemes to be used for all the operation elements contained in this service element. The authentication scheme specified on the package element corresponding to this service element is ignored.

  • operations (dict of str and OperationInfo) –

    Information about all operation elements contained in this service element that contain authentication information. The key in the dict is the identifier of the operation element and the value in the dict is the authentication information for the operation element.

    For an explanation of containment of authentication information within operation elements, see com.vmware.vapi.metadata.authentication.service_client.Operation. When clients pass a value of this class as a parameter, the key in the attribute dict must be an identifier for the resource type: com.vmware.vapi.operation. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: com.vmware.vapi.operation.

class com.vmware.vapi.metadata.authentication_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

stub_config (vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance

com.vmware.vapi.metadata.cli_client module

The com.vmware.vapi.metadata.cli_client module provides classes that expose all the information required to display namespace or command help, execute a command and display it’s result.

class com.vmware.vapi.metadata.cli_client.Command(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Command class provides methods to get information about command line interface (CLI) commands.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class FormatterType(string)

Bases: vmware.vapi.bindings.enum.Enum

The Command.FormatterType class defines supported CLI output formatter types. See Command.Info.formatter.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the FormatterType instance.

CSV = FormatterType(string='CSV')

Displays command output in CSV format.

HTML = FormatterType(string='HTML')

Displays command output in HTML format.

JSON = FormatterType(string='JSON')

Displays command output in JSON format.

SIMPLE = FormatterType(string='SIMPLE')

Displays command output as it is.

TABLE = FormatterType(string='TABLE')

Displays command output in table format.

XML = FormatterType(string='XML')

Displays command output in XML format.

class GenericType(string)

Bases: vmware.vapi.bindings.enum.Enum

The Command.GenericType class defines generic types supported by Command class. See Command.OptionInfo.generic.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the GenericType instance.

LIST = GenericType(string='LIST')

Input parameter is a list.

LIST_OPTIONAL = GenericType(string='LIST_OPTIONAL')

Input parameter is a list of optionals. This class attribute was added in vSphere API 6.5.

NONE = GenericType(string='NONE')

Default case.

OPTIONAL = GenericType(string='OPTIONAL')

Input parameter is an optional.

OPTIONAL_LIST = GenericType(string='OPTIONAL_LIST')

Input parameter is an optional of type list. This class attribute was added in vSphere API 6.5.

class Identity(path=None, name=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Command.Identity class uniquely identifies a command in the CLI commands tree.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • path (str) – The dot-separated path of the namespace containing the command in the CLI command tree.

  • name (str) – Name of the command.

class Info(identity=None, description=None, service_id=None, operation_id=None, options=None, formatter=None, output_field_list=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Command.Info class contains information about a command. It includes the identity of the command, a description, information about the class and method that implement the command, and CLI-specific information for the command.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • identity (Command.Identity) – Basic command identity.

  • description (str) – The text description displayed to the user in help output.

  • service_id (str) – The service identifier that contains the operations for this CLI command. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vapi.service. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vapi.service.

  • operation_id (str) – The operation identifier corresponding to this CLI command. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vapi.operation. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vapi.operation.

  • options (list of Command.OptionInfo) – The input for this command.

  • formatter (Command.FormatterType or None) – The formatter to use when displaying the output of this command. If not present, client can choose a default output formatter.

  • output_field_list (list of Command.OutputInfo) – List of output structure name and output field info.

class OptionInfo(long_option=None, short_option=None, field_name=None, description=None, type=None, generic=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Command.OptionInfo class describes information about a specific input option of a command.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • long_option (str) – The long option name of the parameter as used by the user.

  • short_option (str or None) – The single character value option name. If not present, there’s no single character option for the parameter.

  • field_name (str) – The fully qualified name of the option referred to by the operation element in Command.Info.operation_id.

  • description (str) – The description of the option to be displayed to the user when they request usage information for a CLI command.

  • type (str) – The type of option. This is used to display information about what kind of data is expected (string, number, boolean, etc.) for the option when they request usage information for a CLI command. For class this stores the fully qualified class id.

  • generic (Command.GenericType) – This is used to tell the user whether the option is required or optional, or whether they can specify the option multiple times.

class OutputFieldInfo(field_name=None, display_name=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Command.OutputFieldInfo class describes the name used by the CLI to display a single attribute of a class element in the interface definition language.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • field_name (str) – Name of the attribute.

  • display_name (str) – Name used by the CLI to display the attribute.

class OutputInfo(structure_id=None, output_fields=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Command.OutputInfo class describes the names used by the CLI to display the attributes of a class element in the interface definition language as well as the order in which the attributes will be displayed.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • structure_id (str) – Name of the class. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vapi.structure. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vapi.structure.

  • output_fields (list of Command.OutputFieldInfo) – The order in which the attributes of the class will be displayed by the CLI as well as the names used to display the attributes.

fingerprint()

Returns the aggregate fingerprint of all the command metadata from all the metadata sources.

The fingerprint provides clients an efficient way to check if the metadata for commands has been modified on the server.

Return type

str

Returns

Fingerprint of all the command metadata present on the server.

get(identity)

Retrieves information about a command including information about how to execute that command.

Parameters

identity (Command.Identity) – Identifier of the command for which to retreive information.

Return type

Command.Info

Returns

Information about the command including information about how to execute that command.

Raise

com.vmware.vapi.std.errors_client.NotFound if a command corresponding to identity doesn’t exist.

list(path=None)

Returns the identifiers of all commands, or commands in a specific namespace.

Parameters

path (str or None) – The dot-separated path of the namespace for which command identifiers should be returned. If None identifiers of all commands registered with the infrastructure will be returned.

Return type

list of Command.Identity

Returns

Identifiers of the requested commands.

Raise

com.vmware.vapi.std.errors_client.NotFound if a namespace corresponding to path doesn’t exist.

class com.vmware.vapi.metadata.cli_client.Namespace(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Namespace class provides methods to get information about command line interface (CLI) namespaces.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class Identity(path=None, name=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Namespace.Identity class uniquely identifies a namespace in the CLI namespace tree.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • path (str) – The dot-separated path of the namespace containing the namespace in the CLI node tree. For top-level namespace this will be empty.

  • name (str) – The name displayed to the user for this namespace.

class Info(identity=None, description=None, children=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Namespace.Info class contains information about a namespace. It includes the identity of the namespace, a description, information children namespaces.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • identity (Namespace.Identity) – Basic namespace identity.

  • description (str) – The text description displayed to the user in help output.

  • children (list of Namespace.Identity) – The children of this namespace in the tree of CLI namespaces.

fingerprint()

Returns the aggregate fingerprint of all the namespace metadata from all the metadata sources.

The fingerprint provides clients an efficient way to check if the metadata for namespaces has been modified on the server.

Return type

str

Returns

Fingerprint of all the namespace metadata present on the server.

get(identity)

Retreives information about a namespace including information about children of that namespace.

Parameters

identity (Namespace.Identity) – Identifier of the namespace for which to retreive information.

Return type

Namespace.Info

Returns

Information about the namespace including information about child of that namespace.

Raise

com.vmware.vapi.std.errors_client.NotFound if a namespace corresponding to identity doesn’t exist.

list()

Returns the identifiers of all namespaces registered with the infrastructure.

Return type

list of Namespace.Identity

Returns

Identifiers of all the namespaces.

class com.vmware.vapi.metadata.cli_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

stub_config (vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance

com.vmware.vapi.metadata.metamodel_client module

The com.vmware.vapi.metadata.metamodel_client module provides classes that expose all the information present in the interface definition language (IDL) specification.

Metamodel metadata is organized into an hierarchy of elements. The main elements are:

  • Enumeration: An enumeration element that has a list of enumeration value elements.

  • Constant: A constant element has a name and a value.

  • Structure: A structure element can have field elements, constant elements and enumeration elements.

  • Operation: An operation has a list of parameter elements, result element and error elements.

  • Service: A service is a collection of operation elements, structure elements, enumerated elements and constant elements.

  • Package: A package is a collection of service elements, structure elements and enumeration elements.

  • Component: A component is a collection of package elements.

The com.vmware.vapi.metadata.metamodel_client module has classes that enables two styles of client applications:

  • A client can retrieve the exact pieces of information it requires using the various granularities the API supports (that is Component, Package, Service, Structure, Enumeration and com.vmware.vapi.metadata.metamodel.service_client.Operation). In this case, it doesn’t cache any information locally and always invokes methods to get the metamodel information it requires.

  • A client can retrieve all the metamodel information in fewer method invocations using the Component class and cache the output locally. It can then poll on the fingerprint information exposed by the Component class to monitor changes in API definition.

class com.vmware.vapi.metadata.metamodel_client.Component(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Component class 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 classes 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 class Package.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

RESOURCE_TYPE = 'com.vmware.vapi.component'

Resource type for component.

fingerprint(component_id)

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 Component.get().

Parameters

component_id (str) – Identifier of the component element. The parameter must be an identifier for the resource type: com.vmware.vapi.component.

Return type

str

Returns

The fingerprint computed from the metamodel metadata of the component element.

Raise

com.vmware.vapi.std.errors_client.NotFound if the component element associated with component_id is not registered with the infrastructure.

get(component_id)

Retrieves metamodel information about the component element corresponding to component_id.

The 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 (str) – Identifier of the component element. The parameter must be an identifier for the resource type: com.vmware.vapi.component.

Return type

ComponentData

Returns

The ComponentData instance that corresponds to component_id.

Raise

com.vmware.vapi.std.errors_client.NotFound if the component element associated with component_id is not registered with the infrastructure.

list()

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

Return type

list of str

Returns

The list of identifiers for the component elements that are registered with the infrastructure. The return value will contain identifiers for the resource type: com.vmware.vapi.component.

class com.vmware.vapi.metadata.metamodel_client.ComponentData(info=None, fingerprint=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ComponentData class contains the metamodel metadata information of a component element along with its fingerprint.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • info (ComponentInfo) –

    Metamodel information of the component element. This includes information about all the package elements contained in this component element.

    The metamodel information about a component could be quite large if there are a lot of package elements contained in this component.

  • fingerprint (str) –

    Fingerprint of the metamodel metadata of the component component.

    Metamodel information could change when there is an infrastructure update and new functionality is added to an existing component.

    Since the data present in ComponentData.info could be quite large, fingerprint provides a convenient way to check if the data for a particular component is updated.

    You should store the fingerprint associated with a component. After an update, by invoking the Component.fingerprint() method, you can retrieve the new fingerprint for the component. If the new fingerprint and the previously stored fingerprint do not match, clients can use the Component.get() to retrieve the new metamodel information for the component.

class com.vmware.vapi.metadata.metamodel_client.ComponentInfo(name=None, packages=None, metadata=None, documentation=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ComponentInfo class contains metamodel metadata information about a component element.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • name (str) – Dot separated name of the component element. The segments in the name reflect the organization of the APIs. The format of each segment is lower case with underscores. Each underscore represents a word boundary. If there are acronyms in the word, the capitalization is preserved. This format makes it easy to translate the segment into a different naming convention.

  • packages (dict of str and PackageInfo) – Metamodel metadata information of all the package elements contained in the component element. The key in the dict is the identifier of the package element and the value in the dict is the metamodel information of the package element. When clients pass a value of this class as a parameter, the key in the attribute dict must be an identifier for the resource type: com.vmware.vapi.package. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: com.vmware.vapi.package.

  • metadata (dict of str and ElementMap) –

    Generic metadata for the component element. The key in the dict is the name of the metadata element and the value is the data associated with that metadata element.

    The MetadataIdentifier contains possible string values for keys in the dict.

  • documentation (str) – English language documentation for a component. It can contain HTML markup and documentation tags (similar to Javadoc tags). The first sentence of the package documentation is a complete sentence that identifies the component by name and summarizes the purpose of the component.

class com.vmware.vapi.metadata.metamodel_client.ConstantInfo(type=None, value=None, documentation=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ConstantInfo class contains metamodel information of the constant elements.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • type (Type) – Type of the constant element.

  • value (ConstantValue) – Value of the constant element.

  • documentation (str) – English language documentation for the constant element. It can contain HTML markup and documentation tags (similar to Javadoc tags).

class com.vmware.vapi.metadata.metamodel_client.ConstantValue(category=None, primitive_value=None, list_value=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ConstantValue class contains the metamodel information of the constant element.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
class Category(string)

Bases: vmware.vapi.bindings.enum.Enum

The ConstantValue.Category class defines class attributes for the valid kinds of values.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the Category instance.

LIST = Category(string='LIST')

Indicates the type of constant value is a list.

PRIMITIVE = Category(string='PRIMITIVE')

Indicates the type of constant value is primitive.

class com.vmware.vapi.metadata.metamodel_client.ElementMap(elements=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ElementMap class contains the metadata elements.

One of the sources for metadata is the annotations present in the interface definition language. When an annotation is represented in the ElementMap, ElementMap describes the data specified in the arguments for the annotation.

For example, in \\@UnionCase(tag="tag", value="SELECT"), ElementMap describes the keyword arguments tag and value.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

elements (dict of str and ElementValue) – Metamodel information of the metadata elements. The key parameter of the dict is the identifier for the element and the value corresponds to the element value.

class com.vmware.vapi.metadata.metamodel_client.ElementValue(type=None, long_value=None, string_value=None, list_value=None, structure_id=None, structure_ids=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ElementValue class describes the value of the metadata element.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • type (ElementValue.Type) – Type of the value.

  • long_value (long) – Long value of the metadata element. This attribute is optional and it is only relevant when the value of type is ElementValue.Type.LONG.

  • string_value (str) – String value of the metadata element. This attribute is optional and it is only relevant when the value of type is ElementValue.Type.STRING.

  • list_value (list of str) – List of strings value of the metadata element. This attribute is optional and it is only relevant when the value of type is ElementValue.Type.STRING_LIST.

  • structure_id (str) – Identifier of the structure element. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vapi.structure. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vapi.structure. This attribute is optional and it is only relevant when the value of type is ElementValue.Type.STRUCTURE_REFERENCE.

  • structure_ids (list of str) – List of identifiers of the structure elements. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type: com.vmware.vapi.structure. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: com.vmware.vapi.structure. This attribute is optional and it is only relevant when the value of type is ElementValue.Type.STRUCTURE_REFERENCE_LIST.

class Type(string)

Bases: vmware.vapi.bindings.enum.Enum

The ElementValue.Type class defines the valid types for values in metadata elements.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the Type instance.

LONG = Type(string='LONG')

Indicates the type of the value is a long (64 bit signed integer).

STRING = Type(string='STRING')

Indicates the type of the value is a string (a variable length sequence of characters). The encoding is UTF-8.

STRING_LIST = Type(string='STRING_LIST')

Indicates the type of the value is a list of strings.

STRUCTURE_REFERENCE = Type(string='STRUCTURE_REFERENCE')

Indicates the type of the value is an identifier for a structure element.

STRUCTURE_REFERENCE_LIST = Type(string='STRUCTURE_REFERENCE_LIST')

Indicates the type of the value is a list of identifiers for a structure element.

class com.vmware.vapi.metadata.metamodel_client.Enumeration(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Enumeration class provides methods to retrieve metamodel information about an enumeration element in the interface definition language.

The Enumeration has a list of enumeration value elements.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

RESOURCE_TYPE = 'com.vmware.vapi.enumeration'

Resource type for enumeration.

get(enumeration_id)

Retrieves information about the enumeration element corresponding to enumeration_id.

The EnumerationInfo contains the metamodel information about the enumeration value element contained in the enumeration element.

Parameters

enumeration_id (str) – Identifier of the enumeration element. The parameter must be an identifier for the resource type: com.vmware.vapi.enumeration.

Return type

EnumerationInfo

Returns

The EnumerationInfo instance that corresponds to enumeration_id

Raise

com.vmware.vapi.std.errors_client.NotFound if the enumeration element associated with enumeration_id is not contained in any of the package elements, service elements and structure elements.

list()

Returns the identifiers for the enumeration elements that are contained in all the package elements, service elements and structure elements.

Return type

list of str

Returns

The list of identifiers for the enumeration elements. The return value will contain identifiers for the resource type: com.vmware.vapi.enumeration.

class com.vmware.vapi.metadata.metamodel_client.EnumerationInfo(name=None, values=None, metadata=None, documentation=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The EnumerationInfo class contains the metamodel information of an enumeration element.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • name (str) – Dot separated name of the enumeration element. The segments in the name reflect the organization of the APIs. The format of each segment is lower case with underscores. Each underscore represents a word boundary. If there are acronyms in the word, the capitalization is preserved. This format makes it easy to translate the segment into a different naming convention.

  • values (list of EnumerationValueInfo) – Metamodel information of all the enumeration value elements contained in this enumeration element. The order of the enumeration value elements in the list is same as the order in which they are defined in the interface definition file.

  • metadata (dict of str and ElementMap) –

    Generic metadata elements for an enumeration element. The key in the dict is the name of the metadata element and the value is the data associated with that metadata element.

    The MetadataIdentifier contains possible string values for keys in the dict.

  • documentation (str) –

    English language documentation for an enumeration element. It can contain HTML markup and Javadoc tags. The first sentence of the enumeration documentation is a complete sentence that identifies the enumeration by name and summarizes the purpose of the enumeration. The documentation describes the context in which the enumeration is used.

    The documentation also contains references to the context in which the enumeration is used. But if the enumeration is used in many contexts, the references may not be present.

class com.vmware.vapi.metadata.metamodel_client.EnumerationValueInfo(value=None, metadata=None, documentation=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The EnumerationValueInfo class describes the class attribute in the class.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • value (str) – Value in the enumerated type. All the characters in the string are capitalized.

  • metadata (dict of str and ElementMap) –

    Additional metadata for enumeration value in the enumerated type. The key in the dict is the name of the metadata element and the value is the data associated with that metadata element.

    The MetadataIdentifier contains possible string values for keys in the dict.

  • documentation (str) – English language documentation for an enumeration value. It can contain HTML markup and documentation tags (similar to Javadoc tags). The first statement will be a noun or verb phrase that describes the purpose of the enumeration value.

class com.vmware.vapi.metadata.metamodel_client.ErrorInfo(structure_id=None, documentation=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ErrorInfo class contains the metadata information about the error elements contained in an operation element.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • structure_id (str) – Identifier for the structure element corresponding to the error that is being reported by the operation. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vapi.structure. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vapi.structure.

  • documentation (str) – The English language documentation for the service element. It can contain HTML markup and Javadoc tags.

class com.vmware.vapi.metadata.metamodel_client.FieldInfo(name=None, type=None, metadata=None, documentation=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The FieldInfo class contains metamodel information of a field element contained in a structure element.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • name (str) – Name of the field element in a canonical format. The format is lower case with underscores. Each underscore represents a word boundary. If there are acronyms in the word, the capitalization is preserved. This format makes it easy to translate the segment into a different naming convention.

  • type (Type) – Type information.

  • metadata (dict of str and ElementMap) –

    Generic metadata elements for the field element. The key in the dict is the name of the metadata element and the value is the data associated with that metadata element.

    The MetadataIdentifier contains possible string values for keys in the dict.

  • documentation (str) – English language documentation for the service element. It can contain HTML markup and Javadoc tags.

class com.vmware.vapi.metadata.metamodel_client.GenericInstantiation(generic_type=None, element_type=None, map_key_type=None, map_value_type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The GenericInstantiation class describes the type information of a typed element when the type is an instantiation of one of the generic types provided by the infrastructure.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
class GenericType(string)

Bases: vmware.vapi.bindings.enum.Enum

The GenericInstantiation.GenericType class provides class attributes for each of the generic types provided by the infrastructure.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the GenericType instance.

LIST = GenericType(string='LIST')

Indicates the generic type is a list.

MAP = GenericType(string='MAP')

Indicates the generic type is a map.

OPTIONAL = GenericType(string='OPTIONAL')

Indicates the generic type is an optional.

SET = GenericType(string='SET')

Indicates the generic type is a set.

class com.vmware.vapi.metadata.metamodel_client.MetadataIdentifier(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The MetadataIdentifier class provides string constants that can be used as identifiers for the metadata elements.

Most of the types in com.vmware.vapi.metadata.metamodel_client package has a metadata field whose type is Map<String, ElementMap>. MetadataIdentifier contains the identifiers used in the keys of the above Map type.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

CANONICAL_NAME = 'CanonicalName'

Identifier representing the CanonicalName metadata.

COMPONENT = 'Component'

Identifier representing the Component metadata.

CREATE = 'Create'

Identifier representing the Create metadata.

CRUD = 'Crud'

Identifier representing the Crud metadata.

HAS_FIELDS_OF = 'HasFieldsOf'

Identifier representing the HasFieldsOf metadata.

INCLUDABLE = 'Includable'

Identifier representing the Includable metadata.

INCLUDE = 'Include'

Identifier representing the Include metadata.

IS_ONE_OF = 'IsOneOf'

Identifier representing the IsOneOf metadata.

MODEL = 'Model'

Identifier representing the Model metadata.

READ = 'Read'

Identifier representing the Read metadata.

RESOURCE = 'Resource'

Identifier representing the Resource metadata.

UNION_CASE = 'UnionCase'

Identifier representing the UnionCase metadata.

UNION_TAG = 'UnionTag'

Identifier representing the UnionTag metadata.

UPDATE = 'Update'

Identifier representing the Update metadata.

class com.vmware.vapi.metadata.metamodel_client.OperationInfo(name=None, params=None, output=None, errors=None, metadata=None, documentation=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The OperationInfo class contains metamodel information of an operation element.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • name (str) – Name of the operation element in a canonical format. The format is lower case with underscores. Each underscore represents a word boundary. If there are acronyms in the word, the capitalization is preserved. This format makes it easy to translate the segment into a different naming convention.

  • params (list of FieldInfo) – Metamodel information for the parameter elements. The order of the parameters elements in the list is same as the order of the parameters declared in the interface definition file.

  • output (OperationResultInfo) – Metamodel type for the output element.

  • errors (list of ErrorInfo) – List of error elements that might be reported by the operation element. If the operation reports the same error for more than one reason, the list contains the error element associated with the error more than once with different documentation elements.

  • metadata (dict of str and ElementMap) –

    Generic metadata elements for the operation element. The key in the dict is the name of the metadata element and the value is the data associated with that metadata element.

    The MetadataIdentifier contains possible string values for key in the dict.

  • documentation (str) – English language documentation for the service element. It can contain HTML markup and Javadoc tags.

class com.vmware.vapi.metadata.metamodel_client.OperationResultInfo(type=None, metadata=None, documentation=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The OperationResultInfo class contains the metamodel information of an operation result element.

An operation accepts a list of parameters and returns a result or an error. The OperationResultInfo describes the result element of an operation.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • type (Type) – Type information of the operation result element.

  • metadata (dict of str and ElementMap) –

    Generic metadata elements for the service element. The key in the dict is the name of the metadata element and the value is the data associated with that metadata element.

    The MetadataIdentifier contains possible string values for keys in the dict.

  • documentation (str) – English language documentation for the operation result element. It can contain HTML markup and Javadoc tags.

class com.vmware.vapi.metadata.metamodel_client.Package(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Package class provides methods to retrieve metamodel information about a package element in the interface definition language.

A package is a logical grouping of services, structures and enumerations. A package element describes the package. It contains the service elements, structure elements and enumeration elements that are grouped together.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

RESOURCE_TYPE = 'com.vmware.vapi.package'

Resource type for package.

get(package_id)

Retrieves information about the package element corresponding to package_id.

Parameters

package_id (str) – Identifier of the package element. The parameter must be an identifier for the resource type: com.vmware.vapi.package.

Return type

PackageInfo

Returns

The PackageInfo instance that corresponds to package_id.

Raise

com.vmware.vapi.std.errors_client.NotFound if the package element associated with package_id does not exist.

list()

Returns the identifiers for the packages elements that are contained in all the registered component elements.

Return type

list of str

Returns

The list of identifiers for the package elements that are contained in all the registered component elements. The return value will contain identifiers for the resource type: com.vmware.vapi.package.

class com.vmware.vapi.metadata.metamodel_client.PackageInfo(name=None, structures=None, enumerations=None, services=None, metadata=None, documentation=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The PackageInfo class contains the metamodel information of all the service elements, structure elements and enumeration elements contained in the package element.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • name (str) – Dot separated name of the package element. The segments in the name reflect the organization of the APIs. The format of each segment is lower case with underscores. Each underscore represents a word boundary. If there are acronyms in the word, the capitalization is preserved. This format makes it easy to translate the segment into a different naming convention.

  • structures (dict of str and StructureInfo) –

    Metamodel information of all the structure elements contained in the package element. The key in the dict is the identifier of the structure element and the value in the dict is the metamodel information for the structure element.

    This does not include the structure elements contained in the service elements that are contained in this package element. When clients pass a value of this class as a parameter, the key in the attribute dict must be an identifier for the resource type: com.vmware.vapi.structure. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: com.vmware.vapi.structure.

  • enumerations (dict of str and EnumerationInfo) –

    Metamodel information of all the enumeration elements contained in the package element. The key in the dict is the identifier of the enumeration element and the value in the dict is the metamodel information for the enumeration element.

    This does not include the enumeration elements that are contained in the service elements of this package element or structure elements of this package element. When clients pass a value of this class as a parameter, the key in the attribute dict must be an identifier for the resource type: com.vmware.vapi.enumeration. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: com.vmware.vapi.enumeration.

  • services (dict of str and ServiceInfo) – Metamodel information of all the service elements contained in the package element. The key in the dict is the identifier of the service element and the value in the dict is the metamodel information for the service element. When clients pass a value of this class as a parameter, the key in the attribute dict must be an identifier for the resource type: com.vmware.vapi.service. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: com.vmware.vapi.service.

  • metadata (dict of str and ElementMap) –

    Generic metadata elements for the package element. The key in the dict is the name of the metadata element and the value is the data associated with that metadata element.

    The MetadataIdentifier contains possible string values for keys in the dict.

  • documentation (str) –

    English language documentation for a package. It can contain HTML markup and Javadoc tags. The first sentence of the package documentation is a complete sentence that identifies the package by name and summarizes the purpose of the package.

    The primary purpose of a package documentation is to provide high-level context that will provide a framework in which the users can put the detail about the package contents.

class com.vmware.vapi.metadata.metamodel_client.PrimitiveValue(type=None, boolean_value=None, double_value=None, long_value=None, string_value=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The PrimitiveValue class contains value of the constant element.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • type (PrimitiveValue.Type) – Type of the constant value.

  • boolean_value (bool) – Boolean value of the constant. This attribute is optional and it is only relevant when the value of type is PrimitiveValue.Type.BOOLEAN.

  • double_value (float) – Double value of the constant. This attribute is optional and it is only relevant when the value of type is PrimitiveValue.Type.DOUBLE.

  • long_value (long) – Long value of the constant. This attribute is optional and it is only relevant when the value of type is PrimitiveValue.Type.LONG.

  • string_value (str) – String value of the constant. This attribute is optional and it is only relevant when the value of type is PrimitiveValue.Type.STRING.

class Type(string)

Bases: vmware.vapi.bindings.enum.Enum

The PrimitiveValue.Type class defines the valid types for values in constant elements.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the Type instance.

BOOLEAN = Type(string='BOOLEAN')

Indicates the value is a boolean (true or false).

DOUBLE = Type(string='DOUBLE')

Indicates the value is a double (64 bit floating number).

LONG = Type(string='LONG')

Indicates the value is a long (64 bit signed integer).

STRING = Type(string='STRING')

Indicates the value is a string (a variable length sequence of characters). The encoding is UTF8.

class com.vmware.vapi.metadata.metamodel_client.Resource(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Resource class provides methods to retrieve information about resource types.

A service is a logical grouping of operations that operate on an entity. Each entity is identifier by a namespace (or resource type) and an unique identifier.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

RESOURCE_TYPE = 'com.vmware.vapi.resource'

Resource type for resource.

list()

Returns the set of resource types present across all the service elements contained in all the package elements.

Return type

set of str

Returns

Set of resource types The return value will contain identifiers for the resource type: com.vmware.vapi.resource.

class com.vmware.vapi.metadata.metamodel_client.Service(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Service class provides methods to retrieve metamodel information about a service element in the interface definition language.

A service is a logical grouping of operations that operate on some entity. A service element describes a service. It contains operation elements that describe the operations grouped in the service. It also contains structure elements and enumeration elements corresponding to the structures and enumerations defined in the service.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

RESOURCE_TYPE = 'com.vmware.vapi.service'

Resource type for service.

get(service_id)

Retrieves information about the service element corresponding to service_id.

The ServiceInfo contains the metamodel information for the operation elements, structure elements and enumeration elements contained in the service element.

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

ServiceInfo

Returns

The ServiceInfo instance that corresponds to service_id

Raise

com.vmware.vapi.std.errors_client.NotFound if the service element associated with service_id is not registered with the infrastructure.

list()

Returns the identifiers for the service elements that are currently registered with the infrastructure.

The list of service elements is an aggregate list of all the service elements contained in all the package elements.

Return type

list of str

Returns

The list of identifiers for the service elements that are currently registered with the infrastructure. The return value will contain identifiers for the resource type: com.vmware.vapi.service.

class com.vmware.vapi.metadata.metamodel_client.ServiceInfo(name=None, operations=None, structures=None, enumerations=None, constants=None, metadata=None, documentation=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ServiceInfo class contains the metamodel information of all the operation elements, structure elements and enumeration elements containted in a service element.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • name (str) – Dot separated name of the service element. The segments in the name reflect the organization of the APIs. The format of each segment is lower case with underscores. Each underscore represents a word boundary. If there are acronyms in the word, the capitalization is preserved. This format makes it easy to translate the segment into a different naming convention.

  • operations (dict of str and OperationInfo) – Metamodel information of all the operation elements contained in the service element. The key in the dict is the identifier of the operation element and the value in the dict is the metamodel information for the operation element. When clients pass a value of this class as a parameter, the key in the attribute dict must be an identifier for the resource type: com.vmware.vapi.operation. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: com.vmware.vapi.operation.

  • structures (dict of str and StructureInfo) – Metamodel information of all the structure elements contained in the service element. The key in the dict is the identifier of the structure element and the value in the dict is the metamodel information for the structure element. When clients pass a value of this class as a parameter, the key in the attribute dict must be an identifier for the resource type: com.vmware.vapi.structure. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: com.vmware.vapi.structure.

  • enumerations (dict of str and EnumerationInfo) – Metamodel information of all the enumeration elements contained in the service element. The key in the dict is the identifier of the enumeration element and the value in the dict is the metamodel information for the enumeration element. When clients pass a value of this class as a parameter, the key in the attribute dict must be an identifier for the resource type: com.vmware.vapi.enumeration. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: com.vmware.vapi.enumeration.

  • constants (dict of str and ConstantInfo) – Metamodel information of all the constant elements contained in the service element. The key in the dict is the name of the constant element and the value in the dict is the metamodel information for the contant element.

  • metadata (dict of str and ElementMap) –

    Generic metadata elements for the service element. The key in the dict is the name of the metadata element and the value is the data associated with that metadata element.

    The MetadataIdentifier contains possible string values for keys in the dict.

  • documentation (str) – English language documentation for the service element. It can contain HTML markup and Javadoc tags. The first sentence of the service documentation is a complete sentence that identifies the service by name and summarizes the purpose of the service. The remaining part of the documentation provides a summary of how to use the operations defined in the service.

class com.vmware.vapi.metadata.metamodel_client.Structure(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Structure class providers methods to retrieve metamodel information about a structure 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.structure'

Resource type for structure.

get(structure_id)

Retrieves information about the structure element corresponding to structure_id.

The StructureInfo contains the metamodel information about the structure element. It contains information about all the field elements and enumeration elements contained in this structure element.

Parameters

structure_id (str) – Identifier of the structure element. The parameter must be an identifier for the resource type: com.vmware.vapi.structure.

Return type

StructureInfo

Returns

The StructureInfo instance that corresponds to structure_id.

Raise

com.vmware.vapi.std.errors_client.NotFound if the structure element associated with structure_id is not contained in any of the package elements or service elements.

list()

Returns the identifiers for the structure elements that are contained in all the package elements and service elements.

Return type

list of str

Returns

The list of identifiers for the structure elements. The return value will contain identifiers for the resource type: com.vmware.vapi.structure.

class com.vmware.vapi.metadata.metamodel_client.StructureInfo(name=None, type=None, enumerations=None, constants=None, fields=None, metadata=None, documentation=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The StructureInfo class contains the metamodel information of all the field elements, constant elements and enumeration elements contained in the structure element.

In the interface definition language, API designers have the ability to include all the fields from one structure to another structure. This is done by using an annotation \\@Include on the structure in which we want to add the fields. If this annotation is present, the list of fields in the StructureInfo will also contain the fields that are being included. The annotation information is also retained in the StructureInfo.metadata element as well.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • name (str) – Dot separated name of the structure element. The segments in the name reflect the organization of the APIs. The format of each segment is lower case with underscores. Each underscore represents a word boundary. If there are acronyms in the word, the capitalization is preserved. This format makes it easy to translate the segment into a different naming convention.

  • type (StructureInfo.Type) – Type of the structure.

  • enumerations (dict of str and EnumerationInfo) – Metamodel information of all the enumeration elements contained in the structure element. The key in the dict is the identifier of the enumeration element and the value is the metamodel information of the enumeration element. When clients pass a value of this class as a parameter, the key in the attribute dict must be an identifier for the resource type: com.vmware.vapi.enumeration. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: com.vmware.vapi.enumeration.

  • constants (dict of str and ConstantInfo) – Metamodel information of all the constant elements contained in the structure element. The key in the dict is the name of the constant element and the value in the dict is the metamodel information for the constant element.

  • fields (list of FieldInfo) – Metamodel information of all the field elements. The order of the field elements in the list matches the order in which the fields are defined in the service.

  • metadata (dict of str and ElementMap) –

    Generic metadata elements for the structure element. The key in the dict is the name of the metadata element and the value is the data associated with that metadata element.

    The MetadataIdentifier contains possible string values for keys in the dict.

  • documentation (str) – English language documentation for a structure element. It can contain HTML markup and Javadoc tags. The first sentence of the structure documentation is a complete sentence that identifies the structure by name and summarizes the purpose of the structure.

class Type(string)

Bases: vmware.vapi.bindings.enum.Enum

The StructureInfo.Type class defines the kind of this structure element. In the interface definition language, structure element and error element have similar characteristics. The difference is that only error elements can be used to describe the exceptions of an operation element.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the Type instance.

ERROR = Type(string='ERROR')

If the type is an error element.

STRUCTURE = Type(string='STRUCTURE')

If the type is a structure element.

class com.vmware.vapi.metadata.metamodel_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

stub_config (vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance

class com.vmware.vapi.metadata.metamodel_client.Type(category=None, builtin_type=None, user_defined_type=None, generic_instantiation=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Type class describes the type information of a typed element in the interface definiton language. The following elements in the metamodel are typed:

  • Field element in a structure element. See StructureInfo.fields

  • Parameter element in an operation element. See OperationInfo.params

  • Result element in an operation element. See OperationInfo.output

The type could be one of the three following categories:

  • Built-in types: These are types present in the interface definition language type system. They are provided by the infrastructure.

  • User defined named type: API designers can create custom types and use them for the typed elements. These types have a unique identifier.

  • Generic type instantiation: The language infrastructure also provides generic types such as list, map, set and so on. An instantiation of one of these generic types could also be used for the typed elements.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • category (Type.Category) – Category of this type.

  • builtin_type (Type.BuiltinType) – Category of the built-in type. This attribute is optional and it is only relevant when the value of category is Type.Category.BUILTIN.

  • user_defined_type (UserDefinedType) – Identifier and type of the user defined type. This attribute is optional and it is only relevant when the value of category is Type.Category.USER_DEFINED.

  • generic_instantiation (GenericInstantiation) – Instantiation of one of the generic types available in the interface definition language. This attribute is optional and it is only relevant when the value of category is Type.Category.GENERIC.

class BuiltinType(string)

Bases: vmware.vapi.bindings.enum.Enum

The Type.BuiltinType class provides class attribute for each of the built-in types present in the interface definition language type system.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the BuiltinType instance.

ANY_ERROR = BuiltinType(string='ANY_ERROR')

The built-in type is an arbitrary exception type. This is used if the value of a typed element can be one of any user defined named type which is an exception.

BINARY = BuiltinType(string='BINARY')

The built-in type is a binary. The value is a variable-length sequence of zero or more bytes.

BOOLEAN = BuiltinType(string='BOOLEAN')

The built-in type is a boolean. The value is true or false.

DATE_TIME = BuiltinType(string='DATE_TIME')

The built-in type is a datetime. The value should be in the UTC timezone and the precision is milliseconds.

DOUBLE = BuiltinType(string='DOUBLE')

The built-in type is a double. The value is a 64 bit floating point number.

DYNAMIC_STRUCTURE = BuiltinType(string='DYNAMIC_STRUCTURE')

The built-in type is a dynamic structure. This is used if the value of a typed element can be one of any user defined named type.

ID = BuiltinType(string='ID')

The built-in type is an ID. The value represents an identifier for a resource.

LONG = BuiltinType(string='LONG')

The built-in type is a long. The value is a 64 bit signed integer.

OPAQUE = BuiltinType(string='OPAQUE')

The built-in type is an opaque. This is used if the value of a typed element could be of any type and the actual type will be known only during the execution of the API. This is mostly used in infrastructure classes.

SECRET = BuiltinType(string='SECRET')

The built-in type is a secret. The value is a variable-length sequence of zero or more unicode characters. The value contains sensitive data that should not be printed or displayed anywhere.

STRING = BuiltinType(string='STRING')

The built-in type is a string. The value is a variable-length sequence of zero or more unicode characters.

URI = BuiltinType(string='URI')

The built-in type is an URI. The value follows the IRI specification in RFC 3987.

VOID = BuiltinType(string='VOID')

The built-in type is a void. The value is None.

class Category(string)

Bases: vmware.vapi.bindings.enum.Enum

The Type.Category class provides class attribute for each category of the type.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the Category instance.

BUILTIN = Category(string='BUILTIN')

The type is one of the built-in types specified in Type.BuiltinType

GENERIC = Category(string='GENERIC')

The type is an instantiation of one of the generic types.

USER_DEFINED = Category(string='USER_DEFINED')

The type is one of the user defined named types.

class com.vmware.vapi.metadata.metamodel_client.UserDefinedType(resource_type=None, resource_id=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The UserDefinedType class contains the metamodel type information of a typed element whose type is a user defined named type.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • resource_type (str) – Category of the user defined named type. The named type could be a structure element or an enumeration element. When clients pass a value of this class as a parameter, the attribute must be one of com.vmware.vapi.structure or com.vmware.vapi.enumeration. When methods return a value of this class as a return value, the attribute will be one of com.vmware.vapi.structure or com.vmware.vapi.enumeration.

  • resource_id (str) – Identifier of the user defined named type. When clients pass a value of this class as a parameter, the attribute must be an identifier for one of these resource types: com.vmware.vapi.structure or com.vmware.vapi.enumeration. When methods return a value of this class as a return value, the attribute will be an identifier for one of these resource types: com.vmware.vapi.structure or com.vmware.vapi.enumeration.

com.vmware.vapi.metadata.privilege_client module

The com.vmware.vapi.metadata.privilege_client module provides classes that expose privilege information for operation elements across all the service elements.

An entity has a unique identifier and a resource type. An entity can either be present in one of the parameter elements or if a parameter is a structure element, it could also be present in one of the field elements.

Privileges can be assigned to either operation elements or entities used in the operation element. A list of privileges can also be applied on a package element. This list of privileges would be used as a default for all the operation elements and the entities that do not have any defined privileges.

class com.vmware.vapi.metadata.privilege_client.Component(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Component class provides methods to retrieve privilege information of a component element.

A component element is said to contain privilege information if any one of package elements in it contains privilege information.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

RESOURCE_TYPE = 'com.vmware.vapi.component'

Resource type for vAPI component.

fingerprint(component_id)

Retrieves the fingerprint computed from the privilege 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 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 Component.get().

Parameters

component_id (str) – Identifier of the component element. The parameter must be an identifier for the resource type: com.vmware.vapi.component.

Return type

str

Returns

The fingerprint computed from the privilege metadata of the component.

Raise

com.vmware.vapi.std.errors_client.NotFound if the component element associated with component_id does not have any privilege information.

get(component_id)

Retrieves privilege information about the component element corresponding to component_id.

The ComponentData contains the privilege information about the component element and its fingerprint. It contains information about all the package elements that belong to this component element.

Parameters

component_id (str) – Identifier of the component element. The parameter must be an identifier for the resource type: com.vmware.vapi.component.

Return type

ComponentData

Returns

The ComponentData instance that corresponds to component_id

Raise

com.vmware.vapi.std.errors_client.NotFound if the component element associated with component_id does not have any privilege information.

list()

Returns the identifiers for the component elements that have privilege information.

Return type

list of str

Returns

The list of identifiers for the component elements that have privilege information. The return value will contain identifiers for the resource type: com.vmware.vapi.component.

class com.vmware.vapi.metadata.privilege_client.ComponentData(info=None, fingerprint=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ComponentData class contains the privilege information of the component along with its fingerprint.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • info (ComponentInfo) – Privilege information of the component. This includes information about all the modules in the component.

  • fingerprint (str) –

    Fingerprint of the metadata of the component.

    Privilege information could change when there is an infrastructure update. Since the data present in ComponentData.info could be quite large, fingerprint provides a convenient way to check if the data for a particular component is updated.

    You should store the fingerprint associated with a component. After an update, by invoking the Component.fingerprint() method, you can retrieve the new fingerprint for the component. If the new fingerprint and the previously stored fingerprint do not match, clients can then use the Component.get() to retrieve the new privilege information for the component.

class com.vmware.vapi.metadata.privilege_client.ComponentInfo(packages=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ComponentInfo class contains the privilege information of a component element.

For an explanation of privilege information contained within component elements, see Component.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

packages (dict of str and PackageInfo) –

Privilege information of all the package elements. The key in the dict is the identifier of the package element and the value in the dict is the privilege information for the package element.

For an explanation of privilege information containment within package elements, see Package. When clients pass a value of this class as a parameter, the key in the attribute dict must be an identifier for the resource type: com.vmware.vapi.package. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: com.vmware.vapi.package.

class com.vmware.vapi.metadata.privilege_client.OperationInfo(privileges=None, privilege_info=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The OperationInfo class contains privilege information of an operation element.

For an explanation of containment within operation elements, see com.vmware.vapi.metadata.privilege.service_client.Operation.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • privileges (list of str) – List of all privileges assigned to the operation element.

  • privilege_info (list of PrivilegeInfo) – Privilege information of all the parameter elements of the operation element. For an explanation of containment of privilege information within parameter elements, see PrivilegeInfo.

class com.vmware.vapi.metadata.privilege_client.Package(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Package class provides methods to retrieve privilege information of a package element.

A package element is said to contain privilege information if there is a default privilege assigned to all service elements contained in the package element or if one of the operation elements contained in one of the service elements in this package element has privilege information.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

RESOURCE_TYPE = 'com.vmware.vapi.package'

Resource type for package.

get(package_id)

Retrieves privilege information about the package element corresponding to package_id.

Parameters

package_id (str) – Identifier of the package element. The parameter must be an identifier for the resource type: com.vmware.vapi.package.

Return type

PackageInfo

Returns

The PackageInfo instance that corresponds to package_id

Raise

com.vmware.vapi.std.errors_client.NotFound if the package element associated with package_id does not have any privilege information.

list()

Returns the identifiers for the package elements that have privilege information.

Return type

list of str

Returns

The list of identifiers for the package elements that have privilege information. The return value will contain identifiers for the resource type: com.vmware.vapi.package.

class com.vmware.vapi.metadata.privilege_client.PackageInfo(privileges=None, services=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The PackageInfo class contains the privilege information of a package element.

For an explanation of privilege information contained within package elements, see Package.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • privileges (list of str) – List of default privileges to be used for all the operations present in this package. If a particular operation element has no explicit privileges defined in the privilege definition file, these privileges are used for enforcing authorization.

  • services (dict of str and ServiceInfo) – Information about all service elements contained in this package element that contain privilege information. The key in the dict is the identifier of the service element and the value in the dict is the privilege information for the service element. For an explanation of privilege information containment within service elements, see Service. When clients pass a value of this class as a parameter, the key in the attribute dict must be an identifier for the resource type: com.vmware.vapi.service. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: com.vmware.vapi.service.

class com.vmware.vapi.metadata.privilege_client.PrivilegeInfo(property_path=None, privileges=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The PrivilegeInfo class contains the privilege information for a parameter element in an operation element.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • property_path (str) –

    The propertyPath points to an entity that is used in the operation element. An entity can either be present in one of the parameter elements or if a parameter is a structure element, it could also be present in one of the field elements.

    If the privilege is assigned to an entity used in the parameter, propertyPath will just contain the name of the parameter field. If the privilege is assigned to an entity in one of the field elements of a parameter element that is a structure element, then propertyPath will contain a path to the field element starting from the parameter name.

  • privileges (list of str) – List of privileges assigned to the entity that is being referred by PrivilegeInfo.property_path.

class com.vmware.vapi.metadata.privilege_client.Service(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Service class provides methods to retrieve privilege information of a service element.

A service element is said to contain privilege information if one of the operation elements contained in this service element has privilege information.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

RESOURCE_TYPE = 'com.vmware.vapi.service'

Resource type for service.

get(service_id)

Retrieves privilege information about 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.

Return type

ServiceInfo

Returns

The ServiceInfo instance that corresponds to service_id

Raise

com.vmware.vapi.std.errors_client.NotFound if the service element associated with service_id does not have any privilege information.

list()

Returns the identifiers for the service elements that have privilege information.

Return type

list of str

Returns

The list of identifiers for the service elements that have privilege information. The return value will contain identifiers for the resource type: com.vmware.vapi.service.

class com.vmware.vapi.metadata.privilege_client.ServiceInfo(operations=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ServiceInfo class contains privilege information of a service element.

For an explanation of privilege information contained within service elements, see Service.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

operations (dict of str and OperationInfo) –

Information about all operation elements contained in this service element that contain privilege information. The key in the dict is the identifier of the operation element and the value in the dict is the privilege information for the operation element.

For an explanation of containment of privilege information within operation elements, see com.vmware.vapi.metadata.privilege.service_client.Operation. When clients pass a value of this class as a parameter, the key in the attribute dict must be an identifier for the resource type: com.vmware.vapi.operation. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: com.vmware.vapi.operation.

class com.vmware.vapi.metadata.privilege_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

stub_config (vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance