Skip to content

Commit

Permalink
Closes #151: Fix issue with Junos parsing from d1160fe
Browse files Browse the repository at this point in the history
  • Loading branch information
thatmattlove committed Jul 4, 2021
1 parent 49808ac commit 78571ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hyperglass/execution/drivers/_construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def __init__(self, device, query_data):

# Set AFIs for based on query type
if self.query_data.query_type in ("bgp_route", "ping", "traceroute"):

# For IP queries, AFIs are enabled (not null/None) VRF -> AFI definitions
# where the IP version matches the IP version of the target.
self.afis = [
Expand All @@ -52,8 +51,7 @@ def __init__(self, device, query_data):
)
if v is not None and self.query_data.query_target.version == v.version
]

with Formatter(self.device.nos, self.query_data.query_type) as formatter:
elif self.query_data.query_type in ("bgp_aspath", "bgp_community"):
# For AS Path/Community queries, AFIs are just enabled VRF -> AFI
# definitions, no IP version checking is performed (since there is no IP).
self.afis = [
Expand All @@ -64,6 +62,8 @@ def __init__(self, device, query_data):
)
if v is not None
]

with Formatter(self.device.nos, self.query_data.query_type) as formatter:
self.target = formatter(self.query_data.query_target)

def json(self, afi):
Expand Down

0 comments on commit 78571ed

Please sign in to comment.