Browse Source

Fix a bug of "openstack volume delete"

While multi volumes specified for the osc "openstack volume delete",
only the last volume is deleted.
This patch tries to fix it.

Change-Id: I171b2869f85b29c88fda16eaf5bf163c55795df0
Closes-Bug: #1520541
tags/2.0.0
xiexs 4 years ago
parent
commit
c27f9e3c6c
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      openstackclient/volume/v2/volume.py

+ 4
- 4
openstackclient/volume/v2/volume.py View File

@@ -185,10 +185,10 @@ class DeleteVolume(command.Command):
for volume in parsed_args.volumes:
volume_obj = utils.find_resource(
volume_client.volumes, volume)
if parsed_args.force:
volume_client.volumes.force_delete(volume_obj.id)
else:
volume_client.volumes.delete(volume_obj.id)
if parsed_args.force:
volume_client.volumes.force_delete(volume_obj.id)
else:
volume_client.volumes.delete(volume_obj.id)
return



Loading…
Cancel
Save