Scripting Object - VcOvfConsumer

Scripting-object corresponding to
OvfConsumer

Scripting Object Description

Service interface to be provided by vCenter server extensions that are also OVF consumers.

vCenter server extensions that need to extend the OVF functionality of vCenter server must implement and expose this API. The URL that gives access to this API must then be registered as part of the extension registration.

See also {@link vim.Extension.OvfConsumerInfo} for more information about registering an OVF consumer.

The methods in this API should only be called by the vCenter server. OVF consumer implementations should check the client certificate of the caller to enforce this.

Attributes

Name Type Description
idString

@since Unknown
morefVcManagedObjectReference

returns the ManagedObjectReference of this ManagedObject @since Unknown
sdkConnectionVcSdkConnection

@since Unknown
sdkIdString

@since Unknown
typeStringDeprecated.

Returns the name for the this managed object's vim type @since Unknown
vimHostVcSdkConnection

@since Unknown
vimIdString

@since Unknown
vimTypeString

@since Unknown

Methods

Methods defined in this Scripting Object
_getRef, annotateOst, cloneEntities, createTrigger, notifyPowerOn, populateEntityOst, registerEntities, retrievePublicOvfEnvironmentSections, unregisterEntities, validateInstantiationOst

_getRef

@since Unknown

Parameters

NameTypeDescription
None

Return Value

Type Description
VcManagedObjectReference

createTrigger

@since Unknown

Parameters

NameTypeDescription
timeoutNumber

filterString

conditionString

filterToSyncString


Return Value

Type Description
Trigger

notifyPowerOn

Notifies the OVF consumer that a VM is about to be powered on.

This method is called by the vCenter server when a VM is about to be powered on. The OVF consumer may contribute to the private OVF environment of the Virtual Machine by returning one or more sections.

If the VM is located inside or linked to a vApp, that vApp is provided for reference as the parent argument.

The OVF consumer may block a power on operation by throwing an OvfConsumerPowerOnFault. @since vSphere API 5.0

Parameters

NameTypeDescription
arg0VcVirtualMachine

arg1VcVirtualApp


Return Value

Type Description
String []

unregisterEntities

Callback to notify the OVF consumer that some managed entities should be unregistered.

The consumer is not required to react to this call, but it may want to cleanup some internal state. @since vSphere API 5.0

Parameters

NameTypeDescription
arg0VcOvfConsumerContext

arg1VcManagedEntity []


Return Value

Type Description
None

registerEntities

Callback to notify the OVF consumer that the entities specified in the entity OST should be registered.

The previously validated instantiation OST has now been augmented with the managed object references of the corresponding entities, creating an entity OST.

The managed entities are not locked when this method is called, allowing the OVF consumer to call back into vCenter server to examine the entities. This means that the consumer cannot rely on all entities to still be present. For example, another participating consumer or a user could have moved or deleted one of the entities. @since vSphere API 5.0

Parameters

NameTypeDescription
arg0VcOvfConsumerContext

arg1VcOvfConsumerOstNode


Return Value

Type Description
None

annotateOst

Annotate the given OVF section tree with configuration choices for this OVF consumer.

This method is used as part of deploying an OVF package or cloning a vApp or VM with vApp meta-data. vCenter server creates an OVF section tree for each OVF consumer. The tree contains only the section types for which the consumer has registered itself as a handler (see {@link vim.Extension.OvfConsumerInfo#sectionType} ).

As part of the annotation process, the consumer may change, add or remove sections at will throughout the tree. However, the most common operation is to add XML elements to extisting sections.

The consumer may not alter the structure of the tree, and the resulting tree must only contain sections of the types registered by the consumer.

The output of this operation should encode all possible configuration choices that can be made as part of deploying the OVF.

The annotated OST is passed back to the caller of either {@link vim.OvfManager#parseDescriptor vim.OvfManager.parseDescriptor} (see {@link vim.OvfManager.ParseDescriptorResult#annotatedOst} ) or {@link vim.VirtualApp#clone vim.VirtualApp.clone}, which uses it to create an instantiation OST.

This method may be called multiple times, gradually building up a complete annotated OST. This is relevant if some configuration options depend on the choices made between other options. A partially annotated OST can be given in the optional annotatedOst argument.

The following faults may be added to the result:

@since vSphere API 5.0

Parameters

NameTypeDescription
arg0VcOvfConsumerContext

arg1VcOvfConsumerOstNode

arg2VcOvfConsumerOstNode

arg3VcKeyValue []


Return Value

Type Description
VcOvfConsumerOstResult

populateEntityOst

Create OVF sections for the given managed entities and populate the entity OST.

This method is called by vCenter server as part of exporting a VM or VApp. The managed object references are set on all OST nodes, but the nodes contain no OVF sections. The OVF consumer may add one or more sections to any node in the tree. The types of the sections must be included in the set of section types registered by the OVF consumer (see {@link vim.Extension.OvfConsumerInfo#sectionType} ).

A number of OvfConsumerFault instances may be added to the result if errors occurred during the operation. Each fault contains an error message that is localized by the OVF consumer. @since vSphere API 5.0

Parameters

NameTypeDescription
arg0VcOvfConsumerContext

arg1VcOvfConsumerOstNode


Return Value

Type Description
VcOvfConsumerOstResult

retrievePublicOvfEnvironmentSections

Retrieves the public OVF environment sections that this OVF consumer has for a given virtual machine.

Called by vCenter as part of constructing the OVF environment when {@link VirtualMachine#extractOvfEnvironment} is called.

If the VM is located inside or linked to a vApp, that vApp is provided for reference as the parent argument.

@since vSphere API 5.0

Parameters

NameTypeDescription
arg0VcVirtualMachine

arg1VcVirtualApp


Return Value

Type Description
String []

cloneEntities

Callback to notify the OVF consumer that the entities specified in the source OST have been cloned.

The OSTs do not contain any OVF sections when this method is called, but the entity field is specified on all nodes. @since vSphere API 5.0

Parameters

NameTypeDescription
arg0VcOvfConsumerContext

arg1VcOvfConsumerOstNode

arg2VcOvfConsumerOstNode


Return Value

Type Description
None

validateInstantiationOst

Validate that this OVF consumer can accept this instantiation OST.

vCenter server calls this method before creating the entities specified by the OST. This gives the OVF consumer a chance to fail the creation if it cannot support the parameters specified in the instantiation OST.

This method is called as part of {@link vim.ResourcePool#importVApp vim.ResourcePool.importVApp} and {@link vim.VirtualApp#clone vim.VirtualApp.clone}. @since vSphere API 5.0

Parameters

NameTypeDescription
arg0VcOvfConsumerContext

arg1VcOvfConsumerOstNode


Return Value

Type Description
None