glance.db.simple.api module

glance.db.simple.api.clear_db_env(*args, **kwargs)[source]

Setup global environment configuration variables.

We have no connection-oriented environment variables, so this is a NOOP.

glance.db.simple.api.configure()[source]
glance.db.simple.api.image_create(context, image_values, v1_mode=False)[source]
glance.db.simple.api.image_destroy(context, image_id)[source]
glance.db.simple.api.image_get(context, image_id, session=None, force_show_deleted=False, v1_mode=False)[source]
glance.db.simple.api.image_get_all(context, filters=None, marker=None, limit=None, sort_key=None, sort_dir=None, member_status='accepted', is_public=None, admin_as_user=False, return_tag=False, v1_mode=False)[source]
glance.db.simple.api.image_location_delete(context, image_id, location_id, status, delete_time=None)[source]
glance.db.simple.api.image_member_count(context, image_id)[source]

Return the number of image members for this image

Parameters

image_id – identifier of image entity

glance.db.simple.api.image_member_delete(context, member_id)[source]
glance.db.simple.api.image_member_find(context, image_id=None, member=None, status=None, include_deleted=False)[source]
glance.db.simple.api.image_member_update(context, member_id, values)[source]
glance.db.simple.api.image_property_create(context, values)[source]
glance.db.simple.api.image_property_delete(context, prop_ref, image_ref)[source]
glance.db.simple.api.image_restore(context, image_id)[source]

Restore the pending-delete image to active.

glance.db.simple.api.image_tag_delete(context, image_id, value)[source]
glance.db.simple.api.image_tag_get(context, image_id, value)[source]
glance.db.simple.api.image_tag_get_all(context, image_id)[source]
glance.db.simple.api.image_tag_set_all(context, image_id, values)[source]
glance.db.simple.api.image_update(context, image_id, image_values, purge_props=False, from_state=None, v1_mode=False)[source]
glance.db.simple.api.is_image_visible(context, image, status=None)[source]
glance.db.simple.api.log_call(func)[source]
glance.db.simple.api.metadef_namespace_delete(context, namespace_name)[source]

Delete a namespace object

glance.db.simple.api.metadef_namespace_delete_content(context, namespace_name)[source]

Delete a namespace content

glance.db.simple.api.metadef_namespace_get(context, namespace_name)[source]

Get a namespace object

glance.db.simple.api.metadef_namespace_get_all(context, marker=None, limit=None, sort_key='created_at', sort_dir='desc', filters=None)[source]

Get a namespaces list

glance.db.simple.api.metadef_namespace_get_by_id(context, namespace_id)[source]

Get a namespace object

glance.db.simple.api.metadef_object_count(context, namespace_name)[source]

Get metadef object count in a namespace

glance.db.simple.api.metadef_object_delete(context, namespace_name, object_name)[source]

Delete a metadef object

glance.db.simple.api.metadef_object_delete_namespace_content(context, namespace_name, session=None)[source]

Delete an object or raise if namespace or object doesn’t exist.

glance.db.simple.api.metadef_object_get(context, namespace_name, object_name)[source]

Get a metadef object

glance.db.simple.api.metadef_object_get_all(context, namespace_name)[source]

Get a metadef objects list

glance.db.simple.api.metadef_object_get_by_id(context, namespace_name, object_id)[source]

Get a metadef object

glance.db.simple.api.metadef_property_count(context, namespace_name)[source]

Get properties count in a namespace

glance.db.simple.api.metadef_property_delete(context, namespace_name, property_name)[source]

Delete a metadef property

glance.db.simple.api.metadef_property_delete_namespace_content(context, namespace_name, session=None)[source]

Delete a property or raise if it or namespace doesn’t exist.

glance.db.simple.api.metadef_property_get(context, namespace_name, property_name)[source]

Get a metadef property

glance.db.simple.api.metadef_property_get_all(context, namespace_name)[source]

Get a metadef properties list

glance.db.simple.api.metadef_property_get_by_id(context, namespace_name, property_id)[source]

Get a metadef property

glance.db.simple.api.metadef_resource_type_association_create(context, namespace_name, values)[source]
glance.db.simple.api.metadef_resource_type_association_delete(context, namespace_name, resource_type_name)[source]
glance.db.simple.api.metadef_resource_type_association_get(context, namespace_name, resource_type_name)[source]
glance.db.simple.api.metadef_resource_type_association_get_all_by_namespace(context, namespace_name)[source]
glance.db.simple.api.metadef_resource_type_create(context, values)[source]

Create a metadef resource type

glance.db.simple.api.metadef_resource_type_get(context, resource_type_name)[source]

Get a resource type

glance.db.simple.api.metadef_resource_type_get_all(context)[source]

List all resource types

glance.db.simple.api.metadef_tag_count(context, namespace_name)[source]

Get metadef tag count in a namespace

glance.db.simple.api.metadef_tag_create_tags(context, namespace_name, tag_list)[source]

Create a metadef tag

glance.db.simple.api.metadef_tag_delete(context, namespace_name, name)[source]

Delete a metadef tag

glance.db.simple.api.metadef_tag_delete_namespace_content(context, namespace_name, session=None)[source]

Delete an tag or raise if namespace or tag doesn’t exist.

glance.db.simple.api.metadef_tag_get(context, namespace_name, name)[source]

Get a metadef tag

glance.db.simple.api.metadef_tag_get_all(context, namespace_name, filters=None, marker=None, limit=None, sort_key='created_at', sort_dir=None, session=None)[source]

Get a metadef tags list

glance.db.simple.api.metadef_tag_get_by_id(context, namespace_name, id)[source]

Get a metadef tag

glance.db.simple.api.reset()[source]
glance.db.simple.api.task_create(context, values)[source]

Create a task object

glance.db.simple.api.task_delete(context, task_id)[source]
glance.db.simple.api.task_get(context, task_id, force_show_deleted=False)[source]
glance.db.simple.api.task_get_all(context, filters=None, marker=None, limit=None, sort_key='created_at', sort_dir='desc')[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)

Returns

tasks set

glance.db.simple.api.task_update(context, task_id, values)[source]

Update a task object

glance.db.simple.api.user_get_storage_usage(context, owner_id, image_id=None, session=None)[source]