Actually do the detach with the new attach/detach flow
This adds in the missing step to pull the connector out of cinder from the attachment.id which we shove back into os-brick to detach the volume. Change-Id: If41dd2cc8324c372742d52d001bc98961936f1f0
This commit is contained in:
@@ -216,6 +216,19 @@ class Client(object):
|
||||
# We have more than 1 attachment and we don't know which to use
|
||||
raise exceptions.NeedAttachmentUUID(volume_id=volume_id)
|
||||
|
||||
attachment = self.volumes_client.attachments.show(attachment_uuid)
|
||||
|
||||
brick_connector = self._brick_get_connector(
|
||||
attachment.connection_info['driver_volume_type'],
|
||||
do_local_attach=True,
|
||||
use_multipath=multipath,
|
||||
)
|
||||
|
||||
with actions.DisconnectVolume(self.volumes_client, volume_id) as cmd:
|
||||
cmd.disconnect(brick_connector,
|
||||
attachment.connection_info,
|
||||
device_info)
|
||||
|
||||
self.volumes_client.attachments.delete(attachment_uuid)
|
||||
|
||||
def get_volume_paths(self, volume_id, use_multipath=False):
|
||||
|
||||
Reference in New Issue
Block a user