Open Buhrietoe opened 9 years ago
To create a Virtual_Guest with the perl client, you are going to need to bless it into the slapi::SoftLayer_Virtual_Guest class.
bless($myGuest,'slapi:SoftLayer_Virtual_Guest');
my $orderRet = $client->createObject($myGuest);
Using the following guest definition and createObject call results in an HTTP 500 Internal Error:
my $client = SoftLayer::API::SOAP->new('SoftLayer_Virtual_Guest', undef, $api_username, $api_key); my $myGuest = { hostname => 'sl-test', domain => 'softlayer.com', startCpus => 1, maxMemory => 1024, hourlyBillingFlag => 1, localDiskFlag => 1, operatingSystemReferenceCode => 'CENTOS_6_64', datacenter => { name => "SJC01", } }; my $orderRet = $client->createObject($myGuest);