Skip to content

Instantly share code, notes, and snippets.

@hassenius
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hassenius/10728568 to your computer and use it in GitHub Desktop.
Save hassenius/10728568 to your computer and use it in GitHub Desktop.
SoftLayer Order single RAID group
################################################################################
# order_single_raid_group.rb
# ©Copyright IBM Corporation 2014.
#
# LICENSE: MIT (http://opensource.org/licenses/MIT)
################################################################################
require 'rubygems'
require 'softlayer_api'
$SL_API_USERNAME = " PLEASE SET ME "
$SL_API_KEY = " PLEASE SET ME TOO "
client = SoftLayer::Service.new("SoftLayer_Product_Order");
order = {
:complexType => 'SoftLayer_Container_Product_Order_Hardware_Server',
:quantity => 1,
:hardware => [{:hostname => 'raidtest', :domain => 'example.com'}],
:location => 168642, # San Jose 1
:packageId => 53, # Intel Xeon 3200 Series
:prices => [
{:id => 2050}, # Single Processor Quad Core Xeon 3460 - 2.80GHz (Lynnfield) - 1 x 8MB cache w/HT
{:id => 17438}, # -- Ubuntu Linux 12.04.0 LTS Precise Pangolin - Minimal Install (64 bit)
{:id => 21004}, # 4 GB DDR3 Registered 1333
{:id => 880}, # Disk controller -- RAID 10
{:id => 1257}, # First hard drive -- 147GB SA-SCSI 10K RPM
{:id => 1256}, # Second hard drive -- 147GB SA-SCSI 10K RPM
{:id => 825}, # Third hard drive -- 147GB SA-SCSI 10K RPM
{:id => 825}, # Fourth hard drive -- 147GB SA-SCSI 10K RPM
{:id => 728}, # 0 GB Bandwidth
{:id => 898}, # 100 Mbps Private Network
{:id => 906}, # Reboot / KVM over IP
{:id => 420}, # Unlimited SSL VPN Users & 1 PPTP VPN User per account
{:id => 55}, # Host Ping
{:id => 418}, # Nessus Vulnerability Assessment & Reporting
{:id => 57}, # Notification -- Email and Ticket
{:id => 58} # Response -- Automated Notification
]
}
result = client.verifyOrder(order)
## Uncomment when you are ready to order
# client.placeOrder(order)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment