Created
May 20, 2014 16:13
-
-
Save underscorephil/17a8e84f79b7f3683e38 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client = SoftLayer.Client( | |
username=api_username, | |
api_key=api_key | |
) | |
guest = { | |
"complexType": "SoftLayer_Virtual_Guest", | |
"hostname": "userdatatest", | |
"domain": "example.com", | |
"startCpus": 1, | |
"dedicatedAccountHostOnlyFlag": True, | |
"maxMemory": 1024, | |
"operatingSystemReferenceCode": "UBUNTU_12_64", | |
"hourlyBillingFlag": True, | |
"localDiskFlag": False, | |
"networkComponents": [{"maxSpeed": "100"}], | |
"blockDevices": [{"device": "0", "diskImage": {"capacity": "25"}}], | |
"datacenter": {"name": "wdc01"}, | |
"userData": [ | |
{ | |
"value": "{'testing': [{'user': 'data'}]}" | |
} | |
] | |
} | |
result = client['Virtual_Guest'].createObject(guest) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment