From 44061cfab2dc74dca054546af955d12e13d6e6d2 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Wed, 17 Apr 2019 09:59:44 -0500 Subject: [PATCH] Add support for backup user ID Backup user_id was added with microversion 3.56 but never added to the client. Added in Rocky with I3ffb544ef3ee65276cee8b1e870d524fd0e57085. Change-Id: Ib9a4159db0f8af599dcf8315334de4f859be077e Signed-off-by: Sean McGinnis --- cinderclient/api_versions.py | 2 +- cinderclient/v3/shell.py | 3 +++ releasenotes/notes/backup-user-id-059ccea871893a0b.yaml | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/backup-user-id-059ccea871893a0b.yaml diff --git a/cinderclient/api_versions.py b/cinderclient/api_versions.py index cb7b54b7f..647ff2faa 100644 --- a/cinderclient/api_versions.py +++ b/cinderclient/api_versions.py @@ -29,7 +29,7 @@ LOG = logging.getLogger(__name__) # key is a deprecated version and value is an alternative version. DEPRECATED_VERSIONS = {"1": "2"} DEPRECATED_VERSION = "2.0" -MAX_VERSION = "3.55" +MAX_VERSION = "3.56" MIN_VERSION = "3.0" _SUBSTITUTIONS = {} diff --git a/cinderclient/v3/shell.py b/cinderclient/v3/shell.py index bc79860c1..fefec60e6 100644 --- a/cinderclient/v3/shell.py +++ b/cinderclient/v3/shell.py @@ -181,6 +181,9 @@ def do_backup_list(cs, args): shell_utils.translate_volume_snapshot_keys(backups) columns = ['ID', 'Volume ID', 'Status', 'Name', 'Size', 'Object Count', 'Container'] + if cs.api_version >= api_versions.APIVersion('3.56'): + columns.append('User ID') + if args.sort: sortby_index = None else: diff --git a/releasenotes/notes/backup-user-id-059ccea871893a0b.yaml b/releasenotes/notes/backup-user-id-059ccea871893a0b.yaml new file mode 100644 index 000000000..abafaa701 --- /dev/null +++ b/releasenotes/notes/backup-user-id-059ccea871893a0b.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Starting with API microversion 3.56, ``backup-list`` and ``backup-show`` + will include the ``User ID`` denoting the user that created the backup.