Building on the answer to this question:
Error when using SoftLayer Ruby API to specific additional disks with a virtual server
I have converted my script to use placeOrder and have gotten it to work with a single disk but I am still stuck on how I go about specifying a 2nd disk. This code is my attempt at specifying two disks:
#!/usr/bin/ruby
require 'softlayer_api'
client = SoftLayer::Client.new(username: 'USER', api_key: 'APIKEY')
productOrder = {
'virtualGuests' => [{
'hostname' => 'test',
'domain' => 'mycompany.com',
'primaryBackendNetworkComponent' => { 'networkVlan' => { 'id' => XXXXX } }
}],
'location' => XXXXX,
'packageId' => 46,
'imageTemplateId' => XXXXX,
'useHourlyPricing' => true,
'prices' => [
{'id' => 26125 }, # 1 x 2.0 GHz Core
{'id' => 32597 }, # 1 GB RAM
{'id' => 23065 }, # 100 GB (SAN)
{'id' => 23065 }, # 100 GB (SAN)
{'id' => 34183 }, # 0 GB Bandwidth
{'id' => 24713 }, # 1 Gbps Public & Private Network Uplinks
{'id' => 34807 }, # 1 IP Address
{'id' => 33483 }, # Unlimited SSL VPN Users & 1 PPTP VPN User per account
{'id' => 34241 }, # Host Ping and TCP Service Monitoring
{'id' => 32500 }, # Email and Ticket
{'id' => 35310 }, # NESSUS_VULNERABILITY_ASSESSMENT_REPORTING
{'id' => 23070 }, # REBOOT_REMOTE_CONSOLE
{'id' => 32627 } # AUTOMATED_NOTIFICATION
]
}
order = client['Product_Order'].verifyOrder(productOrder) here
but it produces the error:
/usr/lib64/ruby/2.1.0/xmlrpc/client.rb:271:in `call': No disk categories available for price with id 23065. (XMLRPC::FaultException)
from /usr/lib64/ruby/gems/2.1.0/gems/softlayer_api-3.0.0/lib/softlayer/Service.rb:281:in `call_softlayer_api_with_params'
from /usr/lib64/ruby/gems/2.1.0/gems/softlayer_api-3.0.0/lib/softlayer/Service.rb:210:in `method_missing'
from ./slt:66:in `<main>'
How do I go about specifying the second disk in my order for a virtual server?