com.vmware.vapi.metadata package¶
Subpackages¶
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.
-
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.
-
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
-
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.
-
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 withcomponent_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 tocomponent_id
Raise: com.vmware.vapi.std.errors_client.NotFound
if the component element associated withcomponent_id
does not have any authentication information.
-
list
()¶ Returns the identifiers for the component elements that have authentication information.
Return type: list
ofstr
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.
-
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.
-
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.
-
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.
-
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 topackage_id
Raise: com.vmware.vapi.std.errors_client.NotFound
if the package element associated withpackage_id
does not have any authentication information.
-
list
()¶ Returns the identifiers for the package elements that have authentication information.
Return type: list
ofstr
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.
-
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.
-
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 toservice_id
Raise: com.vmware.vapi.std.errors_client.NotFound
if the service element associated withservice_id
does not have any authentication information.
-
list
()¶ Returns the identifiers for the service elements that have authentication information.
Return type: list
ofstr
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.
-
class
com.vmware.vapi.metadata.authentication_client.
StubFactory
(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
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.-
class
FormatterType
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Command.FormatterType
class defines supported CLI output formatter types. SeeCommand.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.
-
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 byCommand
class. SeeCommand.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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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 toidentity
doesn’t exist.
-
list
(path=None)¶ Returns the identifiers of all commands, or commands in a specific namespace.
Parameters: path ( str
orNone
) – 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
ofCommand.Identity
Returns: Identifiers of the requested commands. Raise: com.vmware.vapi.std.errors_client.NotFound
if a namespace corresponding topath
doesn’t exist.
-
class
-
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.-
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.
-
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.
-
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 toidentity
doesn’t exist.
-
list
()¶ Returns the identifiers of all namespaces registered with the infrastructure.
Return type: list
ofNamespace.Identity
Returns: Identifiers of all the namespaces.
-
class
-
class
com.vmware.vapi.metadata.cli_client.
StubFactory
(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
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
andcom.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 theComponent
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 classPackage
.-
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 withcomponent_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 tocomponent_id
.Raise: com.vmware.vapi.std.errors_client.NotFound
if the component element associated withcomponent_id
is not registered with the infrastructure.
-
list
()¶ Returns the identifiers for the component elements that are registered with the infrastructure.
Return type: list
ofstr
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.
-
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.
-
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.
-
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.
-
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.
-
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
-
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.
-
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.
-
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.
-
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
-
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.TheEnumeration
has a list of enumeration value elements.-
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 toenumeration_id
Raise: com.vmware.vapi.std.errors_client.NotFound
if the enumeration element associated withenumeration_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
ofstr
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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
-
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 isMap<String, ElementMap>
.MetadataIdentifier
contains the identifiers used in the keys of the above Map type.-
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.
-
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.
-
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.
-
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 topackage_id
.Raise: com.vmware.vapi.std.errors_client.NotFound
if the package element associated withpackage_id
does not exist.
-
list
()¶ Returns the identifiers for the packages elements that are contained in all the registered component elements.
Return type: list
ofstr
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.
-
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.
-
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.
-
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
-
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.
-
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
ofstr
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.
-
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 toservice_id
Raise: com.vmware.vapi.std.errors_client.NotFound
if the service element associated withservice_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
ofstr
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.
-
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.-
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 tostructure_id
.Raise: com.vmware.vapi.std.errors_client.NotFound
if the structure element associated withstructure_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
ofstr
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 theStructureInfo
will also contain the fields that are being included. The annotation information is also retained in theStructureInfo.metadata
element as well.Tip
The arguments are used to initialize data attributes with the same names.
-
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.
-
ERROR
= Type(string='ERROR')¶ If the type is an error element.
-
STRUCTURE
= Type(string='STRUCTURE')¶ If the type is a structure element.
-
-
class
-
class
com.vmware.vapi.metadata.metamodel_client.
StubFactory
(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
-
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.
-
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.
-
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.
-
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.
-
- Field element in a structure element. See
-
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.
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.
-
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 withcomponent_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 tocomponent_id
Raise: com.vmware.vapi.std.errors_client.NotFound
if the component element associated withcomponent_id
does not have any privilege information.
-
-
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.
-
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.
-
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.
-
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.
-
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 topackage_id
Raise: com.vmware.vapi.std.errors_client.NotFound
if the package element associated withpackage_id
does not have any privilege information.
-
-
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.
-
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.
-
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.
-
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 toservice_id
Raise: com.vmware.vapi.std.errors_client.NotFound
if the service element associated withservice_id
does not have any privilege information.
-
-
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.
-
class
com.vmware.vapi.metadata.privilege_client.
StubFactory
(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase