summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Brik <yuval@brik.org.il>2017-08-13 14:19:48 +0300
committerYuval Brik <yuval@brik.org.il>2017-08-13 14:19:48 +0300
commitf2f7e6f99bad7112a3682dd191374c75e2e9fc3d (patch)
tree8fd33177e6c6fac629d30a049357a39b80163944
parent90437986bcd1a49d1e73ada8ed65a9b63721bea2 (diff)
Plan: fix sending per resource parameters0.4.0
Patch [0] added filtering for plan parameters, to only send parameters of resources whose type is being protected. This introduced a bug where per resource parameters were not sent. Fix that by apply the filtering correctly. [0] https://review.openstack.org/492393/ Change-Id: Ic3cdefe1a27587de4e887e509075e7c43a314262
Notes
Notes (review): Code-Review+2: Yuval Brik <yuval@brik.org.il> Code-Review+1: Spencer Yu <yushb@gohighsec.com> Code-Review+2: chenying <ying.chen@huawei.com> Workflow+1: chenying <ying.chen@huawei.com> Code-Review+1: zhangbailin <zhangbailin@inspur.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 14 Aug 2017 09:20:51 +0000 Reviewed-on: https://review.openstack.org/493353 Project: openstack/karbor-dashboard Branch: refs/heads/master
-rw-r--r--karbor_dashboard/protectionplans/forms.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/karbor_dashboard/protectionplans/forms.py b/karbor_dashboard/protectionplans/forms.py
index c7db1e4..b472020 100644
--- a/karbor_dashboard/protectionplans/forms.py
+++ b/karbor_dashboard/protectionplans/forms.py
@@ -62,7 +62,8 @@ class CreateProtectionPlanForm(horizon_forms.SelfHandlingForm):
62 resources = json.loads(data["resources"]) 62 resources = json.loads(data["resources"])
63 types = {resource["type"] for resource in resources} 63 types = {resource["type"] for resource in resources}
64 parameters = json.loads(data["parameters"]) 64 parameters = json.loads(data["parameters"])
65 parameters = {k: v for k, v in parameters.items() if k in types} 65 parameters = {k: v for k, v in parameters.items()
66 if k.split("#")[0] in types}
66 new_plan = karborclient.plan_create( 67 new_plan = karborclient.plan_create(
67 request, 68 request,
68 data["name"], 69 data["name"],