From c0efa97944fc55d7e04699e3b3fdce791ef35eef Mon Sep 17 00:00:00 2001 From: Adit Sarfaty Date: Wed, 22 Feb 2017 13:47:09 +0200 Subject: [PATCH] NSXv| Fix path comparison in lbaas L7 rules Use the requested compare type for L7 path rules Change-Id: I8e21f41b14c02adf6a4ade15533b6ad420e85b05 --- vmware_nsx/services/lbaas/nsx_v/v2/l7policy_mgr.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vmware_nsx/services/lbaas/nsx_v/v2/l7policy_mgr.py b/vmware_nsx/services/lbaas/nsx_v/v2/l7policy_mgr.py index 4c3aadff76..9e6e0cb268 100644 --- a/vmware_nsx/services/lbaas/nsx_v/v2/l7policy_mgr.py +++ b/vmware_nsx/services/lbaas/nsx_v/v2/l7policy_mgr.py @@ -79,11 +79,11 @@ def policy_to_application_rule(policy): 'val': rule.value}) elif rule.type == lb_const.L7_RULE_TYPE_PATH: # Example: acl path_beg -i /images - # Regardless of the compare type, always look at the beginning of - # the path. # -i for case insensitive path - rule_line = ('acl %(rule_id)s path_beg ' + path_type = 'path' + type_by_comp + rule_line = ('acl %(rule_id)s %(path_type)s ' '-i %(val)s' % {'rule_id': rule.id, + 'path_type': path_type, 'val': rule.value}) elif rule.type == lb_const.L7_RULE_TYPE_FILE_TYPE: # Example: acl path_sub -i .jpg