diff options
author | poojajadhav <pooja.jadhav@nttdata.com> | 2017-03-16 19:30:16 +0530 |
---|---|---|
committer | pooja jadhav <pooja.jadhav@nttdata.com> | 2017-07-05 17:31:02 +0530 |
commit | b681cfc88b445130c9e3c327b145b429dae39782 (patch) | |
tree | f38dbc250af71534d79bd56a69a4020df9842d71 | |
parent | b910f5bea33cbccca25b008b3b03dc5dce27245a (diff) | |
download | python-cinderclient-b681cfc88b445130c9e3c327b145b429dae39782.tar.gz |
Fix output of update command
User have no information at all, regarding the update of APIs
(Consistency Group, Snapshot and Backup).
This patch fixes output issue and displays user friendly message
based on operation of update command.
Closes-Bug: #1664894
Change-Id: I58f0a3729990e9f90f01b7d84e65a13af799fd97
-rw-r--r-- | cinderclient/v2/shell.py | 5 | ||||
-rw-r--r-- | cinderclient/v3/shell.py | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/cinderclient/v2/shell.py b/cinderclient/v2/shell.py index 2c68d6d..c22116e 100644 --- a/cinderclient/v2/shell.py +++ b/cinderclient/v2/shell.py @@ -717,6 +717,8 @@ def do_snapshot_rename(cs, args): raise exceptions.ClientException(code=1, message=msg) shell_utils.find_volume_snapshot(cs, args.snapshot).update(**kwargs) + print("Request to rename snapshot '%s' has been accepted." % ( + args.snapshot)) @utils.arg('snapshot', metavar='<snapshot>', nargs='+', @@ -1397,6 +1399,7 @@ def do_backup_reset_state(cs, args): for backup in args.backup: try: shell_utils.find_backup(cs, backup).reset_state(args.state) + print("Request to update backup '%s' has been accepted." % backup) except Exception as e: failure_count += 1 msg = "Reset state for backup %s failed: %s" % (backup, e) @@ -2236,6 +2239,8 @@ def do_consisgroup_update(cs, args): shell_utils.find_consistencygroup( cs, args.consistencygroup).update(**kwargs) + print("Request to update consistency group '%s' has been accepted." % ( + args.consistencygroup)) @utils.arg('--all-tenants', diff --git a/cinderclient/v3/shell.py b/cinderclient/v3/shell.py index f8c0570..56c4e2e 100644 --- a/cinderclient/v3/shell.py +++ b/cinderclient/v3/shell.py @@ -849,6 +849,7 @@ def do_backup_update(cs, args): raise exceptions.ClientException(code=1, message=msg) shell_utils.find_backup(cs, args.backup).update(**kwargs) + print("Request to update backup '%s' has been accepted." % args.backup) @api_versions.wraps('3.7') @@ -1170,6 +1171,7 @@ def do_group_update(cs, args): raise exceptions.ClientException(code=1, message=msg) shell_utils.find_group(cs, args.group).update(**kwargs) + print("Request to update group '%s' has been accepted." % args.group) @api_versions.wraps('3.14') |