cinder.objects.volume_attachment module

cinder.objects.volume_attachment module

class VolumeAttachment(context=None, **kwargs)

Bases: CinderPersistentObject, CinderObject, CinderObjectDictCompat, 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 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.

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: ObjectListBase, 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
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.