1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

Fix Juniper BGP Community processing, closes #37

This commit is contained in:
checktheroads
2020-04-26 09:06:38 -07:00
parent a562c90094
commit dddf8d8563

View File

@ -77,7 +77,10 @@ class Construct:
# For devices that follow Juniper's AS_PATH regex standards,
# filter out Cisco-style special characters.
if self.device.nos in TARGET_JUNIPER_ASPATH:
if (
self.device.nos in TARGET_JUNIPER_ASPATH
and self.query_data.query_type in ("bgp_aspath",)
):
query = str(self.query_data.query_target)
asns = re.findall(r"\d+", query)
if bool(re.match(r"^\_", query)):