summaryrefslogtreecommitdiff
path: root/troveclient/utils.py
diff options
context:
space:
mode:
authorwangyao <wangyao@cmss.chinamobile.com>2017-11-07 19:27:52 +0800
committerwangyao <wangyao@cmss.chinamobile.com>2017-11-10 23:14:25 +0800
commitc4d21897f59bd5ee29123de55d83f2221f4c4e0f (patch)
tree6c2398430ca8e937000d44d26a2fd71d003cbad8 /troveclient/utils.py
parent7e209a4c32a2e7ef9bdea9c72fba60bacd986897 (diff)
downloadpython-troveclient-c4d21897f59bd5ee29123de55d83f2221f4c4e0f.tar.gz
Add proper message when delete instance or cluster
According bug description, not like nova-delete when use trove-delete there is no message or alert is generated. To solve this problem, I added some message when normally execute deleting instance or cluster. Change-Id: I572a24116fd1abec220f49a3f9705a5c071155bf Closes-Bug: #1569669
Diffstat (limited to 'troveclient/utils.py')
-rw-r--r--troveclient/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/troveclient/utils.py b/troveclient/utils.py
index 69e0b3d..bad5c51 100644
--- a/troveclient/utils.py
+++ b/troveclient/utils.py
@@ -324,3 +324,10 @@ def decode_data(data):
# py27 & py34 seem to understand bytearray the same
return bytearray([item for item in base64.b64decode(data)])
+
+
+def do_action_with_msg(action, success_msg):
+ """Helper to run an action with return message."""
+
+ action
+ print(success_msg)