The nova.virt.vmwareapi.io_util Module

Utility classes for defining the time saving transfer of data from the reader to the write using a LightQueue as a Pipe between the reader and the writer.

class GlanceWriteThread(context, input, image_id, image_meta=None)

Bases: object

Ensures that image data is written to in the glance client and that it is in correct (‘active’)state.

close()
start()
stop()
wait()
class IOThread(input, output)

Bases: object

Class that reads chunks from the input file and writes them to the output file till the transfer is completely done.

start()
stop()
wait()
class ThreadSafePipe(maxsize, transfer_size)

Bases: eventlet.queue.LightQueue

The pipe to hold the data which the reader writes to and the writer reads from.

close()

A place-holder to maintain consistency.

read(chunk_size)

Read data from the pipe.

Chunksize if ignored for we have ensured that the data chunks written to the pipe by readers is the same as the chunks asked for by the Writer.

seek(offset, whence=0)

Set the file’s current position at the offset.

tell()

Get size of the file to be read.

write(data)

Put a data item in the pipe.

Previous topic

The nova.virt.vmwareapi.images Module

Next topic

The nova.virt.vmwareapi.network_util Module

Project Source

This Page