Skip to content

Instantly share code, notes, and snippets.

@underscorephil
Created October 3, 2014 02:04
Show Gist options
  • Save underscorephil/5656f23edfddd51a54e3 to your computer and use it in GitHub Desktop.
Save underscorephil/5656f23edfddd51a54e3 to your computer and use it in GitHub Desktop.
import SoftLayer.API
from pprint import pprint as pp
api_username = ''
api_key = ''
hostname = 'pjackson-video'
domain_name = 'example.com'
client = SoftLayer.Client(
username=api_username,
api_key=api_key,
)
guest = {}
guest['startCpus'] = 1
guest['maxMemory'] = 1024
guest['localDiskFlag'] = False
guest['hostname'] = hostname
guest['domain'] = domain_name
guest['hourlyBillingFlag'] = False
guest['blockDeviceTemplateGroup'] = {'globalIdentifier': "87a000bd-a3c9-40fc-9b5e-2172f3a8eed3"}
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