Scripting Object - VcHttpNfcLease

Scripting-object corresponding to
HttpNfcLease
Attribute of
VcHttpNfcLeaseInfo
Returned by
createImportLease, exportSnapshot, exportVApp, exportVm, importVApp, importVApp

Scripting Object Description

Represents a lease on a {@link vim.VirtualMachine} or a {@link vim.VirtualApp}, which can be used to import or export disks for the entity. While the lease is held, operations that alter the state of the virtual machines covered by the lease are blocked. Examples of blocked operations are PowerOn, Destroy, Migrate, etc.

A lease is in one of four states:

Initializing
This is the initial state. The lease remains in this state while the corresponding import/export task is preparing the objects. In an import session, this involves creating inventory objects.
Ready
The lease changes to this state once the corresponding import/export task is done preparing the lease. The leased objects are now ready, and the client can use the information provided in the {@link #info} property to determine where to up/download disks. The client must call {@link #progress} periodically to keep the lease alive and report progress to the corresponding import/export task. Failure to do so causes the lease to time out and enter the error state.
Done
When the client is done transferring disks, it calls {@link #complete} to signal the end of the import/export session. This causes the corresponding import/export task to complete successfully.
Error
If an error occurs during initialization or the lease times out, it will change to this state. The client can also abort the lease manually by calling {@link #abort}. In this state, the {@link #error} property can be read to determine the cause. If the lease belongs to an import session, all objects created during the import are removed when the lease enters this state.
The import/export task corresponding to the lease continues running while the lease is held.

Attributes

Name Type Description
capabilitiesVcHttpNfcLeaseCapabilities

@since vim unstable version
errorVcLocalizedMethodFault

@since vSphere API 4.0
idString

@since Unknown
infoVcHttpNfcLeaseInfo

@since vSphere API 4.0
initializeProgressNumber

@since vSphere API 4.0
modeString

@since vim unstable version
morefVcManagedObjectReference

returns the ManagedObjectReference of this ManagedObject @since Unknown
sdkConnectionVcSdkConnection

@since Unknown
sdkIdString

@since Unknown
stateVcHttpNfcLeaseState

@since vSphere API 4.0
transferProgressNumber

@since vim unstable version
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, createTrigger, httpNfcLeaseAbort, httpNfcLeaseComplete, httpNfcLeaseGetManifest, httpNfcLeaseProgress, httpNfcLeasePullFromUrls_Task, httpNfcLeaseSetManifestChecksumType

_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

httpNfcLeaseProgress

Sets the disk up/download progress, and renews this lease. A lease will time out automatically after a while. If the client wishes to continue using it, for example if it is not done accessing the disks, this method must be called periodically. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0Number


Return Value

Type Description
None

httpNfcLeasePullFromUrls_Task

Upgrades current lease from push to pull mode. @since vim unstable version

Parameters

NameTypeDescription
arg0VcHttpNfcLeaseSourceFile []


Return Value

Type Description
VcTask

httpNfcLeaseAbort

Aborts the import/export and releases this lease. Operations on the objects contained in this lease will no longer be blocked. After calling this method, this lease will no longer be valid.

Clients should call this method if an error occurs while accessing the disks, or if the operation is cancelled. The client can report the cause of the abort to other clients listening on the task with the fault parameter. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcLocalizedMethodFault


Return Value

Type Description
None

httpNfcLeaseGetManifest

Gets the download manifest for this lease. @since vSphere API 4.1

Parameters

NameTypeDescription
None

Return Value

Type Description
VcHttpNfcLeaseManifestEntry []

httpNfcLeaseSetManifestChecksumType

Sets desired checksum algorithm per each file that will be returned in ManifestEntry. Should be set before any transfer starts. @since vim unstable version

Parameters

NameTypeDescription
arg0VcKeyValue []


Return Value

Type Description
None

httpNfcLeaseComplete

Completes the import/export and releases this lease. Operations on the objects contained in this lease will no longer be blocked. After calling this method, this lease will no longer be valid.

Clients should call this method when they are done accessing the disks for the {@link vim.VirtualMachine}s in this lease. The status of the corresponding task will be set to success. @since vSphere API 4.0

Parameters

NameTypeDescription
None

Return Value

Type Description
None