From 324aaa79e3121334127c5e52344a7ef22a98dbac Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Mon, 24 Jul 2017 17:58:01 +0200 Subject: [PATCH] Follow up to the API version warning patches * Update the help string of --ironic-api-version and --os-baremetal-api-version to mention the future change. * Add missing dot to the warning issued by the "ironic" tool. Partial-Bug: #1671145 Change-Id: Ia03775a318008d0c740ce873ea037309290e33f8 --- ironicclient/osc/plugin.py | 4 +++- ironicclient/shell.py | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ironicclient/osc/plugin.py b/ironicclient/osc/plugin.py index 01502f428..1e668de0d 100644 --- a/ironicclient/osc/plugin.py +++ b/ironicclient/osc/plugin.py @@ -85,7 +85,9 @@ def build_option_parser(parser): help='Baremetal API version, default=' + http.DEFAULT_VER + ' (Env: OS_BAREMETAL_API_VERSION). ' - '"latest" is the latest known API version', + 'Use "latest" for the latest known API version. ' + 'The default value will change to "latest" in the Queens ' + 'release.', ) return parser diff --git a/ironicclient/shell.py b/ironicclient/shell.py index 5ecd0d22f..df7c54f80 100644 --- a/ironicclient/shell.py +++ b/ironicclient/shell.py @@ -40,7 +40,7 @@ from ironicclient import exc LATEST_API_VERSION = ('1', 'latest') MISSING_VERSION_WARNING = ( - "You are using the default API version of the 'ironic' command " + "You are using the default API version of the 'ironic' command. " "This is currently API version %s. In the future, the default will be " "the latest API version understood by both API and CLI. You can preserve " "the current behavior by passing the --ironic-api-version argument with " @@ -163,8 +163,10 @@ class IronicShell(object): default=cliutils.env('IRONIC_API_VERSION', default=None), help=_('Accepts 1.x (where "x" is microversion) ' - 'or "latest", Defaults to ' - 'env[IRONIC_API_VERSION] or 1')) + 'or "latest". Defaults to ' + 'env[IRONIC_API_VERSION] or %s. Starting ' + 'with the Queens release this will ' + 'default to "latest".') % http.DEFAULT_VER) parser.add_argument('--ironic_api_version', help=argparse.SUPPRESS)