glance.db package

Module contents

class glance.db.ImageMemberRepo(context, db_api, image)[source]

Bases: object

add(image_member)[source]
get(member_id)[source]
list()[source]
remove(image_member)[source]
save(image_member, from_state=None)[source]
class glance.db.ImageProxy(image, context, db_api)[source]

Bases: glance.domain.proxy.Image

class glance.db.ImageRepo(context, db_api)[source]

Bases: object

add(image)[source]
get(image_id)[source]
list(marker=None, limit=None, sort_key=None, sort_dir=None, filters=None, member_status='accepted')[source]
remove(image)[source]
save(image, from_state=None)[source]
class glance.db.MetadefNamespaceRepo(context, db_api)[source]

Bases: object

add(namespace)[source]
get(namespace)[source]
list(marker=None, limit=None, sort_key='created_at', sort_dir='desc', filters=None)[source]
object_count(namespace_name)[source]
property_count(namespace_name)[source]
remove(namespace)[source]
remove_objects(namespace)[source]
remove_properties(namespace)[source]
remove_tags(namespace)[source]
save(namespace)[source]
class glance.db.MetadefObjectRepo(context, db_api)[source]

Bases: object

add(metadata_object)[source]
get(namespace, object_name)[source]
list(marker=None, limit=None, sort_key='created_at', sort_dir='desc', filters=None)[source]
remove(metadata_object)[source]
save(metadata_object)[source]
class glance.db.MetadefPropertyRepo(context, db_api)[source]

Bases: object

add(property)[source]
get(namespace, property_name)[source]
list(marker=None, limit=None, sort_key='created_at', sort_dir='desc', filters=None)[source]
remove(property)[source]
save(property)[source]
class glance.db.MetadefResourceTypeRepo(context, db_api)[source]

Bases: object

add(resource_type)[source]
get(resource_type, namespace)[source]
list(filters=None)[source]
remove(resource_type)[source]
class glance.db.MetadefTagRepo(context, db_api)[source]

Bases: object

add(metadata_tag)[source]
add_tags(metadata_tags)[source]
get(namespace, name)[source]
list(marker=None, limit=None, sort_key='created_at', sort_dir='desc', filters=None)[source]
remove(metadata_tag)[source]
save(metadata_tag)[source]
class glance.db.TaskRepo(context, db_api)[source]

Bases: object

add(task)[source]
get(task_id)[source]
list(marker=None, limit=None, sort_key='created_at', sort_dir='desc', filters=None)[source]
remove(task)[source]
save(task)[source]
glance.db.get_api(v1_mode=False)[source]

When using v2_registry with v2_api or alone, it is essential that the opt ‘data_api’ be set to ‘glance.db.registry.api’. This requires us to differentiate what this method returns as the db api. i.e., we do not want to return ‘glance.db.registry.api’ for a call from v1 api. Reference bug #1516706

glance.db.unwrap(db_api)[source]