This Page

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

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 nova.virt.vmwareapi.io_util.GlanceWriteThread(input, glance_client, image_id, image_meta={})

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 nova.virt.vmwareapi.io_util.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 nova.virt.vmwareapi.io_util.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.

write(data)

Put a data item in the pipe.