cinder.objects.group module

class Group(context=None, **kwargs)

Bases: CinderPersistentObject, CinderObject, CinderObjectDictCompat, ClusteredObject

OPTIONAL_FIELDS = ('volumes', 'volume_types', 'group_snapshots')
VERSION = '1.2'
property availability_zone
property cluster_name
create(group_snapshot_id=None, source_group_id=None)
property created_at
property deleted
property deleted_at
property description
destroy()
fields = {'availability_zone': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'cluster_name': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'deleted': Boolean(default=False,nullable=True), 'deleted_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'description': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'group_snapshot_id': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'group_snapshots': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'group_type_id': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'host': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'id': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'name': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'project_id': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'replication_status': ReplicationStatus(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True,valid_values=('error', 'enabled', 'disabled', 'not-capable', 'failover-error', 'failing-over', 'failed-over', 'enabling', 'disabling')), 'source_group_id': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'status': GroupStatus(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True,valid_values=('error', 'available', 'creating', 'deleting', 'deleted', 'updating', 'in-use', 'error_deleting')), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'user_id': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'volume_type_ids': List(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'volume_types': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'volumes': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}
property group_snapshot_id
property group_snapshots
property group_type_id
property host
property id
property is_replicated
model

alias of Group

property name
obj_load_attr(attrname)

Load an additional attribute from the real object.

This should load self.$attrname and cache any data that might be useful for future load operations.

property project_id
property replication_status
save()

Save the changed fields back to the store.

This is optional for subclasses, but is presented here in the base class for consistency among those that do.

property source_group_id
property status
property updated_at
property user_id
property volume_type_ids
property volume_types
property volumes
class GroupList(*args, **kwargs)

Bases: ObjectListBase, 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_by_project(context, project_id, filters=None, marker=None, limit=None, offset=None, sort_keys=None, sort_dirs=None)
classmethod get_all_replicated(context, filters=None, marker=None, limit=None, offset=None, sort_keys=None, sort_dirs=None)
static include_in_cluster(context, cluster, partial_rename=True, **filters)

Include all generic groups matching the filters into a cluster.

When partial_rename is set we will not set the cluster_name with cluster parameter value directly, we’ll replace provided cluster_name or host filter value with cluster instead.

This is useful when we want to replace just the cluster name but leave the backend and pool information as it is. If we are using cluster_name to filter, we’ll use that same DB field to replace the cluster value and leave the rest as it is. Likewise if we use the host to filter.

Returns the number of generic groups that have been changed.

property objects