std Package

std Package

activation_client Module

The com.vmware.vapi.std.activation_client module provides classes that TODO.

class com.vmware.vapi.std.activation_client.ActivationManager(config)[source]

Bases: vmware.vapi.bindings.stub.VapiInterface

WARNING: Use only as a sample. The API is experimental and subject to change in future versions.

Activation tracking/management service.

An activation describes a method invocation in the runtime.

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

Asks for cancellation of a running activation. Whether or not the cancellation request will have any effect depends on the implementation of the method that has to be canceled.

Parameters:activation_id (str) – activation identifier
Raise :com.vmware.vapi.std.errors_client.NotFound there is no activation with the specified id

errors_client Module

The com.vmware.vapi.std.errors_client module provides the standard exceptions that can be included in the list of exceptions in the specification of methods to indicate that the method might report those exceptions. It also provides some classes intended to be used as payload to provide additional information about those exceptions.

exception com.vmware.vapi.std.errors_client.AlreadyExists(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The AlreadyExists exception indicates that an attempt was made to create an entity but the entity already exists. Typically the entity has a name or identifier that is required to be unique in some context, but there is already an entity with that name or identifier in that context.

Examples:
  • Trying to create a new tag category when a tag category with the specified name already exists.
  • Trying to create a new tag in tag category when a tag with the specified name already exists the tag category.
  • Trying to create a LUN with a specific UUID on a node (for replication purposes) when a LUN with that UUID already exists on the node.
  • Trying to create a file in a directory or move or copy a file to a directory when a file with that name already exists in the directory.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.AlreadyInDesiredState(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The AlreadyInDesiredState exception indicates that an attempt to change the state of a resource or service had no effect because the resource or service is already in the desired state.

Examples:
  • Trying to power on a virtual machine that is already powered on.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

class com.vmware.vapi.std.errors_client.ArgumentLocations(primary=None, secondary=None)[source]

Bases: vmware.vapi.bindings.struct.VapiStruct

The ArgumentLocations class describes which part(s) of the input to the method caused the exception.

Some types of exceptions are caused by the value of one of the inputs to the method, possibly due to an interaction with other inputs to the method. This class is intended to be used as the payload to identify those inputs when the method reports exceptions like InvalidArgument or NotFound. See Error.data.

Tip

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

Parameters:
  • primary (str) – String describing the location of the input that triggered the exception.
  • secondary (list of str) – list (possibly empty) of strings describing the locations of other inputs that caused the the primary input to trigger the exception.
exception com.vmware.vapi.std.errors_client.Canceled(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The Canceled exception indicates that the method canceled itself in response to an explicit request to do so. Methods being “canceled” for other reasons (for example the client connection was closed, a time out occured, or due to excessive resource consumption) should not report this exception.

Examples:
  • A user is monitoring the progress of the method in a GUI and sees that it is likely to take longer than he is willing to wait and clicks the cancel button.
  • A user invokes the method using a command-line tool and decides that she didn’t really want to invoke that method, and presses CTRL-c.
Counterexamples:
  • The client’s connection to the server was closed. Reporting an exception is pointless since the client will not receive the error response because the connection has been closed.
  • The request is taking longer than some amount of time. The TimedOut exception would be reported if the time was specified as part of the input or is documented in the API contract.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.ConcurrentChange(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The ConcurrentChange exception indicates that a data structure, entity, or resource has been modified since some earlier point in time. Typically this happens when the client is doing the write portion of a read-modify-write sequence and indicates that it wants the server to notify it if the data in the server has changed after it did the read, so that it can avoid overwriting that change inadvertantly.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.Error(messages=None, data=None)[source]

Bases: vmware.vapi.bindings.error.VapiError

The Error exception describes theattributes common to all standard exceptions.

This exception serves two purposes:
  1. It is the exception that clients in many programming languages can catch to handle all standard exceptions. Typically those clients will display one or more of the localizable messages from Error.messages to a human.
  2. It is the exception that methods can report when they need to report some exception, but the exception doesn’t fit into any other standard exception, and in fact the only reasonable way for a client to react to the exception is to display the message(s) to a human.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.FeatureInUse(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The FeatureInUse exception indicates that an action cannot be completed because a feature is in use.

Examples:
  • Trying to disable snapshots on a virtual machine which has a snapshot.
  • Trying to downgrade a license that has licensed features that are in use.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

class com.vmware.vapi.std.errors_client.FileLocations(primary=None, secondary=None)[source]

Bases: vmware.vapi.bindings.struct.VapiStruct

The FileLocations class identifies the file(s) that caused the method to report the exception.

Some types of exceptions are caused by a problem with one or more files. This class is intended to be used as the payload to identify those files when the method reports exceptions like NotFound. See Error.data.

Tip

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

Parameters:
  • primary (str) – String identifying the file that triggered the exception.
  • secondary (list of str) – list (possibly empty) of strings identifying other files that caused the primary file to trigger the exception.
exception com.vmware.vapi.std.errors_client.InternalServerError(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The InternalServerError exception indicates that the server encounters an unexpected condition that prevented it from fulfilling the request.

This exception is reported by the API infrastructure, so it could occur in response to the invocation of any method.

Examples:
  • The method returns a value whose type doesn’t match the type type the method says it should return.
  • The method reports an exception that is not included in the list of exceptions the method says that it can report.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.InvalidArgument(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The InvalidArgument exception indicates that the values received for one or more parameters are not acceptable.

This exception is reported by the API infrastructure, so it could occur in response to the invocation of any method. It may also be reported as the result of method-specific validation.

Examples:
  • A parameter has a value that is not of the expected type.
  • A parameter has a value that is not in the required range.
  • A parameter has a value that is not one of the specifically allowed strings.
  • One attribute of a class is the tag for a tagged union, and has a specific value but another attribute of the class that is required to be specified when the tag has that value is not specified, or another attribute of the class that is required to be unspecified when the tag has that value is specified.
Counterexamples:
  • Trying to create a new tag in tag category when a tag with the specified name already exists the tag category. The AlreadyExists exception would be used instead.
  • Invoke the method to retrieve information about a virtual machine, passing an id that does not identify an existing virtual machine. The NotFound exception would be used instead.
  • Attempt to put a virtual machine into a folder that can only contain hosts. The InvalidElementType exception would be used instead.
  • Attempt to attach a SCSI virtual disk to an IDE port. The InvalidElementType exception would be used instead.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.InvalidElementConfiguration(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The InvalidElementConfiguration exception indicates that an attempt to modify the configuration of an element or a group containing the element failed due to the configuraton of the element. A typical case is when the method is am attempt to change the group membership of the element fails, in which case a configuration change on the element may allow the group membership change to succeed.

Examples:
  • Attempt to move a host with a fault tolerant virtual machine out of a cluster (i.e. make the host a standalone host).
  • Attempt to remove a host from a DRS cluster without putting the host into maintenance mode.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.InvalidElementType(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The InvalidElementType exception indicates that the server was unable to fulfil the request because an element of a specific type cannot be a member of particular group.

This exception could be reported, for example, if an attempt is made to put an element into the wrong type of container.

Examples:
  • Attempt to put a virtual machine into a folder that can only contain hosts.
  • Attempt to attach a SCSI virtual disk to an IDE port.
Counterexamples:
  • A parameter has a value that is not of the expected type. The InvalidArgument exception would be used instead.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.InvalidRequest(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The InvalidRequest exception indicates that the request is malformed in such a way that the server is unable to process it.

Examples:
  • The XML in a SOAP request is not well-formed so the server cannot parse the request.
  • The XML in a SOAP request is well-formed but does not match the structure required by the SOAP specification.
  • A JSON-RPC request is not valid JSON.
  • The JSON sent in a JSON-RPC request is not a valid JSON-RPC Request object.
  • The Request object from a JSON-RPC request does not match the structure required by the API infrastructure.
Counterexamples:
  • The parameter has a value that is not with the required range. The InvalidArgument exception would be used instead.
  • The name of the method specified in the request doesn’t not match any known method. The NotFound exception would be used instead.

Some transport protocols (for example JSON-RPC) include their own mechanism for reporting these kinds of errors, and the API infrastructure for a programming language may expose the errors using a language specific mechanism, so this exception might not be used.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.NotAllowedInCurrentState(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The NotAllowedInCurrentState exception indicates that the requested method is not allowed with a resource or service in its current state. This could be because the method is performing a configuration change that is not allowed in the current state or because method itself is not allowed in the current state.

Examples:
  • Trying to add a virtual device that cannot be hot plugged to a running virtual machine.
  • Trying to upgrade the virtual hardware version for a suspended virtual machine.
  • Trying to power off, reset, or suspend a virtual machine that is not powered on.
Counterexamples:
  • Trying to power off a virtual machine that is in the process of being powered on. The ResourceBusy exception would be used instead.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.NotFound(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The NotFound exception indicates that a specified element could not be found.

Examples:
  • Invoke the method to retrieve information about a virtual machine, passing an id that does not identify an existing virtual machine.
  • Invoke the method to modify the configuration of a virtual nic, passing an id that does not identify an existing virtual nic in the specified virtual machine.
  • Invoke the method to remove a vswitch, passing an id that does not identify an existing vswitch.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.OperationNotFound(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The OperationNotFound exception indicates that the method specified in the request could not be found.

Every API request specifies a service identifier and an operation identifier along with the parameters. If the API infrastructure is unable to find the requested class or method it reports this exception.

This exception can be reported by the API infrastructure for any method, but it is specific to the API infrastructure, and should never be reported by the implementation of any method.

Examples:
  • A client provides an invalid service or operation identifier when invoking the method using a dynamic interface (for example REST).
  • A client invokes the method from a class, but that class has not been installed.
Counterexamples:
  • A client invokes a task scheduling method, but provides an invalid service identifier or operation identifier. The NotFound exception would be used instead.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.ResourceBusy(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The ResourceBusy exception indicates that the method could not be completed because a resource it needs is busy.

Examples:
  • Trying to power off a virtual machine that is in the process of being powered on.
Counterexamples:
  • Trying to remove a VMFS datastore when there is a virtual machine registered on any host attached to the datastore. The ResourceInUse exception would be used instead.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.ResourceInUse(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The ResourceInUse exception indicates that the method could not be completed because a resource is in use.

Examples:
  • Trying to remove a VMFS datastore when the is a virtual machine registered on any host attached to the datastore.
  • Trying to add a virtual switch if the physical network adapter being bridged is already in use.
Counterexamples:
  • Trying to power off a virtual machine that is in the process of being powered on. The ResourceBusy exception would be used instead.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.ResourceInaccessible(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The ResourceInaccessible exception indicates that the method could not be completed because an entity is not accessible.

Examples:
  • Attempt to invoke some method on a virtual machine when the virtual machine’s configuration file is not accessible (for example due to a storage APD condition).
Counterexamples:
  • Attempt to invoke some method when the server is too busy. The ServiceUnavailable exception would be used instead.
  • Attempt to invoke some method when the server is undergoing maintenance. The ServiceUnavailable exception would be used instead.
  • Some method fails to contact VMware Tools running inside the virtual machine. The ServiceUnavailable exception would be used instead.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.ServiceUnavailable(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The ServiceUnavailable exception indicates that the class is unavailable.

Examples:
  • Attempt to invoke a method when the server is too busy.
  • Attempt to invoke a method when the server is undergoing maintenance.
  • An method fails to contact VMware Tools running inside the virtual machine.
Counterexamples:
  • A client provides an invalid service or operation identifier when invoking the method using a dynamic interface (for example REST). The OperationNotFound exception would be used instead.
  • A client invokes the method from the class, but that class has not been installed. The OperationNotFound exception would be used instead.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.TimedOut(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The TimedOut exception indicates that the method did not complete within the allowed amount of time. The allowed amount of time might be:

  • provided by the client as an input parameter.
  • a fixed limit of the class implementation that is a documented part of the contract of the class.
  • a configurable limit used by the implementation of the class.
  • a dynamic limit computed by the implementation of the class.

The method may or may not complete after the TimedOut exception was reported.

Examples:
  • The method was unable to complete within the timeout duration specified by a parameter of the method.
Counterexamples:
  • A server implementation that puts requests into a queue before dispatching them might delete a request from the queue if it doesn’t get dispatched within n minutes. The ServiceUnavailable exception would be used instead.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

class com.vmware.vapi.std.errors_client.TransientIndication(is_transient=None)[source]

Bases: vmware.vapi.bindings.struct.VapiStruct

The TransientIndication class indicates whether or not the exception is transient.

Some types of exceptions are transient in certain situtations and not transient in other situtations. This exception payload can be used to indicate to clients whether a particular exception is transient. See Error.data.

Tip

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

Parameters:is_transient (bool) – Indicates that the exception this class is attached to is transient.
exception com.vmware.vapi.std.errors_client.UnableToAllocateResource(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The UnableToAllocateResource exception indicates that the method failed because it was unable to allocate or acquire a required resource.

Examples:
  • Trying to power on a virtual machine when there are not enough licenses to do so.
  • Trying to power on a virtual machine that would violate a resource usage policy.
Counterexamples:
  • Trying to power off a virtual machine that is in the process of being powered on. A ResourceBusy exception would be used instead.
  • Trying to remove a VMFS datastore when the is a virtual machine registered on any host attached to the datastore. The ResourceInUse exception would be used instead.
  • Trying to add a virtual switch if the physical network adapter being bridged is already in use. The ResourceInUse exception would be used instead.
  • Attempt to invoke some method on a virtual machine when the virtual machine’s configuration file is not accessible (for example due to a storage APD condition). The ResourceInaccessible exception would be used instead.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.Unauthenticated(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The Unauthenticated exception indicates that the method requires authentication and the user is not authenticated.

API requests may include a security context containing user credentials. For example, the user credentials could be a SAML token, a user name and password, or the session identifier for a previously established session.

Examples:
  • The SAML token in the request’s security context has expired.
  • The user name and password in the request’s security context are invalid.
  • The session identifier in the request’s security context identifies a session that has expired.
Counterexamples:
  • The user is authenticated but isn’t authorized to perform the requested method. The Unauthorized exception would be used instead.

For security reasons, the Error.data attribute in this exception is None, and the Error.messages attribute in this exception does not disclose which part of the security context is correct or incorrect. For example the messages would not disclose whether a username or a password is valid or invalid, but only that a combination of username and password is invalid.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.Unauthorized(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The Unauthorized exception indicates that the user is not authorized to perform the method.

API requests may include a security context containing user credentials. For example, the user credentials could be a SAML token, a user name and password, or the session identifier for a previously established session. Invoking the method may require that the user identified by those credentials has particular privileges on the method or on one or more resource identifiers passed to the method.

Examples:
  • The method requires that the user have one or more privileges on the method, but the user identified by the credentials in the security context does not have the required privileges.
  • The method requires that the user have one or more privileges on a resource identifier passed to the method, but the user identified by the credentials in the security context does not have the required privileges.
Counterexamples:
  • The SAML token in the request’s security context has expired. A Unauthenticated exception would be used instead.
  • The user name and password in the request’s security context are invalid. The Unauthenticated exception would be used instead.
  • The session identifier in the request’s security context identifies a session that has expired. The Unauthenticated exception would be used instead.

For security reasons, the Error.data attribute in this exception is None, and the Error.messages attribute in this exception does not disclose why the user is not authorized to perform the method. For example the messages would not disclose which privilege the user did not have or which resource identifier the user did not have the required privilege to access. The API documentation should indicate what privileges are required.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.UnexpectedInput(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The UnexpectedInput exception indicates that the request contained a parameter or attribute whose name is not known by the server.

Every method expects parameters with known names. Some of those parameters may be (or contain) classes, and the method expects those classes to contain attributes with known names. If the method receives parameters or attributes with names that is does not expect, this exception may be reported.

This exception can be reported by the API infrastructure for any method, but it is specific to the API infrastructure, and should never be reported by the implementation of any method.

Examples:
  • A client using stubs generated from the interface specification for version2 of a class invokes the method passing one or more parameters that were added in version2, but they are communicating with a server that only supports version1 of the class.
  • A client provides an unexpected parameter or attribute name when invoking the method using a dynamic interface (for example REST).

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vapi.std.errors_client.Unsupported(messages=None, data=None)[source]

Bases: com.vmware.vapi.std.errors_client.Error

The Unsupported exception indicates that the method is not supported by the class.

Examples:
  • Trying to hot-plug a CPU when the current configuration of the VM does not support hot-plugging of CPUs.
  • Trying to change the memory size to a value that is not within the acceptable guest memory bounds supported by the virtual machine’s host.

Tip

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

Parameters:
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

interposition_client Module

The com.vmware.vapi.std.interposition_client module provides classes that TODO.

class com.vmware.vapi.std.interposition_client.InvocationRequest(service_id=None, operation_id=None, operation_input=None, user=None, groups=None)[source]

Bases: vmware.vapi.bindings.struct.VapiStruct

Information about an interposed request for operation invocation. All interposers would receive an instance of this structure as an input parameter.

Tip

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

Parameters:
  • service_id (str) – Fully qualified name of the service which contains the interposed operation. In canonical format. For example org.example.hello.
  • operation_id (str) – Name of the interposed operation. In canonical format. For example say_hello.
  • operation_input (DataValue) – Input of the interposed operation.
  • user (SecurityPrincipal or None) – User which started the interposed operation. There could be no authentication information. For example when methods are invoked anonymously.
  • groups (list of SecurityPrincipal) – Groups of the user who started the interposed operation. Would be empty if there is no authentication information.
class com.vmware.vapi.std.interposition_client.InvocationResult(result_type=None, output=None, error=None)[source]

Bases: vmware.vapi.bindings.struct.VapiStruct

Information about the result from an interposed operation invocation. All POST interposers will receive an instance of this structure.

Tip

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

Parameters:
class ResultType(string)[source]

Bases: vmware.vapi.bindings.enum.Enum

Type of the invocation result.

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 ResultType instance.
ERROR_RESULT = ResultType(string=u'ERROR_RESULT')

Error invocation result.

NORMAL_RESULT = ResultType(string=u'NORMAL_RESULT')

Normal invocation result.

class com.vmware.vapi.std.interposition_client.SecurityPrincipal(name=None, domain=None)[source]

Bases: vmware.vapi.bindings.struct.VapiStruct

VMODL equivalent of com.vmware.vapi.security.PrincipalId.

Tip

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

Parameters:
  • name (str) – Principal name.
  • domain (str or None) – Principal domain. Domain is optional in com.vmware.vapi.security.PrincipalId

introspection_client Module

The com.vmware.vapi.std.introspection_client module provides classes that expose basic information about the vAPI classes registered with a vAPI provider.

class com.vmware.vapi.std.introspection_client.Operation(config)[source]

Bases: vmware.vapi.bindings.stub.VapiInterface

The Operation service provides operations to retrieve information about the operations present in a vAPI service.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class DataDefinition(type=None, element_definition=None, name=None, fields=None)[source]

Bases: vmware.vapi.bindings.struct.VapiStruct

The Operation.DataDefinition structure describes a vAPI data type.

Tip

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

Parameters:
class DataType(string)[source]

Bases: vmware.vapi.bindings.enum.Enum

The Operation.DataDefinition.DataType enumeration provides values representing the data types supported by the vAPI 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 DataType instance.
ANY_ERROR = DataType(string=u'ANY_ERROR')

Indicates the value is arbitrary error type. This means, any data of type Operation.DataDefinition.DataType.ERROR can be used.

BINARY = DataType(string=u'BINARY')

Indicates the value is a binary type.

BOOLEAN = DataType(string=u'BOOLEAN')

Indicates the value is a boolean type. The possible values are True and False equivalent of the language used to invoke this operation.

DOUBLE = DataType(string=u'DOUBLE')

Indicates the value is a double type. It is a 64 bit floating point number.

DYNAMIC_STRUCTURE = DataType(string=u'DYNAMIC_STRUCTURE')

Indicates the value is a dynamic structure. This means, any data of type Operation.DataDefinition.DataType.STRUCTURE can be used.

ERROR = DataType(string=u'ERROR')

Indicates the value is a specific error type.

LIST = DataType(string=u'LIST')

Indicates the value is a list data type. Any value of this type can have zero or more elements in the list.

LONG = DataType(string=u'LONG')

Indicates the value is a long data type. It is a 64 bit signed integer number.

OPAQUE = DataType(string=u'OPAQUE')

Indicates the value is an opaque type. This means, data of any Operation.DataDefinition.DataType can be used.

OPTIONAL = DataType(string=u'OPTIONAL')

Indicates the value is an optional data type. Any value of this type can be null.

SECRET = DataType(string=u'SECRET')

Indicates the value is a secret data type. This is used for sensitive information. The server will not log any data of this type and if possible wipe the data from the memory after usage.

STRING = DataType(string=u'STRING')

Indicates the value is a string data type. This is a unicode string.

STRUCTURE = DataType(string=u'STRUCTURE')

Indicates the value is a structure data type. A structure has string identifier and a set of fields with corresponding values.

STRUCTURE_REF = DataType(string=u'STRUCTURE_REF')

Indicates the value is a structure reference. This is used to break circular dependencies in the type references. This just has a string identifier of the structure. Clients have to maintain a list of structures already visited and use that to resolve this reference.

VOID = DataType(string=u'VOID')

Indicates the value is a void data type.

class Operation.Info(input_definition=None, output_definition=None, error_definitions=None)[source]

Bases: vmware.vapi.bindings.struct.VapiStruct

Information about a vAPI operation.

Tip

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

Parameters:
Operation.get(service_id, operation_id)[source]

Returns the Operation.Info for a given vAPI operation.

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

Operation.Info

Returns:

Operation.Info for a given vAPI operation.

Raise :

com.vmware.vapi.std.errors_client.NotFound If the operation identifier does not exist.

Raise :

com.vmware.vapi.std.errors_client.NotFound If the service identifier does not exist.

Operation.list(service_id)[source]

Returns the set of operation identifiers for a given vAPI service.

Parameters:service_id (str) – service identifier. The parameter must be an identifier for the resource type: com.vmware.vapi.service.
Return type:set of str
Returns:set of operation identifiers for a given vAPI service. The return value will contain identifiers for the resource type: com.vmware.vapi.operation.
Raise :com.vmware.vapi.std.errors_client.NotFound If the service identifier does not exist.
class com.vmware.vapi.std.introspection_client.Provider(config)[source]

Bases: vmware.vapi.bindings.stub.VapiInterface

The Provider service provides operations to retrieve information about a vAPI Provider. A provider is a container that exposes one or more vAPI services.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class Info(id=None, checksum=None)[source]

Bases: vmware.vapi.bindings.struct.VapiStruct

Information about a vAPI provider

Tip

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

Parameters:
  • id (str) – Identifier of the provider When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vapi.provider. 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.provider.
  • checksum (str) –

    Checksum of the information present in the provider.

    Clients can use this information to check if the service information has changed. When a new service is added or removed (or) one of the existing service information is modified, the value of the checksum changes.

    The information used to calculate the checksum includes:
    • service identifiers
    • operation identifiers inside the service
    • input, output and error definitions of an operation
Provider.get()[source]

Returns a Provider.Info describing the vAPI provider on which the operation is invoked

Return type:Provider.Info
Returns:Provider.Info describing the vAPI provider on which the operation is invoked
class com.vmware.vapi.std.introspection_client.Service(config)[source]

Bases: vmware.vapi.bindings.stub.VapiInterface

The Service service provides operations to retrieve information about the services exposed by a vAPI provider. A provider is a container that exposes one or more vAPI services.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class Info(operations=None)[source]

Bases: vmware.vapi.bindings.struct.VapiStruct

Information about a vAPI service

Tip

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

Parameters:operations (set of str) – Set of identifiers of operations present in the service When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type: com.vmware.vapi.operation. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: com.vmware.vapi.operation.
Service.get(id)[source]

Returns the Service.Info for the specified service

Parameters:id (str) – service identifier The parameter must be an identifier for the resource type: com.vmware.vapi.service.
Return type:Service.Info
Returns:Service.Info for the specified service
Raise :com.vmware.vapi.std.errors_client.NotFound If the service identifier does not exist
Service.list()[source]

Returns the set of service identifiers.

Return type:set of str
Returns:set of service identifiers The return value will contain identifiers for the resource type: com.vmware.vapi.service.

Table Of Contents

Previous topic

routing Package

Next topic

vcenter Package

This Page