Skip to content

Instantly share code, notes, and snippets.

@underscorephil
Created June 27, 2014 18:27
Show Gist options
  • Save underscorephil/35fad55dae1a61756158 to your computer and use it in GitHub Desktop.
Save underscorephil/35fad55dae1a61756158 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]
order = getOrderContainer(quote_id)
order['hardware'] = [
{'hostname': 'quotetest1', 'domain': 'example.com'},
{'hostname': 'quotetest2', 'domain': 'example.com'},
{'hostname': 'quotetest3', 'domain': 'example.com'}
]
order['quanity'] = 3
order['presetId'] = None
result = client['Billing_Order_Quote'].verifyOrder(order, id=quote_id)
pp(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment