Loading src/tests/tools/firewall_agent/firewall_agent/resources/nft_model/Exceptions.py +2 −2 Original line number Diff line number Diff line Loading @@ -43,9 +43,9 @@ class MalformedOutputException(Exception): ) class UnsupportedElementException(Exception): def __init__(self, element_type : str, value : str) -> None: def __init__(self, element : str, value : str) -> None: super().__init__( f'Unsupported: element_type={str(element_type)} value={str(value)}' f'Unsupported: element={str(element)} value={str(value)}' ) class MissingFieldException(Exception): Loading src/tests/tools/firewall_agent/firewall_agent/resources/nft_model/Rule.py +2 −2 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ class Rule: rule : 'Rule' = cls(family, table, chain) if 'expr' not in entry: raise MissingFieldException('rule.expr', entry) expr_list : List[Dict] = entry.pop('expr') expr_list : List[Dict] = entry['expr'] num_fields_updated = 0 for expr_entry in expr_list: expr_entry_fields = set(expr_entry.keys()) Loading @@ -67,7 +67,7 @@ class Rule: elif expr_entry_type in {'accept', 'drop', 'reject'}: rule.action = get_action_from_str(expr_entry_type) num_fields_updated += 1 elif expr_entry_type in {'counter', 'jump'}: elif expr_entry_type in {'counter', 'jump', 'xt'}: pass # ignore these entry types else: raise UnsupportedElementException('expr_entry', expr_entry) Loading Loading
src/tests/tools/firewall_agent/firewall_agent/resources/nft_model/Exceptions.py +2 −2 Original line number Diff line number Diff line Loading @@ -43,9 +43,9 @@ class MalformedOutputException(Exception): ) class UnsupportedElementException(Exception): def __init__(self, element_type : str, value : str) -> None: def __init__(self, element : str, value : str) -> None: super().__init__( f'Unsupported: element_type={str(element_type)} value={str(value)}' f'Unsupported: element={str(element)} value={str(value)}' ) class MissingFieldException(Exception): Loading
src/tests/tools/firewall_agent/firewall_agent/resources/nft_model/Rule.py +2 −2 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ class Rule: rule : 'Rule' = cls(family, table, chain) if 'expr' not in entry: raise MissingFieldException('rule.expr', entry) expr_list : List[Dict] = entry.pop('expr') expr_list : List[Dict] = entry['expr'] num_fields_updated = 0 for expr_entry in expr_list: expr_entry_fields = set(expr_entry.keys()) Loading @@ -67,7 +67,7 @@ class Rule: elif expr_entry_type in {'accept', 'drop', 'reject'}: rule.action = get_action_from_str(expr_entry_type) num_fields_updated += 1 elif expr_entry_type in {'counter', 'jump'}: elif expr_entry_type in {'counter', 'jump', 'xt'}: pass # ignore these entry types else: raise UnsupportedElementException('expr_entry', expr_entry) Loading