From f63a318a7dfadd6dfada49b192844b54c90a904d Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Sun, 7 Apr 2019 03:18:34 +0000 Subject: [PATCH] Update API version to 1.32 Format the capsule addresses and remove some fields that were renamed at API version 1.32 Change-Id: I9591eb6fdcf9f5eb2352d87230753a2e75eccfc9 --- zunclient/api_versions.py | 2 +- zunclient/common/utils.py | 5 +++-- zunclient/v1/capsules_shell.py | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/zunclient/api_versions.py b/zunclient/api_versions.py index 46b6142f..1df9518e 100644 --- a/zunclient/api_versions.py +++ b/zunclient/api_versions.py @@ -31,7 +31,7 @@ if not LOG.handlers: HEADER_NAME = "OpenStack-API-Version" SERVICE_TYPE = "container" MIN_API_VERSION = '1.1' -MAX_API_VERSION = '1.31' +MAX_API_VERSION = '1.32' DEFAULT_API_VERSION = '1.latest' _SUBSTITUTIONS = {} diff --git a/zunclient/common/utils.py b/zunclient/common/utils.py index c99b65f9..a029dfd2 100644 --- a/zunclient/common/utils.py +++ b/zunclient/common/utils.py @@ -357,8 +357,9 @@ def base_url_for_url(url): def list_capsules(capsules): - columns = ('uuid', 'status', 'meta_name', - 'meta_labels', 'containers_uuids', 'created_at', 'addresses') + for c in capsules: + format_container_addresses(c) + columns = ('uuid', 'name', 'status', 'addresses') utils.print_list(capsules, columns, {'versions': print_list_field('versions')}, sortby_index=None) diff --git a/zunclient/v1/capsules_shell.py b/zunclient/v1/capsules_shell.py index d77eeab5..17ada189 100644 --- a/zunclient/v1/capsules_shell.py +++ b/zunclient/v1/capsules_shell.py @@ -23,6 +23,7 @@ from zunclient.i18n import _ def _show_capsule(capsule): + zun_utils.format_container_addresses(capsule) utils.print_dict(capsule._info)