Last active
October 13, 2015 23:18
-
-
Save underscorephil/4271418 to your computer and use it in GitHub Desktop.
This file contains 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
# So we can talk to the SoftLayer API: | |
import SoftLayer | |
# For nice debug output: | |
from pprint import pprint as pp | |
# Your SoftLayer API username and key. | |
# | |
# Generate an API key at the SoftLayer Customer Portal: | |
# https://manage.softlayer.com/Administrative/apiKeychain | |
apiUsername = '' | |
apiKey = '' | |
client = SoftLayer.Client(username=apiUsername, api_key=apiKey) | |
newCCI = { | |
'hostname': 'test1', | |
'domain': 'example.com', | |
'startCpus': 1, | |
'maxMemory': 1024, | |
'hourlyBillingFlag': 'true', | |
'operatingSystemReferenceCode': 'UBUNTU_LATEST', | |
'localDiskFlag': 'false' | |
} | |
result = client['Virtual_Guest'].createObject(newCCI) | |
pp(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment