glance.registry.client.v1.client module¶
Simple client class to speak with any RESTful service that implements the Glance Registry API
-
class
glance.registry.client.v1.client.
RegistryClient
(host=None, port=None, metadata_encryption_key=None, identity_headers=None, **kwargs)[source]¶ Bases:
glance.common.client.BaseClient
A client for the Registry image metadata service.
-
DEFAULT_PORT
= 9191¶
-
add_member
(image_id, member_id, can_share=None)[source]¶ Add to registry’s information about image membership.
-
do_request
(method, action, **kwargs)[source]¶ Make a request, returning an HTTP response object.
- Parameters
method – HTTP verb (GET, POST, PUT, etc.)
action – Requested path to append to self.doc_root
body – Data to send in the body of the request
headers – Headers to send with the request
params – Key/value pairs to use in query string
- Returns
HTTP response object
-
get_images
(**kwargs)[source]¶ Returns a list of image id/name mappings from Registry
- Parameters
filters – dict of keys & expected values to filter results
marker – image id after which to start page
limit – max number of images to return
sort_key – results will be ordered by this image attribute
sort_dir – direction in which to order results (asc, desc)
-
get_images_detailed
(**kwargs)[source]¶ Returns a list of detailed image data mappings from Registry
- Parameters
filters – dict of keys & expected values to filter results
marker – image id after which to start page
limit – max number of images to return
sort_key – results will be ordered by this image attribute
sort_dir – direction in which to order results (asc, desc)
-