0

I usually use Product_Order.placeOrder to order a VSI with a param of order_config_template. For example, I can use the flowing order_config_template to order a 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

So, my question are: a. Which api can helps to get the vlans of a region. b. How can I specify the vlan(set the vlan option to the order_config_template) when I call Product_Order.placeOrder?

Lippman S
  • 15
  • 3

1 Answers1

0

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

And for placeOrder here you can see the valid way to declare the VLANs

Part of Softlayer bulk VMI order gets provisioned into wrong VLAN despite specified