cdot65 / pan-os-upgrade

An efficient tool to execute configuration backups, network state snapshots, system readiness checks, and operating system upgrades of Palo Alto Networks firewalls and Panorama appliances.
https://cdot65.github.io/pan-os-upgrade/
Apache License 2.0
39 stars 7 forks source link

Enhance Performance of get_firewall_info with Multi-Threading #80

Closed cdot65 closed 6 months ago

cdot65 commented 6 months ago

Summary

The current implementation of the get_firewall_info function fetches system information for each firewall sequentially. This approach can be time-consuming, especially when dealing with a large number of firewalls managed by Panorama. To improve performance and efficiency, it's proposed to refactor this function to use multi-threading, allowing system information for multiple firewalls to be fetched concurrently.

Current Behavior

The get_firewall_info function iterates over a list of Firewall objects, fetching system information for each firewall one at a time. This sequential processing leads to increased execution time, especially noticeable when the number of firewalls is large.

Expected Behavior

System information for multiple firewalls should be fetched concurrently, leveraging multi-threading. A significant reduction in the total execution time of the get_firewall_info function.

Proposed Solution

Benefits

Considerations