Add support to update plan description

Change-Id: I048e970cd449e0e51bbfc3a97e325afd0fa73d5c
This commit is contained in:
liushuai 2018-12-02 23:02:07 +08:00
parent 262799e3c0
commit 58234ab51c
1 changed files with 4 additions and 0 deletions

View File

@ -188,6 +188,8 @@ def do_plan_delete(cs, args):
help="Id of plan to update.")
@utils.arg("--name", metavar="<name>",
help="A name to which the plan will be renamed.")
@utils.arg("--description", metavar="<description>",
help="Description to which the plan will be updated.")
@utils.arg("--resources", metavar="<id=type=name,id=type=name>",
help="Resources to which the plan will be updated.")
@utils.arg("--status", metavar="<suspended|started>",
@ -197,6 +199,8 @@ def do_plan_update(cs, args):
data = {}
if args.name is not None:
data['name'] = args.name
if args.description is not None:
data['description'] = args.description
if args.resources is not None:
plan_resources = arg_utils.extract_resources(args)
data['resources'] = plan_resources