cinder.objects.volume_type module¶
-
class
VolumeType(context=None, **kwargs)¶ Bases:
cinder.objects.base.CinderPersistentObject,cinder.objects.base.CinderObject,cinder.objects.base.CinderObjectDictCompat,cinder.objects.base.CinderComparableObject-
OPTIONAL_FIELDS= ('extra_specs', 'projects', 'qos_specs')¶
-
VERSION= '1.3'¶
-
create()¶
-
property
created_at¶
-
property
deleted¶
-
property
deleted_at¶
-
property
description¶
-
destroy()¶
-
property
extra_specs¶
-
fields= {'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)}¶
-
classmethod
get_by_name_or_id(context, identity)¶
-
property
id¶
-
is_multiattach()¶
-
property
is_public¶
-
is_replicated()¶
-
model¶ alias of
cinder.db.sqlalchemy.models.VolumeType
-
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.
-
obj_make_compatible(primitive, target_version)¶ Make an object representation compatible with a target version.
This is responsible for taking the primitive representation of an object and making it suitable for the given target_version. This may mean converting the format of object attributes, removing attributes that have been added since the target version, etc. In general:
If a new version of an object adds a field, this routine should remove it for older versions.
If a new version changed or restricted the format of a field, this should convert it back to something a client knowing only of the older version will tolerate.
If an object that this object depends on is bumped, then this object should also take a version bump. Then, this routine should backlevel the dependent object (by calling its obj_make_compatible()) if the requested version of this object is older than the version where the new dependent object was added.
- Parameters
primitive – The result of
obj_to_primitive()target_version – The version string requested by the recipient of the object
- Raises
oslo_versionedobjects.exception.UnsupportedObjectErrorif conversion is not possible for some reason
-
property
projects¶
-
property
qos_specs¶
-
property
qos_specs_id¶
-
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¶
-
-
class
VolumeTypeList(*args, **kwargs)¶ Bases:
cinder.objects.base.ObjectListBase,cinder.objects.base.CinderObject-
VERSION= '1.1'¶
-
fields= {'objects': List(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False)}¶
-
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¶
-