cinder.objects.cgsnapshot module¶
- class CGSnapshot(context: Any = None, **kwargs: Any)¶
Bases:
CinderPersistentObject,CinderObject,CinderObjectDictCompat,ClusteredObject- OPTIONAL_FIELDS = ('consistencygroup', 'snapshots')¶
- VERSION: str = '1.1'¶
Object version field
Each service has its set of objects, each with a version attached. When a client attempts to call an object method, the server checks to see if the version of that object matches (in a compatible way) its object implementation. If so, cool, and if not, fail.
This version is allowed to have three parts,
X.Y.Z, where the.Zelement is reserved for stable branch backports. The.Zis ignored for the purposes of triggering a backport, which means anything changed under a.Zmust be additive and non-destructive such that a node that knows aboutX.Ycan considerX.Y.Zequivalent.
- property cluster_name¶
- property consistencygroup: Any¶
- property consistencygroup_id: Any¶
- create()¶
- property created_at: Any¶
- property deleted: Any¶
- property deleted_at: Any¶
- property description: Any¶
- destroy()¶
- fields: MutableMapping[str, Field[Any]] = {'consistencygroup': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'consistencygroup_id': UUID(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), '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), 'snapshots': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'status': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'user_id': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False)}¶
The fields present in this object as
key:fieldpairs.For example:
fields = { 'foo': obj_fields.IntegerField(), 'bar': obj_fields.StringField(), }
- from_group_snapshot(group_snapshot)¶
Convert a generic volume group object to a cg object.
- property host¶
- property id: Any¶
- model¶
alias of
CGSnapshot
- property name: Any¶
- 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: Any¶
- 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 snapshots: Any¶
- property status: Any¶
- property updated_at: Any¶
- property user_id: Any¶
- class CGSnapshotList(*args: Any, **kwargs: Any)¶
Bases:
ObjectListBase,CinderObject- VERSION: str = '1.0'¶
Object version field
Each service has its set of objects, each with a version attached. When a client attempts to call an object method, the server checks to see if the version of that object matches (in a compatible way) its object implementation. If so, cool, and if not, fail.
This version is allowed to have three parts,
X.Y.Z, where the.Zelement is reserved for stable branch backports. The.Zis ignored for the purposes of triggering a backport, which means anything changed under a.Zmust be additive and non-destructive such that a node that knows aboutX.Ycan considerX.Y.Zequivalent.
- fields: MutableMapping[str, Field[Any]] = {'objects': List(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False)}¶
The fields present in this object as
key:fieldpairs.For example:
fields = { 'foo': obj_fields.IntegerField(), 'bar': obj_fields.StringField(), }
- classmethod get_all(context, filters=None)¶
- classmethod get_all_by_group(context, group_id, filters=None)¶
- classmethod get_all_by_project(context, project_id, filters=None)¶
- property objects: Any¶