Skip to content

Instantly share code, notes, and snippets.

@underscorephil
Created June 20, 2014 15:35
Show Gist options
  • Save underscorephil/7c436fa3bca8b374abda to your computer and use it in GitHub Desktop.
Save underscorephil/7c436fa3bca8b374abda to your computer and use it in GitHub Desktop.
import SoftLayer.API
from pprint import pprint as pp
apiUsername = ''
apiKey = ''
client = SoftLayer.Client(
username=apiUsername,
api_key=apiKey,
)
prices = [
{'id': 1353}, # 20 GB iSCSI SAN Snapshot Space
]
order = {
'complexType': 'SoftLayer_Container_Product_Order_Network_Storage_Iscsi_SnapshotSpace',
'prices': prices,
'location': 138124, # Dal05
'packageId': 0,
'volumeId': 1234 # iSCSI Volume ID
}
result = client['SoftLayer_Product_Order'].placeOrder(order)
pp(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment