Tool for exporting PANOS security rulebase to a spreadsheet with address and service objects resolved
This script takes either a Panorama URL or Panorama configuration XML as input as well as device-group name and returns the security rulebase as an Excel spreadsheet with all address and service objects resolved. A sample Panorama configuration file is included, though you are encouraged to work with your own configuration when testing and extending the script!
Currently you can run the script as-is and it will process the included local Panorama configuration XML. However, you are encouraged to either replace that XML file with one exported from your own Panorama, or pull the configuration live by this code in the main function:
def main():
...
with open(PAN_CFG_FILE, 'r') as f:
pan_cfg = xmltodict.parse(f.read())['response']['result']
with something like this:
def main():
...
pan_cfg = xmltodict.parse(get_config(Config.URL, Config.API_KEY))
You'll also need to update the config.py with your Panorama information.
git checkout -b feature/fooBar
)git commit -am 'Add some fooBar'
)git push origin feature/fooBar
)Distributed under the MIT license. See LICENSE
for more information.