Created
August 25, 2012 18:43
-
-
Save notxarb/3469088 to your computer and use it in GitHub Desktop.
softlayer server order
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hardware = [ | |
{ | |
"hostname"=> 'host1', | |
"domain"=> 'somewhere.com', | |
'hardDrives' => [ | |
{ | |
'complexType' => 'SoftLayer_Hardware_Component_HardDrive', | |
'partitions' => [ | |
{ | |
'name' => '/boot', | |
'minimumSize' => '1' | |
}, | |
{ | |
'name' => '/', | |
'minimumSize' => '25' | |
}, | |
{ | |
'name' => '/data', | |
'minimumSize' => '1', | |
'grow' => '1' | |
}, | |
{ | |
'name' => '/swap0', | |
'minimumSize' => '16' | |
} | |
] | |
} | |
] | |
} | |
] | |
template = { | |
"hardware" => hardware, | |
"packageId"=>142, | |
"postTaxRecurring"=>"0", | |
"postTaxSetup"=>"0", | |
"preTaxRecurring"=>"0", | |
"preTaxSetup"=>"0", | |
"prices"=>[], | |
"primaryDiskPartitionId"=>1, | |
"proratedInitialCharge"=>"0", | |
"proratedOrderTotal"=>"0", | |
"sendQuoteEmailFlag"=>nil, | |
"totalRecurringTax"=>"0", | |
"totalSetupTax"=>"0", | |
"location"=>138124, | |
"quantity"=>1, | |
"complexType"=>"SoftLayer_Container_Product_Order_Hardware_Server" | |
} | |
prices = [ | |
17146, # "Single Processor Hex Core Xeon 2620 - 2.00GHz (Sandy Bridge) - 1 x 15MB cache" | |
17151, # "16 GB DDR3 Registered 1333" | |
2314, # "2000 Mbps Public & Private Networks" | |
938, # "500GB SATA II" | |
1268, # "500GB SATA II" | |
795, # "500GB SATA II" | |
795, # "500GB SATA II" | |
880, # "RAID 10" | |
58, # "Automated Notification" | |
126, # "3000 GB Bandwidth" | |
683, # "CentOS 5 (64 bit)" | |
21, # "1 IP Address" | |
51, # "1 GB Lockbox" | |
55, # "Host Ping" | |
57, # "Email and Ticket" | |
420, # "Unlimited SSL VPN Users & 1 PPTP VPN User per account" | |
418, # "Nessus Vulnerability Assessment & Reporting" | |
906 # "Reboot / KVM over IP" | |
] | |
prices.each { |price| template["prices"] << {"id" => price} } | |
softlayer_product_order = SoftLayer::Service.new("SoftLayer_Product_Order") | |
softlayer_product_order.verifyOrder( template ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment