I am working on a CLI to update our server firmware for user-specified hardware components. Here's the function I am working with:
def update_firmware(client, fqdn, ipmi=False, raid_controller=False,
bios=False, hard_drive=False):
"""Update firmware on selected components."""
machine_summary = get_machine_summary(client, fqdn)
try:
hardware_mgr = SoftLayer.managers.hardware.HardwareManager(client)
hardware_mgr.update_firmware(machine_summary["id"], ipmi,
raid_controller, bios, hard_drive)
except SoftLayer.exceptions.SoftLayerAPIError as e:
LOG.warn("SoftLayer API Error: %s", e)
The problem I am having is that regardless of what input the user provides, the transaction takes around one hour to complete. This even includes when I pass False to all of the component values. I can even reproduce this behavior using SoftLayer's own CLI:
slcli call-api --id $id Hardware_Server createFirmwareUpdateTransaction 0 0 0 0
Can anyone help clarify what I am doing incorrectly here? My slcli version is v5.2.0. I have also tried passing 0 / 1 instead of False / True in my function. How can I update firmware on individual pieces of hardware? In the past we have had issues with buffer overflow bugs on the raid controller as an example of why I am looking to do this with specific pieces.
API doc reference: https://softlayer.github.io/python/update_firmware/
After some back and forth with the API support, the answer came out to be that there are inventory checks that are done even if you do not specify a component to update firmware on. None of the components are updated, but the host still goes down to perform these checks.