glance.db.sqlalchemy.metadef_api package

Submodules

glance.db.sqlalchemy.metadef_api.namespace module

glance.db.sqlalchemy.metadef_api.namespace.create(context, values, session)[source]

Create a namespace, raise if namespace already exists.

glance.db.sqlalchemy.metadef_api.namespace.delete(context, name, session)[source]

Raise if not found, has references or not visible

glance.db.sqlalchemy.metadef_api.namespace.delete_cascade(context, name, session)[source]

Raise if not found, has references or not visible

glance.db.sqlalchemy.metadef_api.namespace.get(context, name, session)[source]

Get a namespace by name, raise if not found

glance.db.sqlalchemy.metadef_api.namespace.get_all(context, session, marker=None, limit=None, sort_key=None, sort_dir=None, filters=None)[source]

List all visible namespaces

glance.db.sqlalchemy.metadef_api.namespace.update(context, namespace_id, values, session)[source]

Update a namespace, raise if not found/visible or duplicate result

glance.db.sqlalchemy.metadef_api.object module

glance.db.sqlalchemy.metadef_api.object.count(context, namespace_name, session)[source]

Get the count of objects for a namespace, raise if ns not found

glance.db.sqlalchemy.metadef_api.object.create(context, namespace_name, values, session)[source]
glance.db.sqlalchemy.metadef_api.object.delete(context, namespace_name, object_name, session)[source]
glance.db.sqlalchemy.metadef_api.object.delete_by_namespace_name(context, namespace_name, session)[source]
glance.db.sqlalchemy.metadef_api.object.delete_namespace_content(context, namespace_id, session)[source]

Use this def only if the ns for the id has been verified as visible

glance.db.sqlalchemy.metadef_api.object.get(context, namespace_name, name, session)[source]
glance.db.sqlalchemy.metadef_api.object.get_all(context, namespace_name, session)[source]
glance.db.sqlalchemy.metadef_api.object.update(context, namespace_name, object_id, values, session)[source]

Update an object, raise if ns not found/visible or duplicate result

glance.db.sqlalchemy.metadef_api.property module

glance.db.sqlalchemy.metadef_api.property.count(context, namespace_name, session)[source]

Get the count of properties for a namespace, raise if ns not found

glance.db.sqlalchemy.metadef_api.property.create(context, namespace_name, values, session)[source]
glance.db.sqlalchemy.metadef_api.property.delete(context, namespace_name, property_name, session)[source]
glance.db.sqlalchemy.metadef_api.property.delete_by_namespace_name(context, namespace_name, session)[source]
glance.db.sqlalchemy.metadef_api.property.delete_namespace_content(context, namespace_id, session)[source]

Use this def only if the ns for the id has been verified as visible

glance.db.sqlalchemy.metadef_api.property.get(context, namespace_name, name, session)[source]

get a property; raise if ns not found/visible or property not found

glance.db.sqlalchemy.metadef_api.property.get_all(context, namespace_name, session)[source]
glance.db.sqlalchemy.metadef_api.property.update(context, namespace_name, property_id, values, session)[source]

Update a property, raise if ns not found/visible or duplicate result

glance.db.sqlalchemy.metadef_api.resource_type module

glance.db.sqlalchemy.metadef_api.resource_type.create(context, values, session)[source]

Create a resource_type, raise if it already exists.

glance.db.sqlalchemy.metadef_api.resource_type.delete(context, name, session)[source]

Delete a resource type or raise if not found or is protected

glance.db.sqlalchemy.metadef_api.resource_type.get(context, name, session)[source]

Get a resource type, raise if not found

glance.db.sqlalchemy.metadef_api.resource_type.get_all(context, session)[source]

Get a list of all resource types

glance.db.sqlalchemy.metadef_api.resource_type.update(context, values, session)[source]

Update a resource type, raise if not found

glance.db.sqlalchemy.metadef_api.resource_type_association module

glance.db.sqlalchemy.metadef_api.resource_type_association.create(context, namespace_name, values, session)[source]

Create an association, raise if already exists or ns not found.

glance.db.sqlalchemy.metadef_api.resource_type_association.delete(context, namespace_name, resource_type_name, session)[source]

Delete an association or raise if not found

glance.db.sqlalchemy.metadef_api.resource_type_association.delete_namespace_content(context, namespace_id, session)[source]

Use this def only if the ns for the id has been verified as visible

glance.db.sqlalchemy.metadef_api.resource_type_association.get(context, namespace_name, resource_type_name, session)[source]

Get a resource_type associations; raise if not found

glance.db.sqlalchemy.metadef_api.resource_type_association.get_all_by_namespace(context, namespace_name, session)[source]

List resource_type associations by namespace, raise if not found

glance.db.sqlalchemy.metadef_api.tag module

glance.db.sqlalchemy.metadef_api.tag.count(context, namespace_name, session)[source]

Get the count of objects for a namespace, raise if ns not found

glance.db.sqlalchemy.metadef_api.tag.create(context, namespace_name, values, session)[source]
glance.db.sqlalchemy.metadef_api.tag.create_tags(context, namespace_name, tag_list, session)[source]
glance.db.sqlalchemy.metadef_api.tag.delete(context, namespace_name, name, session)[source]
glance.db.sqlalchemy.metadef_api.tag.delete_by_namespace_name(context, namespace_name, session)[source]
glance.db.sqlalchemy.metadef_api.tag.delete_namespace_content(context, namespace_id, session)[source]

Use this def only if the ns for the id has been verified as visible

glance.db.sqlalchemy.metadef_api.tag.get(context, namespace_name, name, session)[source]
glance.db.sqlalchemy.metadef_api.tag.get_all(context, namespace_name, session, filters=None, marker=None, limit=None, sort_key='created_at', sort_dir='desc')[source]

Get all tags that match zero or more filters.

Parameters:
  • filters – dict of filter keys and values.
  • marker – tag id after which to start page
  • limit – maximum number of namespaces to return
  • sort_key – namespace attribute by which results should be sorted
  • sort_dir – direction in which results should be sorted (asc, desc)
glance.db.sqlalchemy.metadef_api.tag.update(context, namespace_name, id, values, session)[source]

Update an tag, raise if ns not found/visible or duplicate result

glance.db.sqlalchemy.metadef_api.utils module

glance.db.sqlalchemy.metadef_api.utils.drop_protected_attrs(model_class, values)[source]

Removed protected attributes from values dictionary using the models __protected_attributes__ field.

Module contents