Skip to content

Commit 173bb8a

Browse files
feat(panos/network): Advanced routing engine (#539)
* Start work on Logical Router * Add interfaces and admin distances for logical router * Add static routes for VRF * Add BFD profile * Fix BFD profile * Assign BFD profile to static route * Update commits * Static IPv6 route * BGP auth and timer profiles * BGP address family - IPv4 unicast * BGP address family - finish IPv4 unicast * BGP address family - IPv4 multicast and IPv6 unicast * BGP dampening profile * BGP redistribution profile * BGP filtering (without filter lists and maps) * OSPF timers and auth * Fix pytest issues * New class for OSPF redistribution profile * Extend class for OSPF redistribution profile * Finish OSPF redistribution profile * OSPFv3 authentication profile * OSPFv3 timer profiles * OSPFv3 redistribution profile * Filter Access List - IPv4 * Filter Access List - IPv6 * Filter Prefix List * Filter AS-Path Access List * Filter Community List * Filter BGP Route-Maps * Filter BGP Route-Maps Redistribution (without from-protocol , to-protocol) * BGP settings, BGP peer and peer group * OSPF (without area) * OSPF area * Add RIB filters for logical router * Add ECMP for logical router * Add extended ECMP configuration * Add OSPF area range * Add OSPF area interface * Add OSPF area virtual link * Configure OPSFv3 on logical router * Add OSPFv3 with virutal link, range, interface for area * Format code * Add class for AdvancedRoutingEngine * Fix ValueError: not enough values to unpack (expected 2, got 1) * Simple test for logical router with VRF * Add template of logical route and test for BGP peer group * Test BGP auth profile * Add test for advanced routing engine * Test VRF static routes and BGP peer * Tests for routing profiles for BGP * Test for ARE OSPF * Extend logical router skeleton used in tests * Tests for routing profiles for OSPF * Add tests for other routing profiles * Fix format issues * Update TODO with details what to implement * Format code * Format code with poetry and Python 3.8
1 parent 0bd3c05 commit 173bb8a

File tree

6 files changed

+4558
-4
lines changed

6 files changed

+4558
-4
lines changed

panos/device.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ class Vsys(VersionedPanObject):
148148
"network.VlanInterface",
149149
"network.Vlan",
150150
"network.VirtualRouter",
151+
"network.LogicalRouter",
152+
"network.Vrf",
151153
"network.VirtualWire",
152154
"network.Layer2Subinterface",
153155
"network.Layer3Subinterface",
@@ -397,6 +399,38 @@ def _setup(self):
397399
self._params = tuple(params)
398400

399401

402+
class AdvancedRoutingEngine(VersionedPanObject):
403+
"""
404+
Note: This is valid for PANS-OS 10.2+.
405+
406+
Args:
407+
enable (bool): Enable advanced routing engine
408+
409+
"""
410+
411+
NAME = None
412+
ROOT = Root.DEVICE
413+
CHILDTYPES = ()
414+
415+
def _setup(self):
416+
# xpaths
417+
self._xpaths.add_profile(value="/deviceconfig/setting")
418+
419+
# params
420+
params = []
421+
422+
params.append(
423+
VersionedParamPath(
424+
"enable",
425+
default=False,
426+
vartype="yesno",
427+
path="advance-routing",
428+
)
429+
)
430+
431+
self._params = tuple(params)
432+
433+
400434
class LogSettingsSystem(VersionedPanObject):
401435
"""Firewall or Panorama device log settings system
402436

panos/firewall.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ class Firewall(PanDevice):
6262
"device.Vsys",
6363
"device.VsysResources",
6464
"device.SystemSettings",
65+
"device.AdvancedRoutingEngine",
6566
"device.LogSettingsSystem",
6667
"device.LogSettingsConfig",
6768
"device.PasswordProfile",
@@ -104,6 +105,8 @@ class Firewall(PanDevice):
104105
"network.Layer3Subinterface",
105106
"network.Vlan",
106107
"network.VirtualRouter",
108+
"network.LogicalRouter",
109+
"network.Vrf",
107110
"network.ManagementProfile",
108111
"network.VirtualWire",
109112
"network.IkeGateway",

0 commit comments

Comments
 (0)