- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
11-01-2023 08:16 AM - edited 11-01-2023 09:06 AM
The document I'm referring to - https://pan-os-python.readthedocs.io/en/latest/howto.html > High Availability Pairs
I've been working with the pan-os-python
SDK, specifically with a Panorama High Availability (HA) pair. I'm following the documentation that guides on using specific methods with 'firewall pairs'. The primary advantage, as described in the documentation, is that these methods handle sending configurations to the currently 'active' device, eliminating the need for manual specification.
However, I've encountered a problem when trying to use these methods with my 'Panorama HA pair'. Here's the error I'm getting.
if super_method_name not in ("keygen", "op", "ad_hoc", "export")
RecursionError: maximum recursion depth exceeded in comparison
I'd like to note a couple of things:
panorama-1
as active, I'm able to push configurations to it. The same goes for panorama-2
.Considering the above, has anyone experienced a similar issue or could provide some insights into what might be causing this? Any help or pointers would be much appreciated! Here is the code
from panos.panorama import Panorama, DeviceGroup
from panos.policies import PreRulebase, SecurityRule
panorama_object = Panorama('panorama-1', 'username', 'password' )
panorama_object.set_ha_peers(Panorama('panorama-2', 'username', 'password'))
panorama_object.refresh_ha_active()
dg_object = DeviceGroup("office")
panorama_object.add(dg_object)
rules_object = dg_object.add(PreRulebase())
new_rule_object = SecurityRule(
name='Allow DNS',
fromzone=['any'],
tozone=['any'],
source=['any'],
destination=['8.8.8.8'],
application=['dns'],
service=['application-default'],
action='allow'
)
rules_object.add(new_rule_object)
new_rule_object.create()
11-08-2023 08:18 AM
Hi @vsurresh ,
I've reached out internally to assist you with this. Thanks for your patience!
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!