summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliushuai <liushuai@cmss.chinamobile.com>2018-12-02 22:09:15 +0800
committerliushuai <liushuai@cmss.chinamobile.com>2018-12-02 23:18:37 +0800
commita69cd9b3e393a981cde66a1532241b858bdf6b07 (patch)
tree358dcf6e9cceb3110dabadbf2950c28e1f45d7a1
parentc6605f15938f2830f5e3a0321ff971130a3417f3 (diff)
Add support to update plan description
Notes
Notes (review): Code-Review+1: Gaƫtan Trellu <gaetan.trellu@incloudus.com> Code-Review+2: Jiao Pengju <jiaopengju@cmss.chinamobile.com> Workflow+1: Jiao Pengju <jiaopengju@cmss.chinamobile.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 03 Dec 2018 09:35:06 +0000 Reviewed-on: https://review.openstack.org/621412 Project: openstack/karbor Branch: refs/heads/master
-rw-r--r--karbor/api/schemas/plans.py1
-rw-r--r--karbor/api/v1/plans.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/karbor/api/schemas/plans.py b/karbor/api/schemas/plans.py
index d8a0088..65f685d 100644
--- a/karbor/api/schemas/plans.py
+++ b/karbor/api/schemas/plans.py
@@ -49,6 +49,7 @@ update = {
49 'name': parameter_types.name, 49 'name': parameter_types.name,
50 'status': {'type': ['string', 'null']}, 50 'status': {'type': ['string', 'null']},
51 'resources': parameter_types.resources, 51 'resources': parameter_types.resources,
52 'description': parameter_types.description,
52 }, 53 },
53 'required': [], 54 'required': [],
54 'additionalProperties': False, 55 'additionalProperties': False,
diff --git a/karbor/api/v1/plans.py b/karbor/api/v1/plans.py
index 8f0d61c..e6b5152 100644
--- a/karbor/api/v1/plans.py
+++ b/karbor/api/v1/plans.py
@@ -303,6 +303,7 @@ class PlansController(wsgi.Controller):
303 'name', 303 'name',
304 'resources', 304 'resources',
305 'status', 305 'status',
306 'description',
306 } 307 }
307 for key in valid_update_keys.intersection(plan): 308 for key in valid_update_keys.intersection(plan):
308 update_dict[key] = plan[key] 309 update_dict[key] = plan[key]