Manage/unmanage existing volume driver interface.
Bases: cinder.interface.base.CinderInterface
Interface for drivers that support managing existing volumes.
Brings an existing backend storage object under Cinder management.
existing_ref is passed straight through from the API request’s manage_existing_ref value, and it is up to the driver how this should be interpreted. It should be sufficient to identify a storage object that the driver should somehow associate with the newly-created cinder volume structure.
There are two ways to do this:
If the existing_ref doesn’t make sense, or doesn’t refer to an existing backend storage object, raise a ManageExistingInvalidReference exception.
The volume may have a volume_type, and the driver can inspect that and compare against the properties of the referenced backend storage object. If they are incompatible, raise a ManageExistingVolumeTypeMismatch, specifying a reason for the failure.
Parameters: |
|
---|---|
Raises: | ManageExistingInvalidReference If the existing_ref doesn’t make sense, or doesn’t refer to an existing backend storage object. |
Raises: | ManageExistingVolumeTypeMismatch If there is a mismatch between the volume type and the properties of the existing backend storage object. |
Return size of volume to be managed by manage_existing.
When calculating the size, round up to the next GB.
Parameters: |
|
---|---|
Raises: | ManageExistingInvalidReference If the existing_ref doesn’t make sense, or doesn’t refer to an existing backend storage object. |
Removes the specified volume from Cinder management.
Does not delete the underlying backend storage object.
For most drivers, this will not need to do anything. However, some drivers might use this call as an opportunity to clean up any Cinder-specific configuration that they have associated with the backend storage object.
Parameters: | volume – Cinder volume to unmanage |
---|