diff --git a/acl_loader/main.py b/acl_loader/main.py index caf4c4eca9..67d5b0220c 100644 --- a/acl_loader/main.py +++ b/acl_loader/main.py @@ -327,6 +327,7 @@ def validate_actions(self, table_name, action_props): if action_value not in capability[key]: del action_props[action_key] + continue return action_count == len(action_props) @@ -666,11 +667,11 @@ def show_rule(self, table_name, rule_id): """ header = ("Table", "Rule", "Priority", "Action", "Match") - def show_priority(val): + def pop_priority(val): priority = val.pop("PRIORITY") return priority - def show_action(val): + def pop_action(val): action = "" for key in dict(val): @@ -688,7 +689,7 @@ def show_action(val): return action - def show_matches(val): + def pop_matches(val): matches = list(sorted(["%s: %s" % (k, val[k]) for k in val])) if len(matches) == 0: matches.append("N/A") @@ -703,9 +704,9 @@ def show_matches(val): if rule_id and rule_id != rid: continue - priority = show_priority(val) - action = show_action(val) - matches = show_matches(val) + priority = pop_priority(val) + action = pop_action(val) + matches = pop_matches(val) rule_data = [[tname, rid, priority, action, matches[0]]] if len(matches) > 1: