NSXv| Fix path comparison in lbaas L7 rules

Use the requested compare type for L7 path rules

Change-Id: I8e21f41b14c02adf6a4ade15533b6ad420e85b05
This commit is contained in:
Adit Sarfaty 2017-02-22 13:47:09 +02:00
parent abb76b430a
commit c0efa97944
1 changed files with 3 additions and 3 deletions

View File

@ -79,11 +79,11 @@ def policy_to_application_rule(policy):
'val': rule.value})
elif rule.type == lb_const.L7_RULE_TYPE_PATH:
# Example: acl <id> 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 <id> path_sub -i .jpg