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.
Targeting a vsys is a common need for customers with multi-vsys systems, so there is an expectation that the vsys attribute will return the appropriate value.
vsys information is presented within the REST API for the SecurityPostRules, but it requires an addititional query.
This requires making an API call to "/restapi/v10.1/Device/VirtualSystems?location=template&template=Production" and capturing the indexed fifth entry to reveal the assigned vsys.
This gives hope that the data can be captured from the XML API and could be presented through asking for the vsys attribute of a policy rule object.
Using diffsync library with Nautobot, this enables a workflow where security policies are defined within Nautobot's database and synced to Panorama through the pan-os-python SDK.
Your Environment
Version used: 1.7.3
Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3): python 3.7
Operating System and version (desktop or mobile): Ubuntu 20.04 (WSL2)
Describe the bug
Unable to receive the vsys of a SecurityRule, device group is being returned.
Expected behavior
Current behavior
It does not look like
vsys
is a captured value.Possible solution
Targeting a
vsys
is a common need for customers with multi-vsys systems, so there is an expectation that thevsys
attribute will return the appropriate value.vsys information is presented within the REST API for the SecurityPostRules, but it requires an addititional query.
This requires making an API call to
"/restapi/v10.1/Device/VirtualSystems?location=template&template=Production"
and capturing the indexed fifth entry to reveal the assigned vsys.This gives hope that the data can be captured from the XML API and could be presented through asking for the
vsys
attribute of a policy rule object.Steps to reproduce
Screenshots
Context
Using
diffsync
library with Nautobot, this enables a workflow where security policies are defined within Nautobot's database and synced to Panorama through thepan-os-python
SDK.Your Environment