From 8e01bff5b47c913a29b0cb46b4015ded590a2408 Mon Sep 17 00:00:00 2001 From: Paul Breaux Date: Wed, 5 Apr 2017 15:30:19 -0600 Subject: [PATCH] L7PolicyCreationException raised in creation of l7policy with rule Issues: Fixes #649 Problem: When created a policy with a rule, in assure_l7rules_created, we retrieve a particular parent policy for a rule, but the key we retrieve it with is not correct. It is currently set as 'l7policy_id', but the correct key is 'policy_id'. This is a reference to the id of the parent policy from within the rule's service object. Analysis: Reference to wrong rule dict key 'l7policy_id' changed to 'policy_id' in get_l7policy_for_rule in lbaas_builder.py. Tests: Ran failing test against BIG-IP 12.1 undercloud and it passed as expected. --- f5_openstack_agent/lbaasv2/drivers/bigip/lbaas_builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/f5_openstack_agent/lbaasv2/drivers/bigip/lbaas_builder.py b/f5_openstack_agent/lbaasv2/drivers/bigip/lbaas_builder.py index ce5205de2..48ac54023 100644 --- a/f5_openstack_agent/lbaasv2/drivers/bigip/lbaas_builder.py +++ b/f5_openstack_agent/lbaasv2/drivers/bigip/lbaas_builder.py @@ -593,7 +593,7 @@ def convert_operating_status(status): return op_status def get_l7policy_for_rule(self, l7policies, l7rule): - policy_id = l7rule['l7policy_id'] + policy_id = l7rule['policy_id'] for policy in l7policies: if policy_id == policy['id']: return policy