Skip to content

Instantly share code, notes, and snippets.

@underscorephil
Created November 27, 2013 19:15
Show Gist options
  • Save underscorephil/7681430 to your computer and use it in GitHub Desktop.
Save underscorephil/7681430 to your computer and use it in GitHub Desktop.
import SoftLayer.API
from pprint import pprint as pp
api_username = ''
api_key = ''
hostname = ''
domain_name = ''
client = SoftLayer.Client(
username=api_username,
api_key=api_key,
)
guest = {}
guest['startCpus'] = 1
guest['maxMemory'] = 2048
guest['localDiskFlag'] = False
guest['hostname'] = hostname
guest['domain'] = domain_name
guest['hourlyBillingFlag'] = True
guest['dedicatedAccountHostOnlyFlag'] = True
guest['blockDeviceTemplateGroup'] = {'globalIdentifier': "c3b2ff2a-9c59-406c-82e4-b6a7ed785c24"}
result = client['Virtual_Guest'].createObject(guest)
pp(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment