我通常使用Product_Order.placeOrder来订购带有order_config_template参数的VSI。例如,我可以使用流动的order_config_template来命令vsi:
{
'dataCenter' : 'sjc03',
'hourlyBillingFlag' : True,
'localDiskFlag' : False,
'maxMemory' : 'RAM_4_GB',
'startCpus' : 'GUEST_CORES_2',
'blockDevices' : [{
'device' : 0,
'capacity' : 25L
}
],
'publicBandwidthCapacity' : 'BANDWIDTH_0_GB_2',
'privateNetworkOnlyFlag' : False,
'imageTemplateId' : 1666xxxL,
'networkComponents' : 100,
'virtualGuests' : [{
'domain' : 'xx.com',
'hostname' : 'xx'
}
],
'imageType' : 'private',
'quantity' : 1
}.
现在我需要指定VSI的vlan,就像在门户上作为流程排序一样: VLAN Selection When Order A VSI
所以,我的问题是: 一个。哪个api可以帮助获得一个地区的vlan。 湾当我调用Product_Order.placeOrder时,如何指定vlan(将vlan选项设置为order_config_template)?
答案 0 :(得分:0)
我不确定您是否使用placeOrder方法,因为您的代码不喜欢该方法的有效teplate,我认为您正在使用createObject方法或generateOrderMethod这些方法分配VLAN的有效方法被描述在其文档中,请参阅:http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/createObject
对于placeOrder,您可以看到声明VLAN的有效方式
Part of Softlayer bulk VMI order gets provisioned into wrong VLAN despite specified