-
Notifications
You must be signed in to change notification settings - Fork 16
type=xpath
as pan-os-php is and was always driven by XML config files, this new utility is search with specific filters and output the xPath where the information was found in your XML configuration file:
pan-os-php type=xpath in=configfile.xml filter-node=address display-nameattribute
pan-os-php type=xpath in=configfile.xml filter-node=address display-xmlnode
possible filters:
-
filter-node=address - search on all xPath, and display findings: example, find all xPath where */address are defined
- XPATH: /config/devices/entry[@name='localhost.localdomain']/container/entry[@name='Prisma Access']/address
- XPATH: /config/devices/entry[@name='localhost.localdomain']/device/cloud/entry[@name='Mobile Users Explicit Proxy']/address
- XPATH: /config/devices/entry[@name='localhost.localdomain']/device/cloud/entry[@name='Mobile Users']/address
- XPATH: /config/devices/entry[@name='localhost.localdomain']/swg-container/entry[@name='swg-container']/address
- XPATH: /config/devices/entry[@name='localhost.localdomain']/swg-container/entry[@name='swg-container']/region/entry[@name='ZW']/address
-
"filter-xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system/update-server" - full xpath search, with possibility of 'display-xyz' usage to display xml content
- XPATH: /config/devices/entry[@name='localhost.localdomain']/deviceconfig/system/update-server
- VALUE: pansupport.paloaltonetworks.com
-
'filter-nameattribute=Palo Alto Networks Sinkhole'
-
'filter-test=panw-auth-portal-exclude-list'
additional output flags, to not only display xpath:
- display-xmlnode - print XML content found on xPath
- display-nameattribute - print all nodes, but only what is listed in xml attribute "name=XYZ"
- display-fullxpath - template related xPath are per default shorted, to display full, use this argument
default situation:
- actions=display
- possible actions=remove => to remove filtered XMLnode