This file contains hidden or 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
require 'fog' | |
config = {} | |
config[:rackspace] = { | |
:provider => 'rackspace', | |
:version => :v2, | |
:rackspace_username => USERNAME, | |
:rackspace_api_key => API_KEY, | |
:rackspace_region => :ord, | |
} |
This file contains hidden or 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
Shindo.tests('Fog::Rackspace::Monitoring | agent_tests', ['rackspace','rackspace_monitoring']) do | |
account = Fog::Rackspace::Monitoring.new | |
agent_token = nil | |
options = { "label" => "Bar" } | |
tests('success') do | |
tests('#create new agent token').formats(DATA_FORMAT) do | |
response = account.create_agent_token(options).data | |
agent_token = response[:headers]["X-Object-ID"] | |
response |
This file contains hidden or 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/env ruby | |
# This example demonstrates creating a server with the Rackpace Open Cloud | |
require 'rubygems' #required for Ruby 1.8.x | |
require 'fog' | |
require "base64" #required to encode files for personality functionality | |
def get_user_input(prompt) | |
print "#{prompt}: " |
This file contains hidden or 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
1 GB Performance | |
2 GB Performance | |
4 GB Performance | |
8 GB Performance | |
120 GB Performance | |
15 GB Performance | |
30 GB Performance | |
60 GB Performance | |
90 GB Performance |
This file contains hidden or 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
1.9.3@rumm:~ [master*]$ rumm login | |
Username: raxkrames | |
Password: | |
Default Region (Enter for ord): | |
logged in as raxkrames, credentials written to ~/.rummrc | |
1.9.3@rumm:~ [master*]$ | |
1.9.3@rumm:~ [master*]$ rumm version | |
0.0.24 |
This file contains hidden or 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
Fog::Storage[:hp] | object requests (hp, storage) | |
success | |
#put_object('fogobjecttests', 'fog_object') + succeeds | |
#get_object('fogobjecttests', 'fog_object') + succeeds | |
#get_object('fogobjecttests', 'fog_object', &block) + returns "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." | |
#head_object('fogobjecttests', 'fog_object') + succeeds | |
#get_object_temp_url('fogobjecttests', 'fog_object', 60, 'GET') + succeeds | |
#put_object('fogobjecttests', 'fog_other_object', nil, {'X-Copy-From' => '/fogobjecttests/fog_object'}) + succeeds | |
#put_object('fogobjecttests2', 'fog_another_object' |
This file contains hidden or 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
function fpr { | |
git branch -D pr_$1 2> /dev/null | |
git fetch upstream pull/$1/head:pr_$1 | |
git checkout pr_$1 | |
} |
This file contains hidden or 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
# require the Fog library | |
require 'fog' | |
# Create a service object to access Cloud Files | |
service = Fog::Storage.new :provider => 'rackspace', | |
:rackspace_username => USER, # replace USER with your username | |
:rackspace_api_key => API_KEY, # replace API_KEY with your key | |
:rackspace_region => :ord # We are using the Chicago data center, by default Fog will use the Dallas data center | |
# Create a container - Note that Fog refers to containers as directories |
This file contains hidden or 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
service = Fog::Storage.new({ | |
:provider => 'Rackspace', # Rackspace Fog provider | |
:rackspace_username => RACKSPACE_USER_NAME, # Your Rackspace Username | |
:rackspace_api_key => RACKSPACE_API, # Your Rackspace API key | |
:rackspace_region => :syd | |
}) |
This file contains hidden or 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
1.9.3@fog_dev:fog [pr_2120]$ bundle exec shindo tests/rackspace/models/auto_scale/* | |
[WARNING] Unsupported StormOnDemand service: network | |
[WARNING] Unsupported StormOnDemand service: storage | |
[WARNING] Unsupported StormOnDemand service: dns | |
[WARNING] Unsupported StormOnDemand service: billing | |
[WARNING] Unsupported StormOnDemand service: monitoring | |
[WARNING] Unsupported StormOnDemand service: support | |
[WARNING] Unsupported StormOnDemand service: account | |
[WARNING] Unsupported StormOnDemand service: vpn | |
Skipping tests for aws due to lacking credentials (add some to '/Users/kyle.rames/Projects/fog/tests/.fog' to run them) |