Created
May 21, 2014 22:06
-
-
Save chechuironman/272a74e41b2514f1d06f to your computer and use it in GitHub Desktop.
Create CCI using createObject with userData
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
#!/usr/bin/ruby | |
################################################################################## | |
# Create CCI with user data using createObject | |
# ©Copyright IBM Corporation 2014. | |
# LICENSE: MIT (http://opensource.org/licenses/MIT) | |
# gems used: | |
# rubygems, softlayer-api | |
################################################################################## | |
virtual_guest = SoftLayer::Service.new("SoftLayer_Virtual_Guest") | |
template={ | |
'hostname' => 'userdatacreateobject', | |
'domain' => 'chechu.com', | |
'startCpus' => 12, | |
'maxMemory' => 2048, | |
'hourlyBillingFlag' => true, | |
'operatingSystemReferenceCode' => 'UBUNTU_LATEST', | |
'localDiskFlag' => true, | |
'userData'=> [{"value"=>"test user data","type"=>{"keyname"=>"USER_DATA","name"=>"User Data"}}] | |
} | |
pp virtual_guest.createObject(template) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment