Last active
August 29, 2015 13:58
-
-
Save hassenius/10402769 to your computer and use it in GitHub Desktop.
Upgrade CCI
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
################################################################################ | |
# upgrade_cci.rb | |
# ©Copyright IBM Corporation 2014. | |
# | |
# LICENSE: MIT (http://opensource.org/licenses/MIT) | |
################################################################################ | |
require 'rubygems' | |
require 'softlayer_api' | |
$SL_API_USERNAME = "set me" | |
$SL_API_KEY = "set me" | |
virtualGuestId = " set me " | |
client = SoftLayer::Service.new("SoftLayer_Product_Order") | |
orderContainer = { | |
:complexType => "SoftLayer_Container_Product_Order_Virtual_Guest_Upgrade", | |
:virtualGuests => [{ :id => virtualGuestId}], | |
:prices => [ | |
## RAM Upgrades, uncomment the desired one | |
# {:id => 1644} # 1 GB RAM | |
# {:id => 1645} # 2 GB RAM | |
# {:id => 1646} # 4 GB RAM | |
# {:id => 2238} # 6 GB RAM | |
# {:id => 1647} # 8 GB RAM | |
# {:id => 2243} # 12 GB RAM | |
# {:id => 1927} # 16 GB RAM | |
# {:id => 21275} # 32 GB RAM | |
# {:id => 22422} # 48 GB RAM | |
# {:id => 37042} # 64 GB RAM | |
## CPU Upgrades, uncomment the desired one | |
# {:id => 1962} # Private 1 x 2.0 GHz Core | |
# {:id => 1963} # Private 2 x 2.0 GHz Cores | |
# {:id => 1964} # Private 4 x 2.0 GHz Cores | |
# {:id => 1965} # Private 8 x 2.0 GHz Cores | |
# {:id => 2156} # 1 x 2.0 GHz Internal Core | |
# {:id => 1640} # 1 x 2.0 GHz Core | |
# {:id => 1641} # 2 x 2.0 GHz Cores | |
# {:id => 1642} # 4 x 2.0 GHz Cores | |
# {:id => 1643} # 8 x 2.0 GHz Cores | |
# {:id => 2231} # 12 x 2.0 GHz Cores | |
# {:id => 2235} # 16 x 2.0 GHz Cores | |
], | |
:properties => [{ :name => 'MAINTENANCE_WINDOW', :value => Time.now.to_s }] | |
} | |
client.verifyOrder(orderContainer) | |
# client.placeOrder(orderContainer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment