I am using the Softlayer API and a python script to order virtual machines within my SL account. Within the script I define a VLAN in which the machines should be placed. Within
“Currently setting a Vlan, using the placeOrder method, can only be made by using only the property ‘hardware’ (instead of using ‘virtualGuests’ property) please make the following change to your python script:
'hardware': [
{'hostname': 'test1', 'domain': 'mydomain.com', 'privateNetworkOnlyFlag': True, 'primaryBackendNetworkComponent': {'networkVlanId': 1706321 }}
],
and use the “verifyOrder” method before executing the script, in order to verify that the vlan was assigned successfully.
You may verify what’s mentioned before by exchanging the mentioned properties (‘virtualGuests’ vs ‘hardware’) and check the results for these properties after the order was placed (use verifyOrder for this).”