glance.registry.api.v1.images module¶
Reference implementation registry server WSGI controller
-
class
glance.registry.api.v1.images.
Controller
[source]¶ Bases:
object
-
create
(req, body)[source]¶ Registers a new image with the registry.
- Parameters
req – wsgi Request object
body – Dictionary of information about the image
- Returns
The newly-created image information as a mapping, which will include the newly-created image’s internal id in the ‘id’ field
-
delete
(req, id)[source]¶ Deletes an existing image with the registry.
- Parameters
req – wsgi Request object
id – The opaque internal identifier for the image
- Returns
200 if delete was successful, a fault if not. On success, the body contains the deleted image information as a mapping.
-
detail
(req)[source]¶ Return a filtered list of public, non-deleted images in detail
- Parameters
req – the Request object coming from the wsgi layer
- Returns
a mapping of the following form
{'images': [{ 'id': <ID>, 'name': <NAME>, 'size': <SIZE>, 'disk_format': <DISK_FORMAT>, 'container_format': <CONTAINER_FORMAT>, 'checksum': <CHECKSUM>, 'min_disk': <MIN_DISK>, 'min_ram': <MIN_RAM>, 'store': <STORE>, 'status': <STATUS>, 'created_at': <TIMESTAMP>, 'updated_at': <TIMESTAMP>, 'deleted_at': <TIMESTAMP>|<NONE>, 'properties': {'distro': 'Ubuntu 10.04 LTS', {...}} }, {...}] }
-
index
(req)[source]¶ Return a basic filtered list of public, non-deleted images
- Parameters
req – the Request object coming from the wsgi layer
- Returns
a mapping of the following form
dict(images=[image_list])
Where image_list is a sequence of mappings
{ 'id': <ID>, 'name': <NAME>, 'size': <SIZE>, 'disk_format': <DISK_FORMAT>, 'container_format': <CONTAINER_FORMAT>, 'checksum': <CHECKSUM> }
-