From 9d6956e8fb8c6da6f23a690adfab9372c0a9631c Mon Sep 17 00:00:00 2001 From: tengqm Date: Tue, 17 Nov 2015 20:52:31 -0500 Subject: [PATCH] Remove spec file profile-update command We were using profile-update command to create a new profile if 'spec' is provided. This is an abuse of the command. It is creating confusion rather than convenience (original thought). This patch removes the 'spec' parameter so users will better understand that 'spec' is designed to be read-only. Change-Id: I2ee0aeea2b612dbfb27263dbf2ac203698f257e5 --- senlinclient/v1/shell.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/senlinclient/v1/shell.py b/senlinclient/v1/shell.py index 29fbb11..46059c0 100644 --- a/senlinclient/v1/shell.py +++ b/senlinclient/v1/shell.py @@ -168,8 +168,6 @@ def do_profile_show(sc, args): @utils.arg('-n', '--name', metavar='', help=_('The new name for the profile.')) -@utils.arg('-s', '--spec-file', metavar='', - help=_('The new spec file for the profile.')) @utils.arg('-p', '--permission', metavar='', default='', help=_('A string format permission for this profile.')) @utils.arg('-M', '--metadata', metavar='', @@ -181,15 +179,8 @@ def do_profile_show(sc, args): help=_('Name or ID of the profile to update.')) def do_profile_update(sc, args): '''Update a profile.''' - spec = None - if args.spec_file: - spec = utils.get_spec_content(args.spec_file) - type_name = spec['type'] - if type_name == 'os.heat.stack': - spec['properties'] = utils.process_stack_spec(spec['properties']) params = { 'name': args.name, - 'spec': spec, 'permission': args.permission, } if args.metadata: