如何使用softlayer python API从flex图像配置每小时裸机服务器

时间:2017-07-25 21:42:17

标签: ibm-cloud-infrastructure

我碰到了这篇文章:https://sldn.softlayer.com/blog/phil/Dedicated-server-ordering-Flex-Image-and-Python 但是从2012年开始,Softlayer API从那时起已经取得了进展,它并没有表明如何配置到每小时服务器上。

有办法做到这一点吗?是否有更新的供应到月度服务器的方式(不使用价格)

由于 格雷厄姆

1 个答案:

答案 0 :(得分:0)

这里的基础知识没有变化你可以看到有关订单和价格的日期文章:

http://sldn.softlayer.com/blog/cmporter/Location-based-Pricing-and-You http://sldn.softlayer.com/blog/bpotter/going-further-softlayer-api-python-client-part-3

要订购每小时裸机服务器,您需要选择每小时价格,您可以知道,如果价格包含“hourlyRecurringFee”属性,如果价格不包含该物业,则每小时收取价格。

订购每小时服务器的另一种方法是使用: https://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/createObject https://sldn.softlayer.com/reference/services/SoftLayer_Hardware_Server/createObject方法

您可以在这些文章中看到更多信息: http://sldn.softlayer.com/blog/bpotter/ordering-bare-metal-servers-using-softlayer-api http://sldn.softlayer.com/blog/phil/getting-started-ccis

如果您查看有关https://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/createObject方法的文档,您会看到为了设置图像模板,您只需要配置属性:

"blockDeviceTemplateGroup": {
"globalIdentifier": "07beadaa-1e11-476e-a188-3f7795feb9fb"
}

这将创建一个CCI服务器,但是如果要创建裸机服务器,则需要使用https://sldn.softlayer.com/reference/services/SoftLayer_Hardware_Server/createObject方法,但如果要创建此方法,则无法设置图像模板a具有flex图像的裸金属服务器,您需要使用placeOrder方法(使用价格的方法)