Classes defining read and write handles for image transfer.
This module defines various classes for reading and writing files including VMDK files in VMware servers. It also contains a class to read images from glance server.
Bases: object
Base class for VMware server file (including VMDK) access over HTTP.
This class wraps a backing file handle and provides utility methods for various sub-classes.
Close the file handle.
Get size of the file to be read.
Raises: | NotImplementedError |
---|
Read a chunk of data.
Parameters: | chunk_size – read chunk size |
---|---|
Raises: | NotImplementedError |
Write data to the file.
Parameters: | data – data to be written |
---|---|
Raises: | NotImplementedError |
Bases: oslo_vmware.rw_handles.FileHandle
Write handle for a file in VMware server.
Get the response and close the connection.
Write data to the file.
Parameters: | data – data to be written |
---|---|
Raises: | VimConnectionException, VimException |
Bases: object
Read handle for glance images.
Close the read handle.
This is a NOP.
Get the next item from the image iterator.
Read an item from the image data iterator.
The input chunk size is ignored since the client ImageBodyIterator uses its own chunk size.
Bases: oslo_vmware.rw_handles.FileHandle
VMDK handle based on HttpNfcLease.
Updates progress to lease.
This call back to the lease is essential to keep the lease alive across long running write/read operations.
Raises: | VimException, VimFaultException, VimAttributeException, VimSessionOverLoadException, VimConnectionException |
---|
Bases: oslo_vmware.rw_handles.VmdkHandle
VMDK read handle based on HttpNfcLease.
Releases the lease and close the connection.
Raises: | VimException, VimFaultException, VimAttributeException, VimSessionOverLoadException, VimConnectionException |
---|
Read a chunk of data from the VMDK file.
Parameters: | chunk_size – size of read chunk |
---|---|
Returns: | the data |
Raises: | VimException |
Bases: oslo_vmware.rw_handles.VmdkHandle
VMDK write handle based on HttpNfcLease.
This class creates a vApp in the specified resource pool and uploads the virtual disk contents.
Releases the lease and close the connection.
Raises: | VimAttributeException, VimSessionOverLoadException, VimConnectionException |
---|
“Get managed object reference of the VM created for import.
Write data to the file.
Parameters: | data – data to be written |
---|---|
Raises: | VimConnectionException, VimException |