The cinder.objects.backup Module

class Backup(context=None, **kwargs)

Bases: cinder.objects.base.CinderPersistentObject, cinder.objects.base.CinderObject, cinder.objects.base.CinderObjectDictCompat

VERSION = ‘1.4’
availability_zone
container
create()
created_at
data_timestamp
static decode_record(backup_url)

Deserialize backup metadata from string into a dictionary.

Raises:InvalidInput
deleted
deleted_at
destroy()
display_description
display_name
encode_record(**kwargs)

Serialize backup object, with optional extra info, into a string.

fail_reason
fields = {‘status’: BackupStatus(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True,valid_values=(‘error’, ‘error_deleting’, ‘creating’, ‘available’, ‘deleting’, ‘deleted’, ‘restoring’)), ‘display_name’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘availability_zone’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘deleted’: Boolean(default=False,nullable=True), ‘volume_id’: UUID(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=False), ‘restore_volume_id’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘fail_reason’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘updated_at’: DateTime(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘host’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘snapshot_id’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘user_id’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=False), ‘deleted_at’: DateTime(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘service_metadata’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘id’: UUID(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=False), ‘size’: Integer(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘object_count’: Integer(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘project_id’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=False), ‘container’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘service’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘created_at’: DateTime(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘display_description’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘data_timestamp’: DateTime(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘parent_id’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘num_dependent_backups’: Integer(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘temp_snapshot_id’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘temp_volume_id’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True)}
has_dependent_backups
host
id
is_incremental
model

alias of Backup

name
num_dependent_backups
obj_extra_fields = [‘name’, ‘is_incremental’, ‘has_dependent_backups’]
obj_make_compatible(primitive, target_version)

Make an object representation compatible with a target version.

object_count
parent_id
project_id
restore_volume_id
save()
service
service_metadata
size
snapshot_id
status
temp_snapshot_id
temp_volume_id
updated_at
user_id
volume_id
class BackupDeviceInfo(context=None, **kwargs)

Bases: cinder.objects.base.CinderObject, cinder.objects.base.CinderObjectDictCompat, cinder.objects.base.CinderComparableObject

VERSION = ‘1.0’
device_obj
fields = {‘volume’: Object(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘secure_enabled’: Boolean(default=False,nullable=False), ‘snapshot’: Object(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True)}
classmethod from_primitive(primitive, context, expected_attrs=None)
is_snapshot
obj_extra_fields = [‘is_snapshot’, ‘device_obj’]
secure_enabled
snapshot
to_primitive(context)
volume
class BackupImport(context=None, **kwargs)

Bases: cinder.objects.backup.Backup

Special object for Backup Imports.

This class should not be used for anything but Backup creation when importing backups to the DB.

On creation it allows to specify the ID for the backup, since it’s the reference used in parent_id it is imperative that this is preserved.

Backup Import objects get promoted to standard Backups when the import is completed.

availability_zone
container
create()
created_at
data_timestamp
deleted
deleted_at
display_description
display_name
fail_reason
fields = {‘status’: BackupStatus(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True,valid_values=(‘error’, ‘error_deleting’, ‘creating’, ‘available’, ‘deleting’, ‘deleted’, ‘restoring’)), ‘temp_snapshot_id’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘availability_zone’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘deleted’: Boolean(default=False,nullable=True), ‘snapshot_id’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘restore_volume_id’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘updated_at’: DateTime(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘host’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘container’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘volume_id’: UUID(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=False), ‘fail_reason’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘deleted_at’: DateTime(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘id’: UUID(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=False), ‘size’: Integer(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘object_count’: Integer(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘service_metadata’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘display_name’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘service’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘user_id’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=False), ‘created_at’: DateTime(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘display_description’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘data_timestamp’: DateTime(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘parent_id’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘num_dependent_backups’: Integer(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True), ‘project_id’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=False), ‘temp_volume_id’: String(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=True)}
host
id
model

alias of Backup

num_dependent_backups
object_count
parent_id
project_id
restore_volume_id
service
service_metadata
size
snapshot_id
status
temp_snapshot_id
temp_volume_id
updated_at
user_id
volume_id
class BackupList(*args, **kwargs)

Bases: cinder.objects.base.ObjectListBase, cinder.objects.base.CinderObject

VERSION = ‘1.0’
fields = {‘objects’: List(default=<class ‘oslo_versionedobjects.fields.UnspecifiedDefault’>,nullable=False)}
classmethod get_all(context, filters=None, marker=None, limit=None, offset=None, sort_keys=None, sort_dirs=None)
classmethod get_all_active_by_window(context, begin, end)
classmethod get_all_by_host(context, host)
classmethod get_all_by_project(context, project_id, filters=None, marker=None, limit=None, offset=None, sort_keys=None, sort_dirs=None)
classmethod get_all_by_volume(context, volume_id, filters=None)
objects