The glance_store._drivers.sheepdog Module

The glance_store._drivers.sheepdog Module

Storage backend for Sheepdog storage system

class glance_store._drivers.sheepdog.ImageIterator(image)

Bases: object

Reads data from an Sheepdog image, one chunk at a time.

class glance_store._drivers.sheepdog.SheepdogImage(addr, port, name, chunk_size)

Bases: object

Class describing an image stored in Sheepdog storage.

create(size)

Create this image in the Sheepdog cluster with size ‘size’.

Sheepdog Usage: collie vdi create -a address -p port image size

delete()

Delete this image in the Sheepdog cluster

Sheepdog Usage: collie vdi delete -a address -p port image

exist()

Check if this image exists in the Sheepdog cluster via ‘list’ command

Sheepdog Usage: collie vdi list -r -a address -p port image

get_size()

Return the size of the this image

Sheepdog Usage: collie vdi list -r -a address -p port image

read(offset, count)

Read up to ‘count’ bytes from this image starting at ‘offset’ and return the data.

Sheepdog Usage: collie vdi read -a address -p port image offset len

resize(size)

Resize this image in the Sheepdog cluster with size ‘size’.

Sheepdog Usage: collie vdi create -a address -p port image size

write(data, offset, count)

Write up to ‘count’ bytes from the data to this image starting at ‘offset’

Sheepdog Usage: collie vdi write -a address -p port image offset len

class glance_store._drivers.sheepdog.Store(conf)

Bases: glance_store.driver.Store

Sheepdog backend adapter.

EXAMPLE_URL = 'sheepdog://addr:port:image'
OPTIONS = [<oslo_config.cfg.IntOpt object>, <oslo_config.cfg.PortOpt object>, <oslo_config.cfg.HostAddressOpt object>]
add(store, *args, **kwargs)
configure_add()

Configure the Store to use the stored configuration options Any store that needs special configuration should implement this method. If the store was not able to successfully configure itself, it should raise exceptions.BadStoreConfiguration

delete(store, *args, **kwargs)
get(store, *args, **kwargs)
get_schemes()
get_size(location, context=None)

Takes a glance_store.location.Location object that indicates where to find the image file and returns the image size

Parameters:locationglance_store.location.Location object, supplied from glance_store.location.get_location_from_uri()
Raises:glance_store.exceptions.NotFound if image does not exist
Return type:int
class glance_store._drivers.sheepdog.StoreLocation(store_specs, conf)

Bases: glance_store.location.StoreLocation

Class describing a Sheepdog URI. This is of the form:

sheepdog://addr:port:image
get_uri()
parse_uri(uri)
process_specs()
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.