Implementation of SQLAlchemy backend.
-
authorize_project_context(context, project_id)
Ensures a request has permission to access the given project.
-
authorize_quota_class_context(context, class_name)
Ensures a request has permission to access the given quota class.
-
authorize_user_context(context, user_id)
Ensures a request has permission to access the given user.
-
backup_create(*args, **kwargs)
-
backup_destroy(*args, **kwargs)
-
backup_get(*args, **kwargs)
-
backup_get_all(*args, **kwargs)
-
backup_get_all_by_host(*args, **kwargs)
-
backup_get_all_by_project(*args, **kwargs)
-
backup_update(*args, **kwargs)
-
cgsnapshot_create(*args, **kwargs)
-
cgsnapshot_destroy(*args, **kwargs)
-
cgsnapshot_get(*args, **kwargs)
-
cgsnapshot_get_all(*args, **kwargs)
-
cgsnapshot_get_all_by_group(*args, **kwargs)
-
cgsnapshot_get_all_by_host(*args, **kwargs)
-
cgsnapshot_get_all_by_project(*args, **kwargs)
-
cgsnapshot_update(*args, **kwargs)
-
consistencygroup_create(*args, **kwargs)
-
consistencygroup_data_get_for_project(*args, **kwargs)
-
consistencygroup_destroy(*args, **kwargs)
-
consistencygroup_get(*args, **kwargs)
-
consistencygroup_get_all(*args, **kwargs)
-
consistencygroup_get_all_by_host(*args, **kwargs)
-
consistencygroup_get_all_by_project(*args, **kwargs)
-
consistencygroup_update(*args, **kwargs)
-
finish_volume_migration(*args, **kwargs)
-
get_backend()
The backend is this module itself.
-
get_engine()
-
get_session(**kwargs)
-
is_admin_context(context)
Indicates if the request context is an administrator.
-
is_user_context(context)
Indicates if the request context is a normal user.
-
iscsi_target_count_by_host(*args, **kwargs)
-
iscsi_target_create_safe(*args, **kwargs)
-
model_query(context, *args, **kwargs)
Query helper that accounts for context’s read_deleted field.
Parameters: |
- context – context to query under
- session – if present, the session to use
- read_deleted – if present, overrides context’s read_deleted field.
- project_only – if present and context is user-type, then restrict
query to match the context’s project_id.
|
-
or_(*clauses)
Produce a conjunction of expressions joined by OR.
E.g.:
from sqlalchemy import or_
stmt = select([users_table]).where(
or_(
users_table.c.name == 'wendy',
users_table.c.name == 'jack'
)
)
The or_() conjunction is also available using the
Python | operator (though note that compound expressions
need to be parenthesized in order to function with Python
operator precedence behavior):
stmt = select([users_table]).where(
(users_table.c.name == 'wendy') |
(users_table.c.name == 'jack')
)
-
qos_specs_associate(*args, **kwargs)
-
qos_specs_associations_get(*args, **kwargs)
-
qos_specs_create(*args, **kwargs)
-
qos_specs_delete(*args, **kwargs)
-
qos_specs_disassociate(*args, **kwargs)
-
qos_specs_disassociate_all(*args, **kwargs)
-
qos_specs_get(*args, **kwargs)
-
qos_specs_get_all(*args, **kwargs)
-
qos_specs_get_by_name(*args, **kwargs)
-
qos_specs_item_delete(*args, **kwargs)
-
qos_specs_update(*args, **kwargs)
-
quota_class_create(*args, **kwargs)
-
quota_class_destroy(*args, **kwargs)
-
quota_class_destroy_all_by_name(*args, **kwargs)
-
quota_class_get(*args, **kwargs)
-
quota_class_get_all_by_name(*args, **kwargs)
-
quota_class_get_default(context)
-
quota_class_update(*args, **kwargs)
-
quota_create(*args, **kwargs)
-
quota_destroy(*args, **kwargs)
-
quota_destroy_all_by_project(*args, **kwargs)
-
quota_get(*args, **kwargs)
-
quota_get_all_by_project(*args, **kwargs)
-
quota_reserve(*args, **kwargs)
-
quota_update(*args, **kwargs)
-
quota_usage_get(*args, **kwargs)
-
quota_usage_get_all_by_project(*args, **kwargs)
-
require_admin_context(f)
Decorator to require admin request context.
The first argument to the wrapped function must be the context.
-
require_context(f)
Decorator to require any user or admin context.
This does no authorization for user or project access matching, see
authorize_project_context() and
authorize_user_context().
The first argument to the wrapped function must be the context.
-
require_snapshot_exists(f)
Decorator to require the specified snapshot to exist.
Requires the wrapped function to use context and snapshot_id as
their first two arguments.
-
require_volume_exists(f)
Decorator to require the specified volume to exist.
Requires the wrapped function to use context and volume_id as
their first two arguments.
-
reservation_commit(*args, **kwargs)
-
reservation_expire(*args, **kwargs)
-
reservation_rollback(*args, **kwargs)
-
service_create(*args, **kwargs)
-
service_destroy(*args, **kwargs)
-
service_get(*args, **kwargs)
-
service_get_all(*args, **kwargs)
-
service_get_all_by_host(*args, **kwargs)
-
service_get_all_by_topic(*args, **kwargs)
-
service_get_all_volume_sorted(*args, **kwargs)
-
service_get_by_args(*args, **kwargs)
-
service_get_by_host_and_topic(*args, **kwargs)
-
service_update(*args, **kwargs)
-
snapshot_create(*args, **kwargs)
-
snapshot_data_get_for_project(*args, **kwargs)
-
snapshot_destroy(*args, **kwargs)
-
snapshot_get(*args, **kwargs)
-
snapshot_get_active_by_window(*args, **kwargs)
-
snapshot_get_all(*args, **kwargs)
-
snapshot_get_all_by_project(*args, **kwargs)
-
snapshot_get_all_for_cgsnapshot(*args, **kwargs)
-
snapshot_get_all_for_volume(*args, **kwargs)
-
snapshot_metadata_delete(*args, **kwargs)
-
snapshot_metadata_get(*args, **kwargs)
-
snapshot_metadata_update(*args, **kwargs)
-
snapshot_update(*args, **kwargs)
-
transfer_accept(*args, **kwargs)
-
transfer_create(*args, **kwargs)
-
transfer_destroy(*args, **kwargs)
-
transfer_get(*args, **kwargs)
-
transfer_get_all(*args, **kwargs)
-
transfer_get_all_by_project(*args, **kwargs)
-
volume_admin_metadata_delete(*args, **kwargs)
-
volume_admin_metadata_get(*args, **kwargs)
-
volume_admin_metadata_update(*args, **kwargs)
-
volume_allocate_iscsi_target(*args, **kwargs)
-
volume_attached(*args, **kwargs)
-
volume_create(*args, **kwargs)
-
volume_data_get_for_host(*args, **kwargs)
-
volume_data_get_for_project(*args, **kwargs)
-
volume_destroy(*args, **kwargs)
-
volume_detached(*args, **kwargs)
-
volume_encryption_metadata_get(*args, **kwargs)
-
volume_get(*args, **kwargs)
-
volume_get_active_by_window(*args, **kwargs)
-
volume_get_all(*args, **kwargs)
-
volume_get_all_by_group(*args, **kwargs)
-
volume_get_all_by_host(*args, **kwargs)
-
volume_get_all_by_project(*args, **kwargs)
-
volume_get_iscsi_target_num(*args, **kwargs)
-
volume_glance_metadata_copy_from_volume_to_volume(*args, **kwargs)
-
volume_glance_metadata_copy_to_snapshot(*args, **kwargs)
-
volume_glance_metadata_copy_to_volume(*args, **kwargs)
-
volume_glance_metadata_create(*args, **kwargs)
-
volume_glance_metadata_delete_by_snapshot(*args, **kwargs)
-
volume_glance_metadata_delete_by_volume(*args, **kwargs)
-
volume_glance_metadata_get(*args, **kwargs)
-
volume_glance_metadata_get_all(*args, **kwargs)
-
volume_metadata_delete(*args, **kwargs)
-
volume_metadata_get(*args, **kwargs)
-
volume_metadata_get_item(*args, **kwargs)
-
volume_metadata_update(*args, **kwargs)
-
volume_snapshot_glance_metadata_get(*args, **kwargs)
-
volume_type_create(*args, **kwargs)
-
volume_type_destroy(*args, **kwargs)
-
volume_type_encryption_create(*args, **kwargs)
-
volume_type_encryption_delete(*args, **kwargs)
-
volume_type_encryption_get(*args, **kwargs)
-
volume_type_encryption_update(*args, **kwargs)
-
volume_type_encryption_volume_get(context, volume_type_id, session=None)
-
volume_type_get(*args, **kwargs)
-
volume_type_get_all(*args, **kwargs)
-
volume_type_get_by_name(*args, **kwargs)
-
volume_type_qos_associate(*args, **kwargs)
-
volume_type_qos_associations_get(*args, **kwargs)
-
volume_type_qos_disassociate(*args, **kwargs)
-
volume_type_qos_disassociate_all(*args, **kwargs)
-
volume_type_qos_specs_get(*args, **kwargs)
-
volume_types_get_by_name_or_id(*args, **kwargs)
-
volume_update(*args, **kwargs)