Managed Object -
HttpNfcLease(vim.HttpNfcLease)
- Property of
-
HttpNfcLeaseInfo
- Returned by
-
ExportSnapshot, ExportVApp, ExportVm, ImportVApp
- See also
-
HttpNfcLeaseInfo, HttpNfcLeaseManifestEntry, HttpNfcLeaseState, LocalizedMethodFault, MethodFault
- Since
- vSphere API 4.0
Managed Object Description
Represents a lease on a VirtualMachine or
a 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 info property to determine where to
up/download disks. The client must call HttpNfcLeaseProgress
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
HttpNfcLeaseComplete 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 HttpNfcLeaseAbort. In this state, the 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.
Properties
Name
|
Type
|
Description
|
error | LocalizedMethodFault |
If the lease is in the error state, this property contains the
error that caused the lease to be aborted.
|
info | HttpNfcLeaseInfo |
Provides information on the objects contained in this lease. The
info property is only valid when the lease is in the ready state.
|
initializeProgress | xsd:int |
Provides progress information (0-100 percent) for the initializing state
of the lease. Clients can use this to track overall progress.
|
state | HttpNfcLeaseState |
The current state of the lease.
|
Methods
HttpNfcLeaseAbort(abort)
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.
- Required Privileges
- None
Parameters
Return Value
Faults
Type
|
Description
|
InvalidState | Thrown if the lease has already been aborted. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Timedout | Thrown if the lease has timed out before this call. |
Events
Show WSDL type definition
HttpNfcLeaseComplete(complete)
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 VirtualMachines in this lease. The status
of the corresponding task will be set to success.
- Required Privileges
- None
Parameters
Return Value
Faults
Type
|
Description
|
InvalidState | Thrown if the lease has already been completed or aborted. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Timedout | Thrown if the lease has timed out before this call. |
Events
Show WSDL type definition
HttpNfcLeaseGetManifest(getManifest)
Gets the download manifest for this lease.
- Required Privileges
- None
- Since
- vSphere API 4.1
Parameters
Return Value
Faults
Type
|
Description
|
InvalidState | |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Timedout | |
Events
Show WSDL type definition
HttpNfcLeaseProgress(progress)
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.
- Required Privileges
- None
Parameters
Name | Type | Description |
_this | ManagedObjectReference |
A reference to the
HttpNfcLease
used to make the method call.
|
percent | xsd:int |
[in] Completion status represented as an integer
in the 0-100 range.
|
Return Value
Faults
Type
|
Description
|
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Timedout | Thrown if the lease has timed out. |
Events
Show WSDL type definition