OXIESEC PANEL
- Current Dir:
/
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
exabgp
/
configuration
/
flow
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/16/2023 12:55:54 PM
rwxr-xr-x
📄
__init__.py
2.35 KB
03/13/2021 04:30:48 PM
rw-r--r--
📁
__pycache__
-
03/16/2023 12:55:54 PM
rwxr-xr-x
📄
match.py
3.43 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
parser.py
12.84 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
route.py
2.07 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
scope.py
778 bytes
03/13/2021 04:30:48 PM
rw-r--r--
📄
then.py
2.51 KB
03/13/2021 04:30:48 PM
rw-r--r--
Editing: then.py
Close
# encoding: utf-8 """ then.py Created by Thomas Mangin on 2015-06-22. Copyright (c) 2009-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) """ from exabgp.configuration.core import Section from exabgp.configuration.flow.parser import accept from exabgp.configuration.flow.parser import discard from exabgp.configuration.flow.parser import rate_limit from exabgp.configuration.flow.parser import redirect from exabgp.configuration.flow.parser import redirect_next_hop from exabgp.configuration.flow.parser import redirect_next_hop_ietf from exabgp.configuration.flow.parser import copy from exabgp.configuration.flow.parser import mark from exabgp.configuration.flow.parser import action from exabgp.configuration.static.parser import community from exabgp.configuration.static.parser import large_community from exabgp.configuration.static.parser import extended_community class ParseFlowThen(Section): definition = [ 'accept', 'discard', 'rate-limit 9600', 'redirect 30740:12345', 'redirect 1.2.3.4:5678', 'redirect 1.2.3.4', 'redirect-next-hop', 'copy 1.2.3.4', 'mark 123', 'action sample|terminal|sample-terminal', ] syntax = 'then {\n' ' %s;\n' '}' % ';\n '.join(definition) known = { 'accept': accept, 'discard': discard, 'rate-limit': rate_limit, 'redirect': redirect, 'redirect-to-nexthop': redirect_next_hop, 'redirect-to-nexthop-ietf': redirect_next_hop_ietf, 'copy': copy, 'mark': mark, 'action': action, 'community': community, 'large-community': large_community, 'extended-community': extended_community, } # 'community','extended-community' action = { 'accept': 'nop', 'discard': 'attribute-add', 'rate-limit': 'attribute-add', 'redirect': 'nexthop-and-attribute', 'redirect-to-nexthop': 'attribute-add', 'redirect-to-nexthop-ietf': 'attribute-add', 'copy': 'nexthop-and-attribute', 'mark': 'attribute-add', 'action': 'attribute-add', 'community': 'attribute-add', 'large-community': 'attribute-add', 'extended-community': 'attribute-add', } name = 'flow/then' def __init__(self, tokeniser, scope, error, logger): Section.__init__(self, tokeniser, scope, error, logger) def clear(self): pass def pre(self): return True def post(self): return True