From 3d7060e0644b1da3406221532d5dd97b251e2fd1 Mon Sep 17 00:00:00 2001 From: Adam Baumeister Date: Tue, 16 Jan 2024 12:51:10 +1100 Subject: [PATCH] Docs --- .../api/check_firewall.md | 43 +++++++++++++++++++ .../api/firewall_proxy.md | 19 ++++++++ 2 files changed, 62 insertions(+) diff --git a/docs/panos-upgrade-assurance/api/check_firewall.md b/docs/panos-upgrade-assurance/api/check_firewall.md index c189cad..5a35034 100644 --- a/docs/panos-upgrade-assurance/api/check_firewall.md +++ b/docs/panos-upgrade-assurance/api/check_firewall.md @@ -686,6 +686,32 @@ __Returns__ `dict`: Results of all configured checks. +### `CheckFirewall.check_version_against_version_match_dict` + +```python +@staticmethod +def check_version_against_version_match_dict(version: Version, + match_dict: dict) +``` + +Compare the given software version against the match dict. + +# Parameters +version (str): The software version to compare. Example: "10.1.11" +match_dict (dict): A dictionary of tuples mapping major/minor versions to match criteria +example + + +Returns + +bool: `True` If the given software version matches the provided match criteria + ```python + { + "81": [("==", "8.1.21.2"), (">=", "8.1.25.1")], + "90": [(">=", "9.0.16.5")], + } + ``` + ### `CheckFirewall.check_device_root_certificate_issue` ```python @@ -712,3 +738,20 @@ __Parameters__ fail if the software version is affected by the root certificate issue, AND the device is used for data redistribution OR it's using an out-of-date content DB version. +### `CheckFirewall.check_cdss_and_panorama_certificate_issue` + +```python +def check_cdss_and_panorama_certificate_issue() +``` + +Checks whether the device is affected by the following advisory; + +https://live.paloaltonetworks.com/t5/customer-advisories/additional-pan-os-certificate-expirations-and-new-comprehensive/ta-p/572158 + +Check will fail in either of following scenarios: + + * Device is running an affected software version + * Device is running an affected content version + * Device is running the fixed content version or higher but has not been rebooted - note this is best effort, + and is based on when the content version was released and the device was rebooted + diff --git a/docs/panos-upgrade-assurance/api/firewall_proxy.md b/docs/panos-upgrade-assurance/api/firewall_proxy.md index e891ec0..7a5cbbc 100644 --- a/docs/panos-upgrade-assurance/api/firewall_proxy.md +++ b/docs/panos-upgrade-assurance/api/firewall_proxy.md @@ -1255,3 +1255,22 @@ __Returns__ } ``` +### `FirewallProxy.get_system_time_rebooted` + +```python +def get_system_time_rebooted() -> datetime +``` + +Returns the date and time the system last rebooted using the system uptime. + +The actual API command is `show system info`. + +__Returns__ + + +`datetime`: Time system was last rebooted based on current time - system uptime string + +```python showLineNumbers title="Sample output" +datetime(2024, 01, 01, 00, 00, 00) +``` +