This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Nova 2011.2 docs or all OpenStack docs too.

The nova.virt.vmwareapi.read_write_util Module

Classes to handle image files

Collection of classes to handle image upload/download to/from Image service (like Glance image storage and retrieval service) from/to ESX/ESXi server.

class nova.virt.vmwareapi.read_write_util.GlanceFileRead(glance_read_iter)

Bases: object

Glance file read handler class.

close()

A dummy close just to maintain consistency.

get_next()

Get the next item from the image iterator.

read(chunk_size)

Read an item from the queue. The chunk size is ignored for the Client ImageBodyIterator uses its own CHUNKSIZE.

class nova.virt.vmwareapi.read_write_util.VMWareHTTPWriteFile(host, data_center_name, datastore_name, cookies, file_path, file_size, scheme='https')

Bases: nova.virt.vmwareapi.read_write_util.VMwareHTTPFile

VMWare file write handler class.

close()

Get the response and close the connection.

write(data)

Write to the file.

class nova.virt.vmwareapi.read_write_util.VMwareHTTPFile(file_handle)

Bases: object

Base class for HTTP file.

close()

Close the file handle.

get_eof()

Check if the end of file has been reached.

get_size()

Get size of the file to be read.

read(chunk_size)

Read a chunk of data.

set_eof(eof)

Set the end of file marker.

write(data)

Write data to the file.

class nova.virt.vmwareapi.read_write_util.VmWareHTTPReadFile(host, data_center_name, datastore_name, cookies, file_path, scheme='https')

Bases: nova.virt.vmwareapi.read_write_util.VMwareHTTPFile

VMWare file read handler class.

get_size()

Get size of the file to be read.

read(chunk_size)

Read a chunk of data.