You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using an address object as BGP peer-address (line 2 of the sample configuration) or static-route nexthop (line 4), batfish throws a parsing error.
This syntax is valid on a PaloAlto box running PAN-OS 10.2 version.
Runnable example
frompybatfish.client.sessionimportSessionTXT="""set deviceconfig system hostname FW1set network virtual-router VR1 protocol bgp peer-group PG1 peer PEER peer-address ip PEER-OBJECTset network virtual-router VR1 protocol bgp peer-group PG1 peer PEER peer-address ip 10.10.10.10set network virtual-router VR1 routing-table ip static-route ROUTE-NAME nexthop ip-address PEER-OBJECTset address PEER-OBJECT ip-netmask 10.10.10.10"""bf=Session()
bf.set_network("github-bug-report")
bf.init_snapshot_from_text(TXT)
# Verify that Batfish recognized the vendor format correctlyprint(bf.q.fileParseStatus().answer())
# Insert command(s) below to demonstrate the problemprint(bf.q.initIssues().answer())
print(bf.q.parseWarning().answer())
When replacing the address object (PEER-OBJECT in the sample configuration) by its IP address the line is parsed without error (see line 3).
I also tried to raise the address object definition (line 5) before the routing configuration without success.
The text was updated successfully, but these errors were encountered:
Thanks! This makes a lot of sense -- we have already added this support for Interface IP addresses, just never for static routes. The solution here is to port the logic from this PR: #5941 , specifically changing to use something like ip_address_or_reference for this property:
snil_ip
:
- IP address = interface_address
+ IP address = interface_address_or_reference
;
Probably have to add a new parser data rule, since this one allows a prefix too.
This is a great starter task for a new Batfish contributor!
When using an address object as BGP peer-address (line 2 of the sample configuration) or static-route nexthop (line 4), batfish throws a parsing error.
This syntax is valid on a PaloAlto box running PAN-OS 10.2 version.
Runnable example
When replacing the address object (PEER-OBJECT in the sample configuration) by its IP address the line is parsed without error (see line 3).
I also tried to raise the address object definition (line 5) before the routing configuration without success.
The text was updated successfully, but these errors were encountered: