This is the Registry’s Driver API.
This API relies on the registry RPC client (version >= 2). The functions bellow
work as a proxy for the database back-end configured in the registry service,
which means that everything returned by that back-end will be also returned by
this API.
This API exists for supporting deployments not willing to put database
credentials in glance-api. Those deployments can rely on this registry driver
that will talk to a remote registry service, which will then access the
database back-end.
-
glance.db.registry.api.configure()[source]
-
glance.db.registry.api.image_create(context, *args, **kwargs)[source]
Create an image from the values dictionary.
-
glance.db.registry.api.image_destroy(context, *args, **kwargs)[source]
Destroy the image or raise if it does not exist.
-
glance.db.registry.api.image_get(context, *args, **kwargs)[source]
-
glance.db.registry.api.image_get_all(context, *args, **kwargs)[source]
Get all images that match zero or more filters.
| Parameters: |
- filters – dict of filter keys and values. If a ‘properties’
key is present, it is treated as a dict of key/value
filters on the image properties attribute
- marker – image id after which to start page
- limit – maximum number of images to return
- sort_key – image attribute by which results should be sorted
- sort_dir – direction in which results should be sorted (asc, desc)
- member_status – only return shared images that have this membership
status
- is_public – If true, return only public images. If false, return
only private and shared images.
- admin_as_user – For backwards compatibility. If true, then return to
an admin the equivalent set of images which it would see
if it were a regular user
- return_tag – To indicates whether image entry in result includes it
relevant tag entries. This could improve upper-layer
query performance, to prevent using separated calls
- v1_mode – If true, mutates the ‘visibility’ value of each image
into the v1-compatible field ‘is_public’
|
-
glance.db.registry.api.image_location_delete(context, *args, **kwargs)[source]
Delete an image location.
-
glance.db.registry.api.image_location_update(context, *args, **kwargs)[source]
Update image location.
-
glance.db.registry.api.image_member_count(context, *args, **kwargs)[source]
Return the number of image members for this image
| Parameters: | image_id – identifier of image entity |
-
glance.db.registry.api.image_member_create(context, *args, **kwargs)[source]
Create an ImageMember object
-
glance.db.registry.api.image_member_delete(context, *args, **kwargs)[source]
Delete an ImageMember object
-
glance.db.registry.api.image_member_find(context, *args, **kwargs)[source]
Find all members that meet the given criteria.
Note, currently include_deleted should be true only when create a new
image membership, as there may be a deleted image membership between
the same image and tenant, the membership will be reused in this case.
It should be false in other cases.
| Parameters: |
- image_id – identifier of image entity
- member – tenant to which membership has been granted
|
| Include_deleted: |
| | A boolean indicating whether the result should include
the deleted record of image member
|
-
glance.db.registry.api.image_member_update(context, *args, **kwargs)[source]
Update an ImageMember object
-
glance.db.registry.api.image_property_create(context, *args, **kwargs)[source]
Create an ImageProperty object
-
glance.db.registry.api.image_property_delete(context, *args, **kwargs)[source]
Used internally by _image_property_create and image_property_update
-
glance.db.registry.api.image_tag_create(context, *args, **kwargs)[source]
Create an image tag.
-
glance.db.registry.api.image_tag_delete(context, *args, **kwargs)[source]
Delete an image tag.
-
glance.db.registry.api.image_tag_get_all(context, *args, **kwargs)[source]
Get a list of tags for a specific image.
-
glance.db.registry.api.image_tag_set_all(context, *args, **kwargs)[source]
-
glance.db.registry.api.image_update(context, *args, **kwargs)[source]
Set the given properties on an image and update it.
-
glance.db.registry.api.is_image_visible(context, image, status=None)[source]
Return True if the image is visible in this context.
-
glance.db.registry.api.metadef_namespace_create(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_namespace_delete(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_namespace_get(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_namespace_get_all(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_namespace_update(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_object_count(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_object_create(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_object_delete(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_object_delete_namespace_content(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_object_get(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_object_get_all(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_object_update(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_property_count(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_property_create(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_property_delete(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_property_delete_namespace_content(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_property_get(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_property_get_all(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_property_update(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_resource_type_association_create(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_resource_type_association_delete(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_resource_type_association_get(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_resource_type_association_get_all_by_namespace(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_resource_type_create(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_resource_type_delete(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_resource_type_get(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_resource_type_get_all(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_tag_count(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_tag_create(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_tag_create_tags(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_tag_delete(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_tag_delete_namespace_content(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_tag_get(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_tag_get_all(context, *args, **kwargs)[source]
-
glance.db.registry.api.metadef_tag_update(context, *args, **kwargs)[source]
-
glance.db.registry.api.task_create(context, *args, **kwargs)[source]
Create a task object
-
glance.db.registry.api.task_delete(context, *args, **kwargs)[source]
Delete a task object
-
glance.db.registry.api.task_get(context, *args, **kwargs)[source]
Get a single task object
:returns: task dictionary
-
glance.db.registry.api.task_get_all(context, *args, **kwargs)[source]
Get all tasks that match zero or more filters.
| Parameters: |
- filters – dict of filter keys and values.
- marker – task id after which to start page
- limit – maximum number of tasks to return
- sort_key – task attribute by which results should be sorted
- sort_dir – direction in which results should be sorted (asc, desc)
- admin_as_user – For backwards compatibility. If true, then return to
an admin the equivalent set of tasks which it would see
if it were a regular user
|
| Returns: | tasks set
|
-
glance.db.registry.api.task_update(context, *args, **kwargs)[source]
-
glance.db.registry.api.user_get_storage_usage(context, *args, **kwargs)[source]