From f4c9015fc0a6a981e1f8ab2696092beff0555830 Mon Sep 17 00:00:00 2001 From: zhurong Date: Mon, 15 Feb 2016 07:24:09 +0000 Subject: [PATCH] Rename the package-import version parameter Now use murano package-import with version parameter, It always shows version of client. So rename the parameter 'version' to 'package-version' Change-Id: Idcf6d83bf608acc8429baebd4e657c5e16a06e35 Closes-bug: #1536121 --- muranoclient/tests/unit/test_shell.py | 2 +- muranoclient/v1/shell.py | 8 ++++---- releasenotes/notes/bug-1536121-51c42f77a9e97db1.yaml | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 releasenotes/notes/bug-1536121-51c42f77a9e97db1.yaml diff --git a/muranoclient/tests/unit/test_shell.py b/muranoclient/tests/unit/test_shell.py index cdbf33ba..d50f0d63 100644 --- a/muranoclient/tests/unit/test_shell.py +++ b/muranoclient/tests/unit/test_shell.py @@ -69,7 +69,7 @@ def _create_ver_list(versions): class TestArgs(object): - version = '' + package_version = '' murano_repo_url = 'http://127.0.0.1' exists_action = '' is_public = False diff --git a/muranoclient/v1/shell.py b/muranoclient/v1/shell.py index dce11346..9439574b 100644 --- a/muranoclient/v1/shell.py +++ b/muranoclient/v1/shell.py @@ -607,7 +607,7 @@ def _handle_package_exists(mc, data, package, exists_action): help='Category list to attach.') @utils.arg('--is-public', action='store_true', default=False, help='Make the package available for users from other tenants.') -@utils.arg('--version', default='', +@utils.arg('--package-version', default='', help='Version of the package to use from repository ' '(ignored when importing with multiple packages).') @utils.arg('--exists-action', default='', choices=['a', 's', 'u'], @@ -622,7 +622,7 @@ def do_package_import(mc, args): """ data = {"is_public": args.is_public} - version = args.version + version = args.package_version if version and len(args.filename) >= 2: print("Requested to import more than one package, " "ignoring version.") @@ -879,7 +879,7 @@ def do_bundle_save(mc, args): @utils.arg('-p', '--path', metavar='', help='Path to the directory to store package. If not set will use ' 'current directory.') -@utils.arg('--version', default='', +@utils.arg('--package-version', default='', help='Version of the package to use from repository ' '(ignored when saving with multiple packages).') @utils.arg('--no-images', action='store_true', default=False, @@ -898,7 +898,7 @@ def do_package_save(mc, args): else: dst = os.getcwd() - version = args.version + version = args.package_version if version and len(args.filename) >= 2: print("Requested to save more than one package, " "ignoring version.") diff --git a/releasenotes/notes/bug-1536121-51c42f77a9e97db1.yaml b/releasenotes/notes/bug-1536121-51c42f77a9e97db1.yaml new file mode 100644 index 00000000..f6fb0c55 --- /dev/null +++ b/releasenotes/notes/bug-1536121-51c42f77a9e97db1.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - Fixes use murano package-import with version parameter, + It always shows version of client. Rename the parameter + 'version' to 'package-version'