The cinder.db.sqlalchemy.models
Module¶
SQLAlchemy models for cinder data.
-
class
AttachmentSpecs
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents attachment specs as k/v pairs for a volume_attachment.
-
attachment_id
¶
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
id
¶
-
key
¶
-
updated_at
¶
-
value
¶
-
volume_attachment
¶
-
-
class
Backup
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents a backup of a volume to Swift.
-
availability_zone
¶
-
container
¶
-
created_at
¶
-
data_timestamp
¶
-
deleted
¶
-
deleted_at
¶
-
display_description
¶
-
display_name
¶
-
fail_reason
¶
-
host
¶
-
id
¶
-
name
¶
-
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
¶
-
validate_fail_reason
(key, fail_reason)¶
-
volume_id
¶
-
-
class
Cgsnapshot
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents a cgsnapshot.
-
consistencygroup
¶
-
consistencygroup_id
¶
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
description
¶
-
id
¶
-
name
¶
-
project_id
¶
-
status
¶
-
updated_at
¶
-
user_id
¶
-
-
class
CinderBase
¶ Bases:
oslo_db.sqlalchemy.models.TimestampMixin
,oslo_db.sqlalchemy.models.ModelBase
Base class for Cinder Models.
-
delete
(session)¶ Delete this object.
-
static
delete_values
()¶
-
deleted
= Column(None, Boolean(), table=None, default=ColumnDefault(False))¶
-
deleted_at
= Column(None, DateTime(), table=None)¶
-
metadata
= None¶
-
-
class
Cluster
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents a cluster of hosts.
-
active_backend_id
¶
-
binary
¶
-
created_at
¶
-
static
delete_values
()¶
-
deleted
¶
-
deleted_at
¶
-
disabled
¶
-
disabled_reason
¶
-
frozen
¶
-
id
¶
-
last_heartbeat
¶
-
name
¶
-
num_down_hosts
¶
-
num_hosts
¶
-
race_preventer
¶
-
replication_status
¶
-
updated_at
¶
-
-
class
ConsistencyGroup
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents a consistencygroup.
-
availability_zone
¶
-
cgsnapshot_id
¶
-
cluster_name
¶
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
description
¶
-
host
¶
-
id
¶
-
name
¶
-
project_id
¶
-
source_cgid
¶
-
status
¶
-
updated_at
¶
-
user_id
¶
-
volume_type_id
¶
-
-
class
DriverInitiatorData
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,oslo_db.sqlalchemy.models.TimestampMixin
,oslo_db.sqlalchemy.models.ModelBase
Represents private key-value pair specific an initiator for drivers
-
created_at
¶
-
id
¶
-
initiator
¶
-
key
¶
-
namespace
¶
-
updated_at
¶
-
value
¶
-
-
class
Encryption
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents encryption requirement for a volume type.
Encryption here is a set of performance characteristics describing cipher, provider, and key_size for a certain volume type.
-
cipher
¶
-
control_location
¶
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
encryption_id
¶
-
key_size
¶
-
provider
¶
-
updated_at
¶
-
volume_type
¶
-
volume_type_id
¶
-
-
class
Group
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents a generic volume group.
-
availability_zone
¶
-
cluster_name
¶
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
description
¶
-
group_snapshot_id
¶
-
group_type_id
¶
-
host
¶
-
id
¶
-
name
¶
-
project_id
¶
-
replication_status
¶
-
source_group_id
¶
-
status
¶
-
updated_at
¶
-
user_id
¶
-
-
class
GroupSnapshot
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents a group snapshot.
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
description
¶
-
group
¶
-
group_id
¶
-
group_type_id
¶
-
id
¶
-
name
¶
-
project_id
¶
-
status
¶
-
updated_at
¶
-
user_id
¶
-
-
class
GroupTypeProjects
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represent projects associated group_types.
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
group_type
¶
-
group_type_id
¶
-
id
¶
-
project_id
¶
-
updated_at
¶
-
-
class
GroupTypeSpecs
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents additional specs as key/value pairs for a group_type.
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
group_type
¶
-
group_type_id
¶
-
id
¶
-
key
¶
-
updated_at
¶
-
value
¶
-
-
class
GroupTypes
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represent possible group_types of groups offered.
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
description
¶
-
groups
¶
-
id
¶
-
is_public
¶
-
name
¶
-
updated_at
¶
-
-
class
GroupVolumeTypeMapping
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represent mapping between groups and volume_types.
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
group
¶
-
group_id
¶
-
id
¶
-
updated_at
¶
-
volume_type_id
¶
-
-
class
ImageVolumeCacheEntry
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,oslo_db.sqlalchemy.models.ModelBase
Represents an image volume cache entry
-
cluster_name
¶
-
host
¶
-
id
¶
-
image_id
¶
-
image_updated_at
¶
-
last_used
¶
-
size
¶
-
volume_id
¶
-
-
class
Message
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents a message
-
action_id
¶
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
detail_id
¶
-
event_id
¶
-
expires_at
¶
-
id
¶
-
message_level
¶
-
project_id
¶
-
request_id
¶
-
resource_type
¶
-
resource_uuid
¶
-
updated_at
¶
-
-
class
QualityOfServiceSpecs
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents QoS specs as key/value pairs.
QoS specs is standalone entity that can be associated/disassociated with volume types (one to many relation). Adjacency list relationship pattern is used in this model in order to represent following hierarchical data with in flat table, e.g, following structure:
qos-specs-1 'Rate-Limit' | +------> consumer = 'front-end' +------> total_bytes_sec = 1048576 +------> total_iops_sec = 500 qos-specs-2 'QoS_Level1' | +------> consumer = 'back-end' +------> max-iops = 1000 +------> min-iops = 200 is represented by: id specs_id key value ------ -------- ------------- ----- UUID-1 NULL QoSSpec_Name Rate-Limit UUID-2 UUID-1 consumer front-end UUID-3 UUID-1 total_bytes_sec 1048576 UUID-4 UUID-1 total_iops_sec 500 UUID-5 NULL QoSSpec_Name QoS_Level1 UUID-6 UUID-5 consumer back-end UUID-7 UUID-5 max-iops 1000 UUID-8 UUID-5 min-iops 200
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
id
¶
-
key
¶
-
specs
¶
-
specs_id
¶
-
updated_at
¶
-
value
¶
-
vol_types
¶
-
-
class
Quota
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents a single quota override for a project.
If there is no row for a given project id and resource, then the default for the quota class is used. If there is no row for a given quota class and resource, then the default for the deployment is used. If the row is present but the hard limit is Null, then the resource is unlimited.
-
allocated
¶
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
hard_limit
¶
-
id
¶
-
project_id
¶
-
resource
¶
-
updated_at
¶
-
-
class
QuotaClass
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents a single quota override for a quota class.
If there is no row for a given quota class and resource, then the default for the deployment is used. If the row is present but the hard limit is Null, then the resource is unlimited.
-
class_name
¶
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
hard_limit
¶
-
id
¶
-
resource
¶
-
updated_at
¶
-
-
class
QuotaUsage
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents the current usage for a given resource.
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
id
¶
-
in_use
¶
-
project_id
¶
-
reserved
¶
-
resource
¶
-
total
¶
-
until_refresh
¶
-
updated_at
¶
-
-
class
Reservation
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents a resource reservation for quotas.
-
allocated_id
¶
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
delta
¶
-
expire
¶
-
id
¶
-
project_id
¶
-
quota
¶
-
resource
¶
-
updated_at
¶
-
usage
¶
-
usage_id
¶
-
uuid
¶
-
-
class
Service
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents a running service on a host.
-
active_backend_id
¶
-
availability_zone
¶
-
binary
¶
-
cluster
¶
-
cluster_name
¶
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
disabled
¶
-
disabled_reason
¶
-
frozen
¶
-
host
¶
-
id
¶
-
modified_at
¶
-
object_current_version
¶
-
replication_status
¶
-
report_count
¶
-
rpc_current_version
¶
-
topic
¶
-
updated_at
¶
-
-
class
Snapshot
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents a snapshot of volume.
-
cgsnapshot
¶
-
cgsnapshot_id
¶
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
display_description
¶
-
display_name
¶
-
encryption_key_id
¶
-
group_snapshot
¶
-
group_snapshot_id
¶
-
id
¶
-
name
¶
-
progress
¶
-
project_id
¶
-
provider_auth
¶
-
provider_id
¶
-
provider_location
¶
-
status
¶
-
updated_at
¶
-
user_id
¶
-
volume
¶
-
volume_id
¶
-
volume_name
¶
-
volume_size
¶
-
volume_type_id
¶
-
-
class
SnapshotMetadata
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents a metadata key/value pair for a snapshot.
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
id
¶
-
key
¶
-
snapshot
¶
-
snapshot_id
¶
-
updated_at
¶
-
value
¶
-
-
class
Transfer
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents a volume transfer request.
-
created_at
¶
-
crypt_hash
¶
-
deleted
¶
-
deleted_at
¶
-
display_name
¶
-
expires_at
¶
-
id
¶
-
salt
¶
-
updated_at
¶
-
volume
¶
-
volume_id
¶
-
-
class
Volume
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents a block storage device that can be attached to a vm.
-
attach_status
¶
-
availability_zone
¶
-
bootable
¶
-
cluster_name
¶
-
consistencygroup
¶
-
consistencygroup_id
¶
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
display_description
¶
-
display_name
¶
-
ec2_id
¶
-
encryption_key_id
¶
-
group
¶
-
group_id
¶
-
host
¶
-
id
¶
-
launched_at
¶
-
migration_status
¶
-
multiattach
¶
-
name
¶
-
name_id
¶
-
previous_status
¶
-
project_id
¶
-
provider_auth
¶
-
provider_geometry
¶
-
provider_id
¶
-
provider_location
¶
-
replication_driver_data
¶
-
replication_extended_status
¶
-
replication_status
¶
-
scheduled_at
¶
-
size
¶
-
snapshot_id
¶
-
source_volid
¶
-
status
¶
-
terminated_at
¶
-
updated_at
¶
-
user_id
¶
-
volume_type_id
¶
-
-
class
VolumeAdminMetadata
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents an administrator metadata key/value pair for a volume.
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
id
¶
-
key
¶
-
updated_at
¶
-
value
¶
-
volume
¶
-
volume_id
¶
-
-
class
VolumeAttachment
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents a volume attachment for a vm.
-
attach_mode
¶
-
attach_status
¶
-
attach_time
¶
-
attached_host
¶
-
connection_info
¶
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
detach_time
¶
-
id
¶
-
instance_uuid
¶
-
mountpoint
¶
-
updated_at
¶
-
volume
¶
-
volume_id
¶
-
-
class
VolumeGlanceMetadata
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Glance metadata for a bootable volume.
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
id
¶
-
key
¶
-
snapshot_id
¶
-
updated_at
¶
-
value
¶
-
volume
¶
-
volume_id
¶
-
-
class
VolumeMetadata
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents a metadata key/value pair for a volume.
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
id
¶
-
key
¶
-
updated_at
¶
-
value
¶
-
volume
¶
-
volume_id
¶
-
-
class
VolumeTypeExtraSpecs
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents additional specs as key/value pairs for a volume_type.
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
id
¶
-
key
¶
-
updated_at
¶
-
value
¶
-
volume_type
¶
-
volume_type_id
¶
-
-
class
VolumeTypeProjects
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represent projects associated volume_types.
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
id
¶
-
project_id
¶
-
updated_at
¶
-
volume_type
¶
-
volume_type_id
¶
-
-
class
VolumeTypes
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represent possible volume_types of volumes offered.
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
description
¶
-
id
¶
-
is_public
¶
-
name
¶
-
qos_specs_id
¶
-
updated_at
¶
-
volumes
¶
-
-
class
Worker
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,cinder.db.sqlalchemy.models.CinderBase
Represents all resources that are being worked on by a node.
-
cleaning
= False¶
-
created_at
¶
-
deleted
¶
-
deleted_at
¶
-
id
¶
-
race_preventer
¶
-
resource_id
¶
-
resource_type
¶
-
service
¶
-
service_id
¶
-
status
¶
-
updated_at
¶
-