REST:关于从 Softaleyr API 收集固件版本详细信息的建议
REST : suggestions on collecting firmware version details from Softaleyr API
有没有什么方法可以使用 slcli
命令行或任何其他 API 方法从所有裸机服务器收集固件版本?
我已经浏览过以下链接
https://softlayer.github.io/reference/softlayerapi/
https://softlayer.github.io/reference/datatypes/SoftLayer_Hardware_Component_Firmware/
但这对我帮助不大,因为我是 API 脚本编写的新手。
SLCLI只允许更新固件,但你应该可以使用rest、soap、xmlrpc、python、ruby、java、go等,或任何其他支持的语言通过 object-masks.
检索此数据
尝试使用以下 REST 调用,它应该检索裸机服务器的固件信息:
https://[unserName]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Hardware_Server/[baremetalID]/getObject?objectMask=mask[components[hardwareComponentModel[firmwares],revision.firmware]]
使用您自己的信息更改 [unserName]、[apiKey] 和 [baremetalID]。
对于所有硬件设备入账户:
https://[userName]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Account/getHardware?objectMask=mask[id,fullyQualifiedDomainName,components[hardwareComponentModel[firmwares],revision.firmware]]
https://softlayer.github.io/reference/services/SoftLayer_Hardware_Server/getObject
https://softlayer.github.io/reference/services/SoftLayer_Hardware_Server/getComponents
https://softlayer.github.io/reference/services/SoftLayer_Account/getHardware
https://softlayer.github.io/reference/datatypes/SoftLayer_Hardware/#components
https://softlayer.github.io/reference/datatypes/SoftLayer_Hardware_Server/#components
https://softlayer.github.io/reference/datatypes/SoftLayer_Hardware_Component/
有没有什么方法可以使用 slcli
命令行或任何其他 API 方法从所有裸机服务器收集固件版本?
我已经浏览过以下链接
https://softlayer.github.io/reference/softlayerapi/
https://softlayer.github.io/reference/datatypes/SoftLayer_Hardware_Component_Firmware/
但这对我帮助不大,因为我是 API 脚本编写的新手。
SLCLI只允许更新固件,但你应该可以使用rest、soap、xmlrpc、python、ruby、java、go等,或任何其他支持的语言通过 object-masks.
检索此数据尝试使用以下 REST 调用,它应该检索裸机服务器的固件信息:
https://[unserName]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Hardware_Server/[baremetalID]/getObject?objectMask=mask[components[hardwareComponentModel[firmwares],revision.firmware]]
使用您自己的信息更改 [unserName]、[apiKey] 和 [baremetalID]。
对于所有硬件设备入账户:
https://[userName]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Account/getHardware?objectMask=mask[id,fullyQualifiedDomainName,components[hardwareComponentModel[firmwares],revision.firmware]]
https://softlayer.github.io/reference/services/SoftLayer_Hardware_Server/getObject https://softlayer.github.io/reference/services/SoftLayer_Hardware_Server/getComponents https://softlayer.github.io/reference/services/SoftLayer_Account/getHardware https://softlayer.github.io/reference/datatypes/SoftLayer_Hardware/#components https://softlayer.github.io/reference/datatypes/SoftLayer_Hardware_Server/#components https://softlayer.github.io/reference/datatypes/SoftLayer_Hardware_Component/