From c618e0528a28e09cbe6d727a927a9889d6b721f9 Mon Sep 17 00:00:00 2001 From: Alisha K Date: Wed, 12 Jul 2023 19:55:37 +0530 Subject: [PATCH] Api version check for firmware update --- examples/server_hardware_firmware_update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/server_hardware_firmware_update.py b/examples/server_hardware_firmware_update.py index 18e5cfab9..b573d3e53 100644 --- a/examples/server_hardware_firmware_update.py +++ b/examples/server_hardware_firmware_update.py @@ -73,7 +73,7 @@ firmware_update_configuration = [{"op": "replace", "value": {"baselineUri": "/rest/firmware-drivers/" + config['server_hardware']['firmware_baseline_id'], "firmwareInstallType": "FirmwareOnlyOfflineMode", "installationPolicy": "LowerThanBaseline"} }] -if server: +if server and oneview_client.api_version >= 4600: firmware_compliance = server.check_firmware_compliance(compliance_configuration) if firmware_compliance['serverFirmwareUpdateRequired']: print("Updating firmware for the server hardware..")