简体   繁体   English

Softlayer API:如何在下订单VSI时指定VLAN选择

[英]Softlayer api: how to specify VLAN Selection when place order VSI

I usually use Product_Order.placeOrder to order a VSI with a param of order_config_template. 我通常使用Product_Order.placeOrder来订购带有order_config_template参数的VSI。 For example, I can use the flowing order_config_template to order a 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
}.

Now I need to specify the vlan of VSI like ordering on the portal as flows: VLAN Selection When Order A VSI 现在,我需要指定VSI的VLAN,例如在门户网站上作为流进行订购订购A VSI时的VLAN选择

So, my question are: a. 因此,我的问题是: Which api can helps to get the vlans of a region. 哪个API可以帮助获取某个地区的VLAN。 b. How can I specify the vlan(set the vlan option to the order_config_template) when I call Product_Order.placeOrder? 调用Product_Order.placeOrder时如何指定VLAN(将vlan选项设置为order_config_template)?

I am not sure if you are using the placeOrder method because your code does not like a valid teplate for the method, I think you are using the createObject method or the generateOrderMethod for those methods the valid way to assign the VLANs is described in its documentation please see: http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/createObject 我不确定您是否使用placeOrder方法,因为您的代码不喜欢该方法的有效teplate,我认为您使用的是createObject方法或generateOrderMethod用于这些方法,因此分配VLAN的有效方法在其文档中有所描述。请参阅: http : //sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/createObject

And for placeOrder here you can see the valid way to declare the VLANs 对于此处的placeOrder,您可以看到声明VLAN的有效方法

Part of Softlayer bulk VMI order gets provisioned into wrong VLAN despite specified 尽管已指定,但部分Softlayer批量VMI订单已置备到错误的VLAN中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM