diff --git a/examples/readiness_checks/run_health_checks.py b/examples/readiness_checks/run_health_checks.py index 148a9a1..c7b04b3 100644 --- a/examples/readiness_checks/run_health_checks.py +++ b/examples/readiness_checks/run_health_checks.py @@ -66,11 +66,12 @@ vsys = args.vsys if serial: + print(address) panorama = Panorama( hostname=address, api_password=password, api_username=username ) firewall = FirewallProxy(serial=serial) - panorama.add(firewall) + panorama.add(firewall._fw) else: firewall = FirewallProxy( hostname=address, api_password=password, api_username=username, vsys=vsys @@ -79,7 +80,8 @@ check_node = CheckFirewall(firewall) checks = [ - "device_root_certificate_issue" + "device_root_certificate_issue", + "check_cdss_and_panorama_certificate_issue" ] check_health = check_node.run_health_checks( diff --git a/panos_upgrade_assurance/check_firewall.py b/panos_upgrade_assurance/check_firewall.py index e311cad..e2bdf5e 100644 --- a/panos_upgrade_assurance/check_firewall.py +++ b/panos_upgrade_assurance/check_firewall.py @@ -105,7 +105,10 @@ def __init__(self, node: FirewallProxy, skip_force_locale: Optional[bool] = Fals CheckType.JOBS: self.check_non_finished_jobs, } - self._health_check_method_mapping = {HealthType.DEVICE_ROOT_CERTIFICATE_ISSUE: self.check_device_root_certificate_issue} + self._health_check_method_mapping = { + HealthType.DEVICE_ROOT_CERTIFICATE_ISSUE: self.check_device_root_certificate_issue, + HealthType.DEVICE_CDSS_AND_PANORAMA_CERTIFICATE_ISSUE: self.check_cdss_and_panorama_certificate_issue, + } if not skip_force_locale: locale.setlocale( @@ -1471,7 +1474,14 @@ def check_cdss_and_panorama_certificate_issue(self): reboot_time = self._node.get_system_time_rebooted() if reboot_time < fixed_content_version_release_date: result.reason = "Device is running fixed Content but still requires a restart for the fix to take " "effect." + return result else: result.status = CheckStatus.SUCCESS + return result + + result.reason = ( + "Device is running a software version, and a content version, that is affected by the 2024 certificate" + " expiration, the first of which will occur on the 7th of April, 2024." + ) return result diff --git a/panos_upgrade_assurance/utils.py b/panos_upgrade_assurance/utils.py index b94d498..90c80f3 100644 --- a/panos_upgrade_assurance/utils.py +++ b/panos_upgrade_assurance/utils.py @@ -63,6 +63,7 @@ class HealthType: """ DEVICE_ROOT_CERTIFICATE_ISSUE = "device_root_certificate_issue" + DEVICE_CDSS_AND_PANORAMA_CERTIFICATE_ISSUE = "check_cdss_and_panorama_certificate_issue" class CheckStatus(Enum):