Last active
August 29, 2015 14:01
-
-
Save chechuironman/bfd2303a941627eee37c to your computer and use it in GitHub Desktop.
push user data to a server
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 | |
################################################################################## | |
# Push user data to a VM | |
# ©Copyright IBM Corporation 2014. | |
# LICENSE: MIT (http://opensource.org/licenses/MIT) | |
# gems used: | |
# rubygems, softlayer-api | |
################################################################################## | |
require 'rubygems' | |
require 'softlayer_api' | |
$SL_API_USERNAME = "xxxx" # enter your username here | |
$SL_API_KEY = "xxxx" # enter your apiKey here | |
vm = SoftLayer::Service.new("SoftLayer_Virtual_Guest") | |
testdata=[ "data_here_1 "] | |
vm.object_with_id(server_id).setUserMetadata(testdata) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment