softlayer / githubio_source

Templates files for generating softlayer.github.io
Other
1 stars 11 forks source link

Feedback for python - update_firmware.py #644

Closed Sridhar002 closed 8 months ago

Sridhar002 commented 8 months ago

Feedback regarding: https://sldn.softlayer.com/python/update_firmware.py/

Hi Team,

Greetings

I was trying this script and i encounter with the below error.

ython3.11 ./1603248-update.py Unable to update the firmware: faultCode= SoftLayer_Exception_Public, faultString= Server must be offline before firmware update.

Please help me how to fix it.

allmightyspiff commented 8 months ago

Hello,

A server needs to be off before it can have its firmware updated. You can call https://sldn.softlayer.com/reference/services/SoftLayer_Hardware_Server/powerOff/ to power off a server.

In keeping with the style of the example, this would work to powerOff a server. Use the powerOn api to turn it back on.

    result = hardwareServerService.powerOff(id=hardwareId)
    pp(result)

I'll update this example later today to be more clear on that. Thanks for the question.

Sridhar002 commented 8 months ago

Thanks will look forward.