From 805df0e424cab9fb3040ca369dda143fa3e1dd6b Mon Sep 17 00:00:00 2001 From: yanyanhu Date: Thu, 20 Aug 2015 22:50:58 -0400 Subject: [PATCH] Avoid deleting metadata incorrectly when doing profile_update Currently, profile metadata will be removed incorrectly when user performs profile_update without specifying metadata option. This patch fixes this bug. Change-Id: I92bbfb07d4c820983659b59e100d27db0a6f29e7 Closes-Bug: #1481583 --- senlinclient/v1/shell.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/senlinclient/v1/shell.py b/senlinclient/v1/shell.py index 1eb61846..829a91e3 100644 --- a/senlinclient/v1/shell.py +++ b/senlinclient/v1/shell.py @@ -178,8 +178,9 @@ def do_profile_update(sc, args): 'name': args.name, 'spec': spec, 'permission': args.permission, - 'metadata': utils.format_parameters(args.metadata), } + if args.metadata: + params['metadata'] = utils.format_parameters(args.metadata) # Find the profile first, we need its id try: