-
Notifications
You must be signed in to change notification settings - Fork 35
Description
I am trying to order a bare metal server with package id 51 in london data center
First I take all the defaults
D, [2014-09-16T12:15:38.798833 #3168] DEBUG -- esxi: Configuration with default options:
D, [2014-09-16T12:15:38.798833 #3168] DEBUG -- esxi: server no default
D, [2014-09-16T12:15:38.798833 #3168] DEBUG -- esxi: os CentOS 6.x (64 bit) 25663
D, [2014-09-16T12:15:38.798833 #3168] DEBUG -- esxi: ram 4 GB DDR3 Registered 1333 23132
D, [2014-09-16T12:15:38.798833 #3168] DEBUG -- esxi: disk_controller Non-RAID 32927
D, [2014-09-16T12:15:38.798833 #3168] DEBUG -- esxi: disk0 500GB SATA II 27537
D, [2014-09-16T12:15:38.798833 #3168] DEBUG -- esxi: bandwidth 20000 GB Bandwidth 33867
D, [2014-09-16T12:15:38.798833 #3168] DEBUG -- esxi: port_speed 100 Mbps Public & Private Network Uplinks 26737
D, [2014-09-16T12:15:38.798833 #3168] DEBUG -- esxi: remote_management Reboot / KVM over IP 25014
D, [2014-09-16T12:15:38.798833 #3168] DEBUG -- esxi: pri_ip_addresses 1 IP Address 34807
D, [2014-09-16T12:15:38.799833 #3168] DEBUG -- esxi: monitoring Host Ping 27023
D, [2014-09-16T12:15:38.799833 #3168] DEBUG -- esxi: notification Email and Ticket 32500
D, [2014-09-16T12:15:38.799833 #3168] DEBUG -- esxi: response Automated Notification 32627
D, [2014-09-16T12:15:38.799833 #3168] DEBUG -- esxi: vpn_management Unlimited SSL VPN Users & 1 PPTP VPN User per account 33483
D, [2014-09-16T12:15:38.799833 #3168] DEBUG -- esxi: vulnerability_scanner Nessus Vulnerability Assessment & Reporting 35310
Then I add
server price_id 28103 Single Processor Quad Core Xeon 3450 - 2.66GHz (Lynnfield) - 1 x 8MB cache w/HT
ram 30436 24 GB DDR3 Registered 1333
bandwidth 33867 20000 GB Bandwidth
port speed 24713 1 Gbps Public & Private Network Uplinks
Here is the final data structure
{"packageId"=>51,
"useHourlyPricing"=>false,
"hardware"=>{"hostname"=>"esxi-fast", "domain"=>"pureapp.ibmcloud.com"},
"location"=>358694,
"prices"=>
[{"id"=>28103},
{"id"=>30463},
{"id"=>30436},
{"id"=>32927},
{"id"=>27537},
{"id"=>33867},
{"id"=>24713},
{"id"=>25014},
{"id"=>34807},
{"id"=>27023},
{"id"=>32500},
{"id"=>32627},
{"id"=>33483},
{"id"=>35310}]}
Verify Order works
but on place order I get following
C:/Work/ruby-2.0.0-p481-x64-mingw32/lib/ruby/2.0.0/xmlrpc/client.rb:264:in `call': The number of server(s) (2) does not match the order quantity (1). (XMLRPC::FaultException)
Working with SL support
There is a syntax error in the data structure the "hardware"=>{"hostname"=>"esxi-fast", "domain"=>"pureapp.ibmcloud.com"} parameter should be updated to "hardware"=>[{"hostname"=>"esxi-fast", "domain"=>"pureapp.ibmcloud.com"}] since the data type of the hardware parameter is an array.
I changed BareMetalServerOrder_Package.rb to
product_order = {
'packageId' => @package.id,
'useHourlyPricing' => false,
'hardware' => [{ <------------------- Extra '['
'hostname' => @hostname,
'domain' => @domain
} ] <--------------']'
}
and it works