summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Jose Kalapura <tomjosekal@gmail.com>2015-07-16 14:10:36 -0700
committerTom Jose Kalapura <tomjosekal@gmail.com>2015-07-16 19:45:08 -0700
commitdc1186dc4424eed7188b49195261b77ec37306c5 (patch)
tree703c7abc39e53079c0b968fc6af8988ffaad0639
parent953f76650e084f5678efb5529d00b3b4b79eb2ff (diff)
downloadpython-cinderclient-dc1186dc4424eed7188b49195261b77ec37306c5.tar.gz
Add response message when volume delete
When a request is send for deleting a volume it will not print any success message if it deleted successfully.It will print only error message if the volume deletion fails. This fix will print response message if the volume deletion is success. Change-Id: Icef2045107e1dcc3b7f2abfeb50b3f180ded1a27 Closes-Bug: #1475430
-rw-r--r--cinderclient/v1/shell.py1
-rw-r--r--cinderclient/v2/shell.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/cinderclient/v1/shell.py b/cinderclient/v1/shell.py
index 63aa19e..53e157f 100644
--- a/cinderclient/v1/shell.py
+++ b/cinderclient/v1/shell.py
@@ -315,6 +315,7 @@ def do_delete(cs, args):
for volume in args.volume:
try:
utils.find_volume(cs, volume).delete()
+ print("Request to delete volume %s has been accepted." % (volume))
except Exception as e:
failure_count += 1
print("Delete for volume %s failed: %s" % (volume, e))
diff --git a/cinderclient/v2/shell.py b/cinderclient/v2/shell.py
index a85d77f..841a1d3 100644
--- a/cinderclient/v2/shell.py
+++ b/cinderclient/v2/shell.py
@@ -420,6 +420,7 @@ def do_delete(cs, args):
for volume in args.volume:
try:
utils.find_volume(cs, volume).delete()
+ print("Request to delete volume %s has been accepted." % (volume))
except Exception as e:
failure_count += 1
print("Delete for volume %s failed: %s" % (volume, e))