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.image.fake Module

Implementation of an fake image service

class nova.image.fake.FakeImageService

Bases: nova.image.service.BaseImageService

Mock (fake) image service for unit testing.

create(context, data)

Store the image data and return the new image id.

:raises Duplicate if the image already exist.

delete(context, image_id)

Delete the given image.

:raises NotFound if the image does not exist.

delete_all()

Clears out all images.

detail(context)

Return list of detailed image information.

index(context)

Returns list of images.

show(context, image_id)

Get data about specified image.

Returns a dict containing image data for the given opaque image id.

update(context, image_id, data)

Replace the contents of the given image with the new data.

:raises NotFound if the image does not exist.