Skip to content

Instantly share code, notes, and snippets.

@underscorephil
Created April 24, 2014 21:42
Show Gist options
  • Save underscorephil/11270561 to your computer and use it in GitHub Desktop.
Save underscorephil/11270561 to your computer and use it in GitHub Desktop.
import SoftLayer.API
from pprint import pprint as pp
api_username = ''
api_key = ''
quote_id = 1234
client = SoftLayer.Client(
username=api_username,
api_key=api_key,
)
def getOrderContainer(quote_id):
container = client['Billing_Order_Quote'].getRecalculatedOrderContainer( \
id=quote_id)
return container['orderContainers'][0]
container = getOrderContainer(quote_id)
order = {}
order['complexType'] = 'Container_Product_Order_Virtual_Guest'
order['hardware'] = [{'hostname': 'quotetest', 'domain': 'example.com'}]
order['quanity'] = 1
result = client['Billing_Order_Quote'].placeOrder(order, id=quote_id)
pp(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment