Skip to content

Instantly share code, notes, and snippets.

@underscorephil
Created December 17, 2012 14:45
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save underscorephil/4318794 to your computer and use it in GitHub Desktop.
Save underscorephil/4318794 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'softlayer_api'
$SL_API_USERNAME = "" # enter your username here
$SL_API_KEY = ""
virtual_guest_service = SoftLayer::Service.new("SoftLayer_Virtual_Guest")
begin
templateObject = {
'complexType' => "SoftLayer_Virtual_Guest",
'hostname' => 'test1',
'domain' => 'example.com',
'startCpus' => 1,
'maxMemory' => 1024,
'hourlyBillingFlag' => true,
'operatingSystemReferenceCode' => 'UBUNTU_LATEST',
'localDiskFlag' => false
}
result virtual_guest_service.createObject(templateObject);
puts result.inspect
rescue => e
$stdout.print(e.inspect)
end
@seelam
Copy link

seelam commented Dec 15, 2013

result virtual_guest_service.createObject(templateObject);

should be

result = virtual_guest_service.createObject(templateObject);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment