Browse Source

Plan: fix sending per resource parameters

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
Yuval Brik 1 year ago
parent
commit
f2f7e6f99b
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      karbor_dashboard/protectionplans/forms.py

+ 2
- 1
karbor_dashboard/protectionplans/forms.py View File

@@ -62,7 +62,8 @@ class CreateProtectionPlanForm(horizon_forms.SelfHandlingForm):
62 62
             resources = json.loads(data["resources"])
63 63
             types = {resource["type"] for resource in resources}
64 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 67
             new_plan = karborclient.plan_create(
67 68
                 request,
68 69
                 data["name"],

Loading…
Cancel
Save