bindings Package

bindings Package

common Module

Bindings common module that contains common code for skeletons and stubs

class vmware.vapi.bindings.common.NameToTypeResolver(type_map)[source]

Bases: object

Helper class that resolves a fully qualified canonical type name to a type descriptor. The type name can be a structure name or an error name.

Initialize NameToTypeResolver

Parameters:type_map (dict of str and VapiStruct) – Type map that contains the canonical names and the references to the binding classes for these types.
resolve(name)[source]

Type name to be resolved

vmware.vapi.bindings.common.raise_core_exception(msg_list)[source]

Create and raise a CoreException from a list of messages

Parameters:msg_list (vmware.vapi.message.Message) – List of messages
Raise :CoreException if msg list is not empty

converter Module

Type converter to/from vAPI runtime data model to Python native data model

class vmware.vapi.bindings.converter.PythonToVapiVisitor(value)[source]

Bases: vmware.vapi.bindings.type.BindingTypeVisitor

Visitor to convert from Python native value to vAPI DataValue

Initialize PythonToVapiVisitor

Parameters:value (object) – Native python value
get_out_value()[source]

Returns the vAPI DataValue converted from the Python native value

Return type:vmware.vapi.data.value.DataValue
Returns:vAPI DataValue
visit(typ)[source]
visit_any_error(typ)[source]

Visit any error value

Parameters:typ (vmware.vapi.bindings.type.AnyErrorType) – Binding type of the value
visit_date_time(typ)[source]

Visit a datetime value

Parameters:typ (vmware.vapi.bindings.type.DateTimeType) – Binding type of the value
visit_dynamic_struct(typ)[source]

Visit any struct value

Parameters:typ (vmware.vapi.bindings.type.DynamicStructType) – Binding type of the value
visit_enum(typ)[source]

Visit a enum type python value

Parameters:typ (vmware.vapi.bindings.type.EnumType) – Binding type of the value
visit_error(typ)[source]

Visit an error value

Parameters:typ (vmware.vapi.bindings.type.ErrorType) – Binding type of the value
visit_list(typ)[source]

Visit a list value

Parameters:typ (vmware.vapi.bindings.type.ListType) – Binding type of the value
visit_map(typ)[source]

Visit a python dict

Parameters:typ (vmware.vapi.bindings.type.MapType) – Binding type of the value
visit_opaque(typ)[source]

Visit an opaque value. Don’t do any conversion.

Parameters:typ (vmware.vapi.bindings.type.OpaqueType) – Binding type of the value
visit_optional(typ)[source]

Visit an optional value

Parameters:typ (vmware.vapi.bindings.type.OptionalType) – Binding type of the value
visit_primitive(typ)[source]

Visit a primitive type python value

Parameters:typ (vmware.vapi.bindings.type.BindingType) – Binding type of the value
visit_reference(typ)[source]

Visit a reference type

Parameters:typ (vmware.vapi.bindings.type.ReferenceType) – Binding type of the value
visit_set(typ)[source]

Visit a python set

Parameters:typ (vmware.vapi.bindings.type.SetType) – Binding type of the value
visit_struct(typ)[source]

Visit a struct value

Parameters:typ (vmware.vapi.bindings.type.StructType) – Binding type of the value
visit_uri(typ)[source]

Visit an URI value

Parameters:typ (vmware.vapi.bindings.type.UriType) – Binding type of the value
visit_void(typ)[source]

Visit a void value (i.e. None)

Parameters:typ (vmware.vapi.bindings.type.VoidType) – Binding type of the value
class vmware.vapi.bindings.converter.TypeConverter[source]

Bases: object

Converter class that converts values from vAPI data model to Python native data model

static convert_to_python(vapi_val, binding_type, resolver=None)[source]

Converts vAPI DataValue to Python native value

Parameters:
Return type:

object

Returns:

Python native value

static convert_to_vapi(py_val, binding_type)[source]

Converts Python native value to vAPI DataValue

Parameters:
Return type:

vmware.vapi.data.value.DataValue

Returns:

vAPI DataValue

class vmware.vapi.bindings.converter.VapiToPythonVisitor(value, resolver)[source]

Bases: vmware.vapi.bindings.type.BindingTypeVisitor

Visitor to convert from vAPI DataValue to Python native value

Initialize VapiToPythonVisitor

Parameters:
get_out_value()[source]

Returns the Python native value converted from the vAPI DataValue

Return type:object
Returns:Native python value
visit(typ)[source]
visit_any_error(typ)[source]

Visit ErrorValue to convert it into the base VapiError

Parameters:typ (vmware.vapi.bindings.type.AnyErrorType) – Binding type of the value
visit_date_time(typ)[source]

Visit a datetime value

Parameters:typ (vmware.vapi.bindings.type.DateTimeType) – Binding type of the value
visit_dynamic_struct(typ)[source]

Visit StructValue to convert it into the base VapiStruct

Parameters:typ (vmware.vapi.bindings.type.DynamicStructType) – Binding type of the value
visit_enum(typ)[source]

Visit an Enum value

Parameters:typ (vmware.vapi.bindings.type.EnumType) – Binding type of the value
visit_error(typ)[source]

Visit ErrorValue

Parameters:typ (vmware.vapi.bindings.type.ErrorType) – Binding type of the value
visit_list(typ)[source]

Visit a ListValue

Parameters:typ (vmware.vapi.bindings.type.ListType) – Binding type of the value
visit_map(typ)[source]

Visit a List Value. This ListValue must represent a map. Each element of the ListValue is a StructValue with two fields, namely ‘key’ and ‘value’. The ‘key’ field represents the key of the map and the ‘value’ field represents the value of the map. Also, since this represents a map, there should not be duplicate keys.

Parameters:typ (vmware.vapi.bindings.type.MapType) – Binding type of the value
visit_opaque(typ)[source]

Since there is no OpaqueValue, don’t do any conversion

Parameters:typ (vmware.vapi.bindings.type.OpaqueType) – Binding type of the value
visit_optional(typ)[source]

Visit OptionalValue

Parameters:typ (vmware.vapi.bindings.type.OptionalType) – Binding type of the value
visit_primitive(typ)[source]

Visit one of the primitive DataValues

Parameters:typ (vmware.vapi.bindings.type.BindingType) – Binding type of the value
visit_reference(typ)[source]

Visit a reference type

Parameters:typ (vmware.vapi.bindings.type.ReferenceType) – Binding type of the value
visit_set(typ)[source]

Visit a List Value. This ListValue must represent a set i.e. there must not be any duplicate elements

Parameters:typ (vmware.vapi.bindings.type.SetType) – Binding type of the value
visit_string(typ)[source]

Visit StringValue

Parameters:typ (vmware.vapi.bindings.type.StringType) – Binding type of the value
visit_struct(typ)[source]

Visit StructValue

Parameters:typ (vmware.vapi.bindings.type.StructType) – Binding type of the value
visit_uri(typ)[source]

Visit an URI value

Parameters:typ (vmware.vapi.bindings.type.UriType) – Binding type of the value
visit_void(typ)[source]

Since there is no VoidValue, just return None

Parameters:typ (vmware.vapi.bindings.type.VoidType) – Binding type of the value

datetime_helper Module

Utility library for converting to/from datetime objects in Python Bindings

class vmware.vapi.bindings.datetime_helper.DateTimeConverter[source]

Bases: object

Helper class to convert to/from Python datetime strings to datetime objects.

Datetime is represented as vmware.vapi.data.value.StringValue in the vAPI Runtime. Datetime is a primitive string that follows a subset of ISO 8601. DateTime string represents a complete date plus hours, minutes, seconds and a decimal fraction of a second:

YYYY-MM-DDThh:mm:ss.sssZ (e.g. 1878-03-03T19:20:30.000Z) where:

YYYY = four-digit year (years BC are not supported;
0001 = 1 AD is the first valid year, 0000 = 1 BC is not allowed)

MM = two-digit month (01=January, ..., 12=December) DD = two-digit day of month (01 through 31) “T” = separator; appears literally in the string hh = two digits of hour (00 through 23; 24 NOT allowed;

am/pm NOT allowed)

mm = two digits of minute (00 through 59) ss = two digits of second (00 through 59) sss = exactly three digits representing milliseconds “Z” = UTC time zone designator; appears literally in the string

static convert_from_datetime(datetime_obj)[source]

Convert from Python native datetime object to the datetime format in vAPI Runtime i.e. YYYY-MM-DDThh:mm:ss.sssZ.

datetime objects returned by datetime.now() or datetime.utcnow() does not contain any timezone information. The caller to this method should only pass datetime objects that have time in UTC timezone.

datetime objects have microsecond precision but the vAPI datetime string format has millisecond precision. The method will truncate the microsecond to millisecond and won’t do any rounding of the value.

Parameters:datetime_obj (datetime.datetime) – Datetime object with UTC time
Return type:str
Returns:String representation of the input datetime object
static convert_to_datetime(datetime_str)[source]

Parse ISO 8601 date time from string.

Parameters:datetime_str (str) – Datetime in string representation that is in YYYY-MM-DDThh:mm:ss.sssZ format
Return type:datetime.datetime
Returns:Datetime object
class vmware.vapi.bindings.datetime_helper.UTC[source]

Bases: datetime.tzinfo

tzinfo class for UTC timezone

dst(dt)[source]
tzname(dt)[source]
utcoffset(dt)[source]
vmware.vapi.bindings.datetime_helper.convert_to_utc(dt)[source]

Convert a given datetime object to UTC timezone

enum Module

Bindings data classes

class vmware.vapi.bindings.enum.Enum[source]

Bases: unicode

Representation of IDL Enum in python language bindings

classmethod get_binding_type()[source]

Returns the corresponding BindingType for the VapiStruct class

Return type:vmware.vapi.data.value.BindingType or None
Returns:BindingType for this VapiStruct
classmethod get_values()[source]

Returns the list of all the possible enum values

Return type:list of vmware.vapi.bindings.enum.Enum
Returns:List of all possible enum values
is_unknown()[source]

Returns whether the enum value stored is one of the known values or not

Return type:bool
Returns:True if the enum value is not known

error Module

Error classes and factory

exception vmware.vapi.bindings.error.UnresolvedError(mappings=None, error_value=None)[source]

Bases: vmware.vapi.bindings.error.VapiError

VapiError which represents a VMODL2 error that was reported but couldn’t be resolved

Initialize VapiError

Parameters:
  • mappings (dict or None) – A mapping for all field names whose IDL name does not match PEP8 standard name
  • error_value (vmware.vapi.data.value.ErrorValue or None) – ErrorValue to be used for VapiError
exception vmware.vapi.bindings.error.VapiError(mappings=None, error_value=None)[source]

Bases: vmware.vapi.bindings.struct.VapiStruct, exceptions.Exception

Representation of VMODL Error in python language bindings

Initialize VapiError

Parameters:
  • mappings (dict or None) – A mapping for all field names whose IDL name does not match PEP8 standard name
  • error_value (vmware.vapi.data.value.ErrorValue or None) – ErrorValue to be used for VapiError
get_error_value()[source]

Returns the corresponding ErrorValue for the VapiError class

Return type:vmware.vapi.data.value.ErrorValue
Returns:ErrorValue for this VapiError

message Module

Message Factory import for the bindings to use

skeleton Module

Skeleton helper classes

class vmware.vapi.bindings.skeleton.ApiInterfaceSkeleton(iface_name, impl, operations, error_types)[source]

Bases: vmware.vapi.core.ApiInterface

Skeleton class for ApiInterface. This class implements the ApiInterface interface.

Initialize the ApiInterface skeleton class

Parameters:
  • iface_name (str) – Interface name
  • impl (VapiInterface) – Class that implements this interface
  • operations (dict) – Description of the operations in this service
  • error_types (list of vmware.vapi.bindings.type.ErrorType) – error types to be registered in this configuration
classmethod check_for_unknown_fields(value_type, value)[source]

Check if the StructValues inside the input DataValue has any unknown fields

Parameters:
Return type:

vmware.vapi.data.value.ErrorValue or None

Returns:

ErrorValue describing the unknown fields or None if no unknown fields were found

get_definition()[source]
get_identifier()[source]
get_method_definition(method_id)[source]
invoke(ctx, method_id, input_value)[source]

Invokes the specified method using the execution context and the input provided

Parameters:
Return type:

vmware.vapi.core.MethodResult

Returns:

Result of the method invocation

classmethod is_set_optional_field(value)[source]

Returns true if the value is OptionalValue and it is set

Parameters:value (vmware.vapi.data.value.DataValue) – value to be checked
Return type:bool
Returns:True if the value is OptionalValue and is set, False otherwise
class vmware.vapi.bindings.skeleton.VapiFilter(name='')[source]

Bases: logging.Filter

This is a filter that injects request context into the log

Initialize a filter.

Initialize with the name of the logger which, together with its children, will have its events allowed through the filter. If no name is specified, allow every event.

filter(record)[source]
class vmware.vapi.bindings.skeleton.VapiInterface(api_interface, error_types=None)[source]

Bases: object

vAPI Interface class is used by the python server side bindings. This encapsulates the vmware.vapi.bindings.skeleton.ApiInterfaceSkeleton class.

Initialize the VapiInterface class

Parameters:
api_interface[source]

Returns the ApiInterfaceSkeleton instance. Local Provider uses this method to discover the ApiInterface so that it can route method calls for the methods implemented by this interface.

Return type:vmware.vapi.bindings.skeleton.ApiInterfaceSkeleton
Returns:Api Interface skeleton class for this interface
execution_context[source]

Returns the execution context of a method invocation

Return type:vmware.vapi.core.ExecutionContext
Returns:Execution context of a method invocation

struct Module

Bindings data classes

class vmware.vapi.bindings.struct.PrettyPrinter(stream=<open file '<stdout>', mode 'w' at 0xf7f72070>, indent=2)[source]

Bases: object

Helper class to pretty print Python native values (with special support for VapiStruct objects).

Initialize PrettyPrinter

Parameters:
  • stream (object) – A stream object that implements File protocol’s write operation
  • indent (int) – Indentation to be used for new lines
pprint(value, level=0)[source]

Print a Python native value

Parameters:
class vmware.vapi.bindings.struct.VapiStruct(mappings=None, struct_value=None)[source]

Bases: object

Representation of IDL Structure in python language bindings

Initialize VapiStruct

Parameters:
  • mappings (dict or None) – A mapping for all field names whose IDL name does not match PEP8 standard name
  • struct_value (vmware.vapi.data.value.StructValue) – StructValue to be used for VapiStruct or None
convert_to(cls)[source]

Convert the underlying StructValue to an instance of the provided class if possible. Conversion will be possible if the StructValue contains all the fields expected by the provided class and the type of the value in each fields matches the type of the field expected by the provided class.

Parameters:cls (vmware.vapi.data.value.StructValue) – The type to convert to
Return type::class:’vmware.vapi.bindings.struct.VapiStruct’
Returns:The converted value
classmethod get_binding_type()[source]

Returns the corresponding BindingType for the VapiStruct class

Return type:vmware.vapi.bindings.type.BindingType
Returns:BindingType for this VapiStruct
get_field(attr)[source]

Returns the struct field value

Parameters:attr (str) – Field name as defined in IDL
Return type:object
Returns:Field value
get_struct_value()[source]

Returns the corresponding StructValue for the VapiStruct class

Return type:vmware.vapi.data.value.StructValue
Returns:StructValue for this VapiStruct
to_dict()[source]

Convert the object into a python dictionary. Even the nested types are converted to dictionaries.

Return type:dict
Returns:Dictionary representation of this object
to_json()[source]

Convert the object into a json string.

Return type:str
Returns:JSON string representation of this object
validate_constraints()[source]

Validate if the current VapiStruct instance satisfies all the constraints of this VapiStruct type.

:raise vmware.vapi.exception.CoreException if a constraint is
not satisfied
classmethod validate_struct_value(struct_value)[source]

Validate if the given struct value satisfies all the constraints of this VapiStruct.

Parameters:
:raise vmware.vapi.exception.CoreException if a constraint is
not satisfied

stub Module

Stub helper classes

class vmware.vapi.bindings.stub.ApiInterfaceStub(iface_name, config, operations)[source]

Bases: vmware.vapi.core.ApiInterface

Stub class for Api Interface

Initialize the ApiMethod skeleton object

Parameters:
  • iface_name (str) – Interface name
  • config (StubConfiguration) – Configuration data for vAPI stubs
  • operations (dict) – Dictionary of operation name to operation information
get_definition()[source]

Returns interface definition

Return type:InterfaceDefinition
Returns:Interface definition
get_identifier()[source]

Returns interface identifier

Return type:InterfaceIdentifier
Returns:Interface identifier
get_method_definition(method_id)[source]
invoke(ctx, method_id, input_value)[source]

Invokes the specified method using the execution context and the input provided

Parameters:
Return type:

vmware.vapi.core.MethodResult

Returns:

Result of the method invocation

native_invoke(ctx, method_name, kwargs)[source]

Invokes the method corresponding to the given method name with the kwargs.

In this method, python native values are converted to vAPI runtime values, operation is invoked and the result are converted back to python native values

Parameters:
  • method_name (str) – Method name
  • kwargs (dict) – arguments to be passed to the method
Return type:

object

Returns:

Method result

class vmware.vapi.bindings.stub.StubConfiguration(connector, *error_types)[source]

Bases: object

Configuration data for vAPI stub classes

Variables:connector – Connection to be used to talk to the remote ApiProvider

Initialize the stub configuration

Parameters:
connector[source]
Return type:vmware.vapi.protocol.client.connector.Connector
Returns:Connection to be used to talk to the remote ApiProvider
resolver[source]

Type resolver that can resolve canonical names to its binding types

Return type:vmware.vapi.bindings.common.NameToTypeResolver
Returns:Type resolver
class vmware.vapi.bindings.stub.StubFactory(config)[source]

Bases: object

Factory for client-side vAPI stubs

Initialize the stub factory

Parameters:config (StubConfiguration) – Configuration data for vAPI stubs
create_stub(service_name)[source]

Create a stub corresponding to the specified service name

Parameters:service_name (str) – Name of the service
Return type:VapiInterface
Returns:The stub correspoding to the specified service name
class vmware.vapi.bindings.stub.VapiInterface(config, api_interface)[source]

Bases: object

vAPI Interface class is used by the python client side bindings. This encapsulates the ApiInterfaceStub instance

Initialize VapiInterface object

Parameters:
  • config (StubConfiguration) – Configuration data for vAPI stubs
  • api_interface (ApiInterfaceStub) – Instance of ApiInterfaceStub class that can execute the ApiMethods

type Module

Representation of an IDL type for the use of the Python language bindings.

class vmware.vapi.bindings.type.AnyErrorType[source]

Bases: vmware.vapi.bindings.type.BindingType

Representation of Exception type in Python Binding

Initialize AnyErrorType

class vmware.vapi.bindings.type.BindingType[source]

Bases: object

Representation of an IDL type for the use of the Python language bindings

Parameters:definition (vmware.vapi.data.definition.DataDefinition) – Data definition corresponding to this binding type
accept(visitor)[source]

Applies a visitor to this BindingType

Parameters:visitor (BindingTypeVisitor) – visitor operating on the BindingType
definition[source]

Generate the data defintion corresponding to this binding type

class vmware.vapi.bindings.type.BindingTypeVisitor[source]

Bases: vmware.vapi.lib.visitor.VapiVisitor

Base no-op implementation of a BindingType visitor

Initialize BindingTypeVisitor

visit_any_error(typ)[source]

Visit an error value

Parameters:typ (AnyErrorType) – Binding type of the value
visit_blob(typ)[source]

Visit a blob value

Parameters:typ (BlobType) – Binding type of the value
visit_boolean(typ)[source]

Visit a boolean value

Parameters:typ (BooleanType) – Binding type of the value
visit_date_time(typ)[source]

Visit a datetime value

Parameters:typ (DateTimeType) – Binding type of the value
visit_double(typ)[source]

Visit a double value

Parameters:typ (DoubleType) – Binding type of the value
visit_dynamic_struct(typ)[source]

Visit a struct value

Parameters:typ (DynamicStructType) – Binding type of the value
visit_enum(typ)[source]

Visit a enum value

Parameters:typ (EnumType) – Binding type of the value
visit_error(typ)[source]

Visit an error type

Parameters:typ (ErrorType) – Binding type of the value
visit_id(typ)[source]

Visit a ID value

Parameters:typ (IdType) – Binding type of the value
visit_integer(typ)[source]

Visit an integer value

Parameters:typ (IntegerType) – Binding type of the value
visit_list(typ)[source]

Visit a list value

Parameters:typ (ListType) – Binding type of the value
visit_opaque(typ)[source]

Visit an opaque value.

Parameters:typ (OpaqueType) – Binding type of the value
visit_optional(typ)[source]

Visit an optional value

Parameters:typ (OptionalType) – Binding type of the value
visit_reference(typ)[source]

Visit a reference type

Parameters:typ (ReferenceType) – Binding type of the value
visit_secret(typ)[source]

Visit a secret value

Parameters:typ (SecretType) – Binding type of the value
visit_string(typ)[source]

Visit a string value

Parameters:typ (StringType) – Binding type of the value
visit_struct(typ)[source]

Visit a struct value

Parameters:typ (StructType) – Binding type of the value
visit_uri(typ)[source]

Visit an URI value

Parameters:typ (URIType) – Binding type of the value
visit_void(typ)[source]

Visit a void value (i.e. None)

Parameters:typ (VoidType) – Binding type of the value
class vmware.vapi.bindings.type.BlobType[source]

Bases: vmware.vapi.bindings.type.BindingType

Representation of binary IDL Type in Python Binding

class vmware.vapi.bindings.type.BooleanType[source]

Bases: vmware.vapi.bindings.type.BindingType

Representation of boolean IDL Type in Python Binding

class vmware.vapi.bindings.type.DataDefinitionBuilder(ctx, seen_structures)[source]

Bases: vmware.vapi.bindings.type.BindingTypeVisitor

Builds DataDefinition by visiting a BindingType

Initialize DataDefinitionBuilder

Parameters:
get_out_value()[source]

Returns the data definition

Return type:vmware.vapi.data.definition.DataDefinition
Returns:Data definition
visit_any_error(typ)[source]

Visit an error value

Parameters:typ (AnyErrorType) – Binding type of the value
visit_blob(typ)[source]

Visit a blob value

Parameters:typ (BlobType) – Binding type of the value
visit_boolean(typ)[source]

Visit a boolean value

Parameters:typ (BooleanType) – Binding type of the value
visit_date_time(typ)[source]

Visit a datetime value

Parameters:typ (DateTimeType) – Binding type of the value
visit_double(typ)[source]

Visit a double value

Parameters:typ (DoubleType) – Binding type of the value
visit_dynamic_struct(typ)[source]

Visit a struct value

Parameters:typ (DynamicStructType) – Binding type of the value
visit_enum(typ)[source]

Visit a enum value

Parameters:typ (EnumType) – Binding type of the value
visit_error(typ)[source]

Visit an error type

Parameters:typ (ErrorType) – Binding type of the value
visit_id(typ)[source]

Visit a ID value

Parameters:typ (IdType) – Binding type of the value
visit_integer(typ)[source]

Visit an integer value

Parameters:typ (IntegerType) – Binding type of the value
visit_list(typ)[source]

Visit a list value

Parameters:typ (ListType) – Binding type of the value
visit_map(typ)[source]

Visit a map value

Parameters:typ (MapType) – Binding type of the value
visit_opaque(typ)[source]

Visit an opaque value.

Parameters:typ (OpaqueType) – Binding type of the value
visit_optional(typ)[source]

Visit an optional value

Parameters:typ (OptionalType) – Binding type of the value
visit_reference(typ)[source]

Visit a reference type

Parameters:typ (ReferenceType) – Binding type of the value
visit_secret(typ)[source]

Visit a secret value

Parameters:typ (SecretType) – Binding type of the value
visit_set(typ)[source]

Visit a set value

Parameters:typ (SetType) – Binding type of the value
visit_string(typ)[source]

Visit a string value

Parameters:typ (StringType) – Binding type of the value
visit_struct(typ)[source]

Visit a struct value

Parameters:typ (StructType) – Binding type of the value
visit_uri(typ)[source]

Visit an URI value

Parameters:typ (URIType) – Binding type of the value
visit_void(typ)[source]

Visit a void value (i.e. None)

Parameters:typ (VoidType) – Binding type of the value
class vmware.vapi.bindings.type.DateTimeType[source]

Bases: vmware.vapi.bindings.type.BindingType

Representation of datetime IDL Type in Python Binding

class vmware.vapi.bindings.type.DoubleType[source]

Bases: vmware.vapi.bindings.type.BindingType

Representation of float IDL Type in Python Binding

class vmware.vapi.bindings.type.DynamicStructType(name, fields, binding_class=None, has_fields_of_type=None)[source]

Bases: vmware.vapi.bindings.type.StructType

Representation of StructValue IDL annotation in Python Binding

Variables:has_fields_of_type – List of reference types whose fields need to be present in the StructValue for this DynamicStruct type

Initialize DynamicStructType

Parameters:
  • name (str) – Name of the Structure
  • fields (dict of str and BindingType) – Map of field name and field binding type
  • binding_class (vmware.vapi.data.definition.DataDefinition) – Data definition for this type
  • has_fields_of_type (ReferenceType) – List of reference types whose fields need to be present in the StructValue for this DynamicStruct type
has_fields_of_type[source]

Returns the has_fields_of_type

:rtype ReferenceType :return List of reference types whose fields need to be present in the

StructValue for this DynamicStruct type
class vmware.vapi.bindings.type.EnumType(name, binding_class)[source]

Bases: vmware.vapi.bindings.type.BindingType

Representation of enum IDL Type in Python Binding

Variables:
  • name – Name of the enum
  • binding_class – Reference to the Python native class corresponding to this structure
binding_class[source]

Returns the reference to the Python native class corresponding to this structure

name[source]

Returns the name of the EnumType

Return type:str
Returns:Name of the EnumType
class vmware.vapi.bindings.type.ErrorType(name, fields, binding_class=None)[source]

Bases: vmware.vapi.bindings.type.StructType

Representation of Error IDL type in Python Binding

Variables:
  • definition – type representation in the API runtime
  • name – Name of the structure
  • binding_class – Reference to the Python native class corresponding to this error
class vmware.vapi.bindings.type.IdType(resource_types=None, resource_type_field_name=None)[source]

Bases: vmware.vapi.bindings.type.BindingType

Representation of ID IDL type in Python Binding

Variables:
  • resolved_types – Resource type(s) for the ID
  • resource_type_field_name – Name of the field specifying the resource type
resource_type_field_name[source]

Returns the name of the field specifying the resource type

Return type:str
Returns:Name of the field specifying the resource type
resource_types[source]

Returns the Resource type(s) for the ID field

Return type:list of str or str or None
Returns:Resource type(s) for the ID
class vmware.vapi.bindings.type.IntegerType[source]

Bases: vmware.vapi.bindings.type.BindingType

Representation of integer IDL Type in Python Binding

class vmware.vapi.bindings.type.ListType(element_type)[source]

Bases: vmware.vapi.bindings.type.BindingType

Representation of List IDL type in Python Binding

Variables:element_type – element type
element_type[source]

Return the element type of this ListType

Return type:BindingType
Returns:element type
class vmware.vapi.bindings.type.MapType(key_type, value_type)[source]

Bases: vmware.vapi.bindings.type.BindingType

Representation of Map IDL type in Python Binding

Variables:
  • key_type – map key type
  • value_type – map value type
key_type[source]

Return the key type of this MapType

Return type:BindingType
Returns:key type
value_type[source]

Return the value type of this MapType

Return type:BindingType
Returns:value type
class vmware.vapi.bindings.type.OpaqueType[source]

Bases: vmware.vapi.bindings.type.BindingType

Representation of Opaque IDL annotation in Python Binding

class vmware.vapi.bindings.type.OptionalType(element_type)[source]

Bases: vmware.vapi.bindings.type.BindingType

Representation of optional IDL annotation in Python Binding

Variables:element_type – element type
element_type[source]

Return the element type of this ListType

Return type:BindingType
Returns:element type
class vmware.vapi.bindings.type.ReferenceType(context, type_name)[source]

Bases: vmware.vapi.bindings.type.BindingType

Reference type to resolve references lazily.

Variables:resolved_type – Resolved reference type

Initialize ReferenceType

Parameters:
  • context (module) – Module reference that has the type
  • type_name (str) – Fully qualified name of the type reference. i.e. if the type Bar is nested inside type Foo, it would be Foo.Bar
resolved_type[source]

Returns the resolved struct type or enum type

Return type:StructType or EnumType
Returns:Resolved struct type or enum type
class vmware.vapi.bindings.type.SecretType[source]

Bases: vmware.vapi.bindings.type.BindingType

Representation of @secret IDL annotation in Python Binding. @secret annotation can only be applied to strings.

class vmware.vapi.bindings.type.SetType(element_type)[source]

Bases: vmware.vapi.bindings.type.BindingType

Representation of Set IDL type in Python Binding

Variables:element_type – element type
element_type[source]

Return the element type of this SetType

Return type:BindingType
Returns:element type
class vmware.vapi.bindings.type.StringType[source]

Bases: vmware.vapi.bindings.type.BindingType

Representation of string IDL Type in Python Binding

class vmware.vapi.bindings.type.StructType(name, fields, binding_class=None, is_model=False, model_keys=None)[source]

Bases: vmware.vapi.bindings.type.BindingType

Representation of Structure IDL type in Python Binding

Variables:
  • name – Name of the structure
  • binding_class – Reference to the Python native class corresponding to this structure
  • is_model – True if the structure is marked as Model, False otherwise
  • model_keys – List of model keys for the structure if it is marked as Model
binding_class[source]

Returns the reference to the Python native class corresponding to this structure

Return type:vmware.vapi.bindings.struct.VapiStruct
Returns:Reference to the python native class
get_field(field_name)[source]

Returns the BindingType of the argument

Parameters:field_name (str) – Field name
Return type:BindingType
Returns:BindingType of the field specified
get_field_names()[source]

Returns the list of field names present in this StructType

Return type:list of str
Returns:List of field names
is_model[source]

Check if the Struct is marked as model

Return type:bool
Returns:True if the Struct is marked as model, False otherwise
model_keys[source]

Returns list of model keys for the Struct if it is marked as model

Return type:list of str or None
Returns:List of model keys for the Struct if it is marked as model
name[source]

Returns the name of the StructType

Return type:str
Returns:Name of the StructType
class vmware.vapi.bindings.type.TypeUtil[source]

Bases: object

Converts a BindingType object to DataDefinition object

static convert_to_data_definition(binding_type)[source]

Converts a BindingType object to DataDefinition object

Parameters:binding_type (BindingType) – Binding type
Return type:vmware.vapi.data.definition.DataDefinition
Returns:DataDefinition
class vmware.vapi.bindings.type.URIType[source]

Bases: vmware.vapi.bindings.type.BindingType

Representation of URI IDL Type in Python Binding

class vmware.vapi.bindings.type.VoidType[source]

Bases: vmware.vapi.bindings.type.BindingType

Representation of void IDL type in Python Binding

uri_helper Module

Utility library for validating IRI that conform to RFC 3987

class vmware.vapi.bindings.uri_helper.URIValidator[source]

Bases: object

Helper class for validation of IRI’s

compiled_regex = {'IRI': <_sre.SRE_Pattern object at 0x9126998>, 'IRI_reference': <_sre.SRE_Pattern object at 0x913cdf0>}
final_regex = {'IPv4address': '(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)', 'ireg_name': "(?:(?:[a-zA-Z0-9._~-]|[\\xA0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|%[0-9A-Fa-f][0-9A-Fa-f]|[!$&'()*+,;=])*", 'sub_delims': "[!$&'()*+,;=]", 'reserved': "(?:[:/?#[\\]@]|[!$&'()*+,;=])", 'ucschar': '[\\xA0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]', 'isegment_nz_nc': "(?:(?:[a-zA-Z0-9._~-]|[\\xA0-\\uD7F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Z0-9._~-]|[\xa0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])|%[0-9A-Fa-f][0-9A-Fa-f]|[!$&'()*+,;=]|@)+(?:/(?:(?:[a-zA-Z0-9._~-]|[\xa0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])|%[0-9A-Fa-f][0-9A-Fa-f]|[!$&'()*+,;=]|:|@)*)*|)(?:\\?(?:(?:(?:[a-zA-Z0-9._~-]|[\xa0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])|%[0-9A-Fa-f][0-9A-Fa-f]|[!$&'()*+,;=]|:|@)|[\ue000-\uf8ff]|/|\\?)*)?(?:\\#(?:(?:(?:[a-zA-Z0-9._~-]|[\xa0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])|%[0-9A-Fa-f][0-9A-Fa-f]|[!$&'()*+,;=]|:|@)|/|\\?)*)?))$"
rule_type = 'IRI_reference'
unicode_wrap = 'u"""{0}"""'
static validate(iri)[source]

Validate the given IRI string

Parameters:iri (str) – IRI string to be validated
value = '(?:{IRI}|{irelative_ref})'

Subpackages