我正在使用CLI更新用戶指定硬件組件的服務器固件。下面是我一起工作的功能:SoftLayer createFirmwareUpdateTransaction似乎忽略我的輸入
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)
我遇到的問題是,不管是什麼輸入用戶提供,該交易大約需要一小時內完成。這甚至包括當我將False傳遞給所有組件值時。我甚至可以使用SoftLayer的自己CLI重現此問題:
slcli call-api --id $id Hardware_Server createFirmwareUpdateTransaction 0 0 0 0
誰能幫助澄清我在做什麼錯誤嗎?我的slcli版本是v5.2.0。我也嘗試在我的函數中傳遞0/1而不是False/True。如何更新個別硬件上的固件?過去,我們在RAID控制器上遇到了緩衝區溢出問題,作爲我爲什麼要使用特定部分來做這件事的一個例子。
API文檔參考:https://softlayer.github.io/python/update_firmware/