glance.api.v2 package

Submodules

glance.api.v2.image_actions module

class glance.api.v2.image_actions.ImageActionsController(db_api=None, policy_enforcer=None, notifier=None, store_api=None)[source]

Bases: object

deactivate(req, *args, **kwargs)[source]
reactivate(req, *args, **kwargs)[source]
class glance.api.v2.image_actions.ResponseSerializer[source]

Bases: glance.common.wsgi.JSONResponseSerializer

deactivate(response, result)[source]
reactivate(response, result)[source]
glance.api.v2.image_actions.create_resource()[source]

Image data resource factory method

glance.api.v2.image_data module

class glance.api.v2.image_data.ImageDataController(db_api=None, store_api=None, policy_enforcer=None, notifier=None, gateway=None)[source]

Bases: object

download(req, image_id)[source]
upload(req, *args, **kwargs)[source]
class glance.api.v2.image_data.RequestDeserializer[source]

Bases: glance.common.wsgi.JSONRequestDeserializer

upload(request)[source]
class glance.api.v2.image_data.ResponseSerializer[source]

Bases: glance.common.wsgi.JSONResponseSerializer

download(response, image)[source]
upload(response, result)[source]
glance.api.v2.image_data.create_resource()[source]

Image data resource factory method

glance.api.v2.image_members module

class glance.api.v2.image_members.ImageMembersController(db_api=None, policy_enforcer=None, notifier=None, store_api=None)[source]

Bases: object

create(req, *args, **kwargs)[source]

Adds a membership to the image. :param req: the Request object coming from the wsgi layer :param image_id: the image identifier :param member_id: the member identifier :returns: The response body is a mapping of the following form

{'member_id': <MEMBER>,
 'image_id': <IMAGE>,
 'status': <MEMBER_STATUS>
 'created_at': ..,
 'updated_at': ..}
delete(req, *args, **kwargs)[source]

Removes a membership from the image.

index(req, image_id)[source]

Return a list of dictionaries indicating the members of the image, i.e., those tenants the image is shared with.

Parameters:
  • req – the Request object coming from the wsgi layer
  • image_id – The image identifier
Returns:

The response body is a mapping of the following form

{'members': [
    {'member_id': <MEMBER>,
     'image_id': <IMAGE>,
     'status': <MEMBER_STATUS>,
     'created_at': ..,
     'updated_at': ..}, ..
]}
show(req, image_id, member_id)[source]

Returns the membership of the tenant wrt to the image_id specified.

Parameters:
  • req – the Request object coming from the wsgi layer
  • image_id – The image identifier
Returns:

The response body is a mapping of the following form

{'member_id': <MEMBER>,
 'image_id': <IMAGE>,
 'status': <MEMBER_STATUS>
 'created_at': ..,
 'updated_at': ..}
update(req, *args, **kwargs)[source]

Adds a membership to the image. :param req: the Request object coming from the wsgi layer :param image_id: the image identifier :param member_id: the member identifier :returns: The response body is a mapping of the following form

{'member_id': <MEMBER>,
 'image_id': <IMAGE>,
 'status': <MEMBER_STATUS>,
 'created_at': ..,
 'updated_at': ..}
class glance.api.v2.image_members.RequestDeserializer[source]

Bases: glance.common.wsgi.JSONRequestDeserializer

create(request)[source]
update(request)[source]
class glance.api.v2.image_members.ResponseSerializer(schema=None)[source]

Bases: glance.common.wsgi.JSONResponseSerializer

create(response, image_member)[source]
index(response, image_members)[source]
show(response, image_member)[source]
update(response, image_member)[source]
glance.api.v2.image_members.create_resource()[source]

Image Members resource factory method

glance.api.v2.image_members.get_collection_schema()[source]
glance.api.v2.image_members.get_schema()[source]

glance.api.v2.image_tags module

class glance.api.v2.image_tags.Controller(db_api=None, policy_enforcer=None, notifier=None, store_api=None)[source]

Bases: object

delete(req, *args, **kwargs)[source]
update(req, *args, **kwargs)[source]
class glance.api.v2.image_tags.RequestDeserializer[source]

Bases: glance.common.wsgi.JSONRequestDeserializer

update(request)[source]
class glance.api.v2.image_tags.ResponseSerializer[source]

Bases: glance.common.wsgi.JSONResponseSerializer

delete(response, result)[source]
update(response, result)[source]
glance.api.v2.image_tags.create_resource()[source]

Images resource factory method

glance.api.v2.images module

class glance.api.v2.images.ImagesController(db_api=None, policy_enforcer=None, notifier=None, store_api=None)[source]

Bases: object

create(req, *args, **kwargs)[source]
delete(req, *args, **kwargs)[source]
index(req, marker=None, limit=None, sort_key=None, sort_dir=None, filters=None, member_status='accepted')[source]
show(req, image_id)[source]
update(req, *args, **kwargs)[source]
class glance.api.v2.images.RequestDeserializer(schema=None)[source]

Bases: glance.common.wsgi.JSONRequestDeserializer

create(request)[source]
index(request)[source]
update(request)[source]
class glance.api.v2.images.ResponseSerializer(schema=None)[source]

Bases: glance.common.wsgi.JSONResponseSerializer

create(response, image)[source]
delete(response, result)[source]
index(response, result)[source]
show(response, image)[source]
update(response, image)[source]
glance.api.v2.images.create_resource(custom_properties=None)[source]

Images resource factory method

glance.api.v2.images.get_base_properties()[source]
glance.api.v2.images.get_collection_schema(custom_properties=None)[source]
glance.api.v2.images.get_schema(custom_properties=None)[source]
glance.api.v2.images.load_custom_properties()[source]

Find the schema properties files and load them into a dict.

glance.api.v2.metadef_namespaces module

class glance.api.v2.metadef_namespaces.NamespaceController(db_api=None, policy_enforcer=None, notifier=None)[source]

Bases: object

create(req, *args, **kwargs)[source]
delete(req, namespace)[source]
delete_objects(req, namespace)[source]
delete_properties(req, namespace)[source]
delete_tags(req, namespace)[source]
index(req, marker=None, limit=None, sort_key='created_at', sort_dir='desc', filters=None)[source]
show(req, namespace, filters=None)[source]
update(req, user_ns, namespace)[source]
class glance.api.v2.metadef_namespaces.RequestDeserializer(schema=None)[source]

Bases: glance.common.wsgi.JSONRequestDeserializer

create(request)[source]
index(request)[source]
show(request)[source]
update(request)[source]
class glance.api.v2.metadef_namespaces.ResponseSerializer(schema=None)[source]

Bases: glance.common.wsgi.JSONResponseSerializer

create(response, namespace)[source]
delete(response, result)[source]
delete_objects(response, result)[source]
delete_properties(response, result)[source]
index(response, result)[source]
show(response, namespace)[source]
update(response, namespace)[source]
glance.api.v2.metadef_namespaces.create_resource()[source]

Namespaces resource factory method

glance.api.v2.metadef_namespaces.get_collection_schema()[source]
glance.api.v2.metadef_namespaces.get_namespace_href(namespace)[source]
glance.api.v2.metadef_namespaces.get_object_href(namespace_name, metadef_object)[source]
glance.api.v2.metadef_namespaces.get_schema()[source]
glance.api.v2.metadef_namespaces.get_schema_definitions()[source]
glance.api.v2.metadef_namespaces.get_tag_href(namespace_name, metadef_tag)[source]

glance.api.v2.metadef_objects module

class glance.api.v2.metadef_objects.MetadefObjectsController(db_api=None, policy_enforcer=None, notifier=None)[source]

Bases: object

create(req, metadata_object, namespace)[source]
delete(req, namespace, object_name)[source]
index(req, namespace, marker=None, limit=None, sort_key='created_at', sort_dir='desc', filters=None)[source]
show(req, namespace, object_name)[source]
update(req, metadata_object, namespace, object_name)[source]
class glance.api.v2.metadef_objects.RequestDeserializer(schema=None)[source]

Bases: glance.common.wsgi.JSONRequestDeserializer

create(request)[source]
index(request)[source]
update(request)[source]
class glance.api.v2.metadef_objects.ResponseSerializer(schema=None)[source]

Bases: glance.common.wsgi.JSONResponseSerializer

create(response, metadata_object)[source]
delete(response, result)[source]
index(response, result)[source]
show(response, metadata_object)[source]
update(response, metadata_object)[source]
glance.api.v2.metadef_objects.create_resource()[source]

Metadef objects resource factory method

glance.api.v2.metadef_objects.get_collection_schema()[source]
glance.api.v2.metadef_objects.get_object_href(namespace_name, metadef_object)[source]
glance.api.v2.metadef_objects.get_schema()[source]

glance.api.v2.metadef_properties module

class glance.api.v2.metadef_properties.NamespacePropertiesController(db_api=None, policy_enforcer=None, notifier=None)[source]

Bases: object

create(req, namespace, property_type)[source]
delete(req, namespace, property_name)[source]
index(req, namespace)[source]
show(req, namespace, property_name, filters=None)[source]
update(req, namespace, property_name, property_type)[source]
class glance.api.v2.metadef_properties.RequestDeserializer(schema=None)[source]

Bases: glance.common.wsgi.JSONRequestDeserializer

create(request)[source]
show(request)[source]
update(request)[source]
class glance.api.v2.metadef_properties.ResponseSerializer(schema=None)[source]

Bases: glance.common.wsgi.JSONResponseSerializer

create(response, result)[source]
delete(response, result)[source]
index(response, result)[source]
show(response, result)[source]
update(response, result)[source]
glance.api.v2.metadef_properties.create_resource()[source]

NamespaceProperties resource factory method

glance.api.v2.metadef_properties.get_collection_schema()[source]
glance.api.v2.metadef_properties.get_schema()[source]

glance.api.v2.metadef_resource_types module

class glance.api.v2.metadef_resource_types.RequestDeserializer(schema=None)[source]

Bases: glance.common.wsgi.JSONRequestDeserializer

create(request)[source]
class glance.api.v2.metadef_resource_types.ResourceTypeController(db_api=None, policy_enforcer=None, notifier=None)[source]

Bases: object

create(req, resource_type, namespace)[source]
delete(req, namespace, resource_type)[source]
index(req)[source]
show(req, namespace)[source]
class glance.api.v2.metadef_resource_types.ResponseSerializer(schema=None)[source]

Bases: glance.common.wsgi.JSONResponseSerializer

create(response, result)[source]
delete(response, result)[source]
index(response, result)[source]
show(response, result)[source]
glance.api.v2.metadef_resource_types.create_resource()[source]

ResourceTypeAssociation resource factory method

glance.api.v2.metadef_resource_types.get_collection_schema()[source]
glance.api.v2.metadef_resource_types.get_schema()[source]

glance.api.v2.metadef_tags module

class glance.api.v2.metadef_tags.RequestDeserializer(schema=None)[source]

Bases: glance.common.wsgi.JSONRequestDeserializer

create_tags(request)[source]
index(request)[source]
update(request)[source]
class glance.api.v2.metadef_tags.ResponseSerializer(schema=None)[source]

Bases: glance.common.wsgi.JSONResponseSerializer

create(response, metadata_tag)[source]
create_tags(response, result)[source]
delete(response, result)[source]
index(response, result)[source]
show(response, metadata_tag)[source]
update(response, metadata_tag)[source]
class glance.api.v2.metadef_tags.TagsController(db_api=None, policy_enforcer=None, notifier=None, schema=None)[source]

Bases: object

create(req, namespace, tag_name)[source]
create_tags(req, metadata_tags, namespace)[source]
delete(req, namespace, tag_name)[source]
index(req, namespace, marker=None, limit=None, sort_key='created_at', sort_dir='desc', filters=None)[source]
show(req, namespace, tag_name)[source]
update(req, metadata_tag, namespace, tag_name)[source]
glance.api.v2.metadef_tags.create_resource()[source]

Metadef tags resource factory method

glance.api.v2.metadef_tags.get_collection_schema()[source]
glance.api.v2.metadef_tags.get_schema()[source]
glance.api.v2.metadef_tags.get_schema_for_list()[source]
glance.api.v2.metadef_tags.get_tag_href(namespace_name, metadef_tag)[source]

glance.api.v2.router module

class glance.api.v2.router.API(mapper)[source]

Bases: glance.common.wsgi.Router

WSGI router for Glance v2 API requests.

glance.api.v2.schemas module

class glance.api.v2.schemas.Controller(custom_image_properties=None)[source]

Bases: object

image(req)[source]
images(req)[source]
member(req)[source]
members(req)[source]
metadef_namespace(req)[source]
metadef_namespaces(req)[source]
metadef_object(req)[source]
metadef_objects(req)[source]
metadef_properties(req)[source]
metadef_property(req)[source]
metadef_resource_type(req)[source]
metadef_resource_types(req)[source]
metadef_tag(req)[source]
metadef_tags(req)[source]
task(req)[source]
tasks(req)[source]
glance.api.v2.schemas.create_resource(custom_image_properties=None)[source]

glance.api.v2.tasks module

class glance.api.v2.tasks.RequestDeserializer(schema=None)[source]

Bases: glance.common.wsgi.JSONRequestDeserializer

create(request)[source]
index(request)[source]
class glance.api.v2.tasks.ResponseSerializer(task_schema=None, partial_task_schema=None)[source]

Bases: glance.common.wsgi.JSONResponseSerializer

create(response, task)[source]
get(response, task)[source]
index(response, result)[source]
class glance.api.v2.tasks.TasksController(db_api=None, policy_enforcer=None, notifier=None, store_api=None)[source]

Bases: object

Manages operations on tasks.

create(req, task)[source]
delete(req, task_id)[source]
get(req, task_id)[source]
index(req, marker=None, limit=None, sort_key='created_at', sort_dir='desc', filters=None)[source]
glance.api.v2.tasks.create_resource()[source]

Task resource factory method

glance.api.v2.tasks.get_collection_schema()[source]
glance.api.v2.tasks.get_task_schema()[source]

Module contents