PaloAltoNetworks / pan-os-python

The PAN-OS SDK for Python is a package to help interact with Palo Alto Networks devices (including physical and virtualized Next-generation Firewalls and Panorama). The pan-os-python SDK is object oriented and mimics the traditional interaction with the device via the GUI or CLI/API.
https://pan-os-python.readthedocs.io
ISC License
345 stars 170 forks source link

Maximum recursion depth exceeded in High Availability Pairs with Panorama #402

Open Geronaso opened 2 years ago

Geronaso commented 2 years ago

I am not sure if this is a bug or a problem at my end, but the problem is as follow.

Describe the bug

I am running the code from https://pandevice.readthedocs.io/en/latest/howto.html#high-availability-pairs

but when it tries to create the object, it returns a RecursionError: maximum recursion depth exceeded.

The only difference from the sample, is that I am running with two panoramas and not two firewalls.

Current behavior

Traceback (most recent call last): File "paloalto_debug.py", line 29, in pano.add(AddressObject("test", '10.0.1.1', tag='test')).create() File "/usr/local/lib/python3.6/site-packages/panos/base.py", line 642, in create self.xpath_short(), element, retry_on_peer=self.HA_SYNC File "/usr/local/lib/python3.6/site-packages/panos/base.py", line 3642, in method result = getattr(ha_peer.xapi, super_method_name)(*args, kwargs) File "/usr/local/lib/python3.6/site-packages/panos/base.py", line 3642, in method result = getattr(ha_peer.xapi, super_method_name)(*args, *kwargs) File "/usr/local/lib/python3.6/site-packages/panos/base.py", line 3642, in method result = getattr(ha_peer.xapi, super_method_name)(args, kwargs) [Previous line repeated 329 more times] File "/usr/local/lib/python3.6/site-packages/panos/base.py", line 3592, in method ha_peer = self.pan_device.ha_peer RecursionError: maximum recursion depth exceeded

welcome-to-palo-alto-networks[bot] commented 2 years ago

:tada: Thanks for opening your first issue here! Welcome to the community!