From dddf8d85631204418df27691952d5d18b1cb087c Mon Sep 17 00:00:00 2001 From: checktheroads Date: Sun, 26 Apr 2020 09:06:38 -0700 Subject: [PATCH] Fix Juniper BGP Community processing, closes #37 --- hyperglass/execution/construct.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hyperglass/execution/construct.py b/hyperglass/execution/construct.py index 524b0a7..f4da2ec 100644 --- a/hyperglass/execution/construct.py +++ b/hyperglass/execution/construct.py @@ -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)):