cinder.objects.volume_attachment module

class VolumeAttachment(context=None, **kwargs)

Bases: cinder.objects.base.CinderPersistentObject, cinder.objects.base.CinderObject, cinder.objects.base.CinderObjectDictCompat, cinder.objects.base.CinderComparableObject

OPTIONAL_FIELDS = ['volume']
VERSION = '1.3'
property attach_mode
property attach_status
property attach_time
property attached_host
property connection_info
property connector
create()
property created_at
property deleted
property deleted_at
destroy()
property detach_time
fields = {'attach_mode': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'attach_status': VolumeAttachStatus(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True,valid_values=('attached', 'attaching', 'detached', 'error_attaching', 'error_detaching', 'reserved', 'deleted')), 'attach_time': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'attached_host': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'connection_info': Dict(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'connector': Dict(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), 'detach_time': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'id': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'instance_uuid': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'mountpoint': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'volume': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'volume_id': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False)}
finish_attach(instance_uuid, host_name, mount_point, attach_mode='rw')
property id
property instance_uuid
model

alias of cinder.db.sqlalchemy.models.VolumeAttachment

property mountpoint
obj_extra_fields = ['project_id', 'volume_host']
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 target version.

property project_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
property volume
property volume_host
property volume_id
class VolumeAttachmentList(*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, search_opts=None, marker=None, limit=None, offset=None, sort_keys=None, sort_direction=None)
classmethod get_all_by_host(context, host, search_opts=None)
classmethod get_all_by_instance_uuid(context, instance_uuid, search_opts=None)
classmethod get_all_by_project(context, project_id, search_opts=None, marker=None, limit=None, offset=None, sort_keys=None, sort_direction=None)
classmethod get_all_by_volume_id(context, volume_id)
property objects