glance.location module

class glance.location.ImageFactoryProxy(factory, context, store_api, store_utils)[source]

Bases: ImageFactory

new_image(**kwargs)[source]
class glance.location.ImageMemberRepoProxy(repo, image, context, store_api)[source]

Bases: Repo

add(member)[source]
remove(member)[source]
class glance.location.ImageProxy(image, context, store_api, store_utils)[source]

Bases: Image

delete()[source]
get_data(offset=0, chunk_size=None)[source]
property locations
set_data(data, size=None, backend=None, set_active=True)[source]
class glance.location.ImageRepoProxy(image_repo, context, store_api, store_utils)[source]

Bases: Repo

add(image)[source]
get(image_id)[source]
save(image, from_state=None)[source]
class glance.location.StoreLocations(image_proxy, value)[source]

Bases: MutableSequence

The proxy for store location property. It takes responsibility for:

1. Location uri correctness checking when adding a new location.
2. Remove the image data from the store when a location is removed
   from an image.
append(location)[source]

S.append(value) – append value to the end of the sequence

count(value) integer -- return number of occurrences of value[source]
extend(other)[source]

S.extend(iterable) – extend sequence by appending elements from the iterable

index(value[, start[, stop]]) integer -- return first index of value.[source]

Raises ValueError if the value is not present.

Supporting start and stop arguments is optional, but recommended.

insert(i, location)[source]

S.insert(index, value) – insert value before index

pop([index]) item -- remove and return item at index (default last).[source]

Raise IndexError if list is empty or index is out of range.

remove(location)[source]

S.remove(value) – remove first occurrence of value. Raise ValueError if the value is not present.

reverse()[source]

S.reverse() – reverse IN PLACE