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
347 stars 172 forks source link

PBF rules created with wrong path #577

Open Jbarrantess opened 1 month ago

Jbarrantess commented 1 month ago

The import for PolicyBaseFordwarding uses wong xpath to try creating rules

The xpath to use should be /config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/pbf/rules"

It tries on config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/pbf/rules which is documented on https://github.com/PaloAltoNetworks/pan-os-python/blob/develop/panos/policies.py

Change " self._xpaths.add_profile(value="/pbf/rules") " to self._xpaths.add_profile(value="/rulebase/pbf/rules")

Any attempt to create a PBF

Firewall is running version 10.x