From fdba364b7d64ee6a67174485d215ae8f30ccbc49 Mon Sep 17 00:00:00 2001 From: Thang Pham Date: Mon, 8 Sep 2014 15:13:30 -0400 Subject: [PATCH] Make cinderclient metadata CLI output consistent cinder metadata-update-all and metadata-show produces inconsistent output. The following patch makes the output of each command above consistent, where each metadata property will be printed on a separate table row. Change-Id: I42933bc6c0e4f925c19cfd4db6d1a205de06a73d Closes-Bug: #1366289 --- cinderclient/v1/shell.py | 2 +- cinderclient/v2/shell.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cinderclient/v1/shell.py b/cinderclient/v1/shell.py index 20e52c69c..bb7438866 100644 --- a/cinderclient/v1/shell.py +++ b/cinderclient/v1/shell.py @@ -1409,7 +1409,7 @@ def do_metadata_update_all(cs, args): volume = utils.find_volume(cs, args.volume) metadata = _extract_metadata(args) metadata = volume.update_all_metadata(metadata) - utils.print_dict(metadata) + utils.print_dict(metadata['metadata'], 'Metadata-property') @utils.arg('snapshot', diff --git a/cinderclient/v2/shell.py b/cinderclient/v2/shell.py index a0f697746..902130ae1 100644 --- a/cinderclient/v2/shell.py +++ b/cinderclient/v2/shell.py @@ -1613,7 +1613,7 @@ def do_metadata_update_all(cs, args): volume = utils.find_volume(cs, args.volume) metadata = _extract_metadata(args) metadata = volume.update_all_metadata(metadata) - utils.print_dict(metadata) + utils.print_dict(metadata['metadata'], 'Metadata-property') @utils.arg('snapshot',