OXIESEC PANEL
- Current Dir:
/
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
exabgp
/
rib
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
1.61 KB
03/13/2021 04:30:48 PM
rw-r--r--
📁
__pycache__
-
03/16/2023 12:55:54 PM
rwxr-xr-x
📄
cache.py
2.64 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
change.py
2.16 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
incoming.py
471 bytes
03/13/2021 04:30:48 PM
rw-r--r--
📄
outgoing.py
9.27 KB
03/13/2021 04:30:48 PM
rw-r--r--
Editing: __init__.py
Close
# encoding: utf-8 """ rib/__init__.py Created by Thomas Mangin on 2010-01-15. Copyright (c) 2009-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) """ from exabgp.rib.incoming import IncomingRIB from exabgp.rib.outgoing import OutgoingRIB class RIB(object): # when we perform a configuration reload using SIGUSR, we must not use the RIB # without the cache, all the updates previously sent via the API are lost _cache = {} def __init__(self, name, adj_rib_in, adj_rib_out, families): self.name = name if name in self._cache: self.incoming = self._cache[name].incoming self.outgoing = self._cache[name].outgoing self.incoming.families = families self.outgoing.families = families self.outgoing.delete_cached_family(families) if adj_rib_out: self.outgoing.resend(None, False) else: self.outgoing.clear() else: self.incoming = IncomingRIB(adj_rib_in, families) self.outgoing = OutgoingRIB(adj_rib_out, families) self._cache[name] = self def reset(self): self.incoming.reset() self.outgoing.reset() def uncache(self): if self.name in self._cache: del self._cache[self.name] # This code was never tested ... def clear(self): self._cache[self.name].incoming = IncomingRIB(self.incoming.cache, self._cache[self.name].incoming.families) self._cache[self.name].outgoing = OutgoingRIB(self.outgoing.cache, self._cache[self.name].incoming.families)