Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

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
You can’t perform that action at this time.