cinder.objects.volume_type module¶
- class VolumeType(context: Any = None, **kwargs: Any)¶
Bases:
CinderPersistentObject,CinderObject,CinderObjectDictCompat,CinderComparableObject- OPTIONAL_FIELDS = ('extra_specs', 'projects', 'qos_specs')¶
- VERSION: str = '1.3'¶
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.
- create()¶
- property created_at: Any¶
- property deleted: Any¶
- property deleted_at: Any¶
- property description: Any¶
- destroy()¶
- property extra_specs: Any¶
- fields: MutableMapping[str, Field[Any]] = {'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), 'extra_specs': Dict(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'id': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'is_public': Boolean(default=True,nullable=True), 'name': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'projects': List(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'qos_specs': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'qos_specs_id': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}¶
The fields present in this object as
key:fieldpairs.For example:
fields = { 'foo': obj_fields.IntegerField(), 'bar': obj_fields.StringField(), }
- classmethod get_by_name_or_id(context, identity)¶
- property id: Any¶
- is_multiattach()¶
- property is_public: Any¶
- is_replicated()¶
- model¶
alias of
VolumeType
- 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 projects: Any¶
- property qos_specs: Any¶
- property qos_specs_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 updated_at: Any¶
- class VolumeTypeList(*args: Any, **kwargs: Any)¶
Bases:
ObjectListBase,CinderObject- 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.
- 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, inactive=0, filters=None, marker=None, limit=None, sort_keys=None, sort_dirs=None, offset=None)¶
- classmethod get_all_by_group(context, group_id)¶
- classmethod get_all_types_for_qos(context, qos_id)¶
- property objects: Any¶