javelin: Detach the volume before destruction

In Icehouse, a volume needs to be detached before it can be deleted.

Closes-Bug:  #1375476

Change-Id: Ic1c8e79fc1efa46ac9a70e288166cd5e0d823cfa
This commit is contained in:
Emilien Macchi 2014-09-15 14:30:35 -04:00
parent e1f0055ecd
commit 5ebc27bf34
1 changed files with 2 additions and 1 deletions

View File

@ -525,7 +525,8 @@ def destroy_volumes(volumes):
for volume in volumes:
client = client_for_user(volume['owner'])
volume_id = _get_volume_by_name(client, volume['name'])['id']
r, body = client.volumes.delete_volume(volume_id)
client.volumes.detach_volume(volume_id)
client.volumes.delete_volume(volume_id)
def attach_volumes(volumes):