rax 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1980fa925f0d473cdfde05e8d77fb64b2246ffdb
4
- data.tar.gz: 5c0411055676784acd7a0a50c8fb657e86dca5c8
3
+ metadata.gz: 8539f4797a5b2915655f69c3a022328fe8d94bbc
4
+ data.tar.gz: 4ebbc2de80e03617199bad768b802ce1e13d6261
5
5
  SHA512:
6
- metadata.gz: d5a0f14df1debf9f2257ec937395f6b22f3a620cbbdf9a61cd816b8265b786d4add53f9a2a8dcb8f956a85a2ee136b48ad4d2bcaa530dde5599acce7866be6cd
7
- data.tar.gz: a02b0090cd6d440dcb22cdd5f1406b9d08d7d14aaea076190e749ff54ab831bc676d6a9799d6f7f563eb970ba6be3d87f3e6296146131882c404a9c1302b0c65
6
+ metadata.gz: b44f9b8d595df8e155217e4994646eec2969ab91eeb5d3d5812c847e5be2c1a199e9209bf3e5c42479394a17a65dc51c4d7e4f047e5efa146da2c47d68e44779
7
+ data.tar.gz: 9a150f0143fa3688e5f7ef45a42796fb36a1e5268aa8aaaf1bd3d02cefc12507d5ad5644152e83d909f14e8a4e1fc586310d8b804ef3fa869427615264377635
data/Gemfile CHANGED
@@ -3,5 +3,8 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in rax.gemspec
4
4
  gemspec
5
5
 
6
- gem 'rake'
7
- gem 'rspec'
6
+ gem "rake"
7
+ gem "rspec"
8
+ gem "rspec-given"
9
+ gem "aruba"
10
+ gem "vcr"
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Rax: lift heavy things with ease inside your Rackspace
1
+ ## Rax: a high definition command line for the rackspace API
2
2
 
3
3
  Rax is a command line interface and API to rackspace. You can use it
4
4
  to easily build and manage infrastructure for great good.
@@ -13,7 +13,13 @@ Authenticate with rackspace
13
13
  password: ****
14
14
  logged in, credentials written to ~/.netrc
15
15
 
16
-
16
+
17
+ Now we can see the list of servers we have available:
18
+
19
+ $ rax show servers
20
+ you don't have any servers, but you can create on with:
21
+ rax create server
22
+
17
23
  Create the server:
18
24
 
19
25
  rackspace create server
data/Rakefile CHANGED
@@ -2,3 +2,5 @@ require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/app.rb ADDED
@@ -0,0 +1,7 @@
1
+ require "mvcli/app"
2
+
3
+ module Rax
4
+ class App < MVCLI::App
5
+ self.root = Pathname(__FILE__).dirname
6
+ end
7
+ end
@@ -0,0 +1,25 @@
1
+ require 'net/https'
2
+ require 'json'
3
+
4
+ class AuthenticationController
5
+
6
+ requires :console
7
+
8
+ def login
9
+ # username = console.ask "username: "
10
+ # password = console.ask_passord "password:"
11
+ uri = URI('https://identity.api.rackspacecloud.com/v2.0/tokens')
12
+ req = Net::HTTP::Post.new(uri)
13
+ req['Content-Type'] = 'application/json'
14
+ req.body = {auth: {passwordCredentials: {username: username, password: password}}}.to_json
15
+ res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |https|
16
+ https.request req
17
+ end
18
+ Map(JSON.parse res.body)
19
+
20
+ end
21
+
22
+ def logout
23
+ Object.new
24
+ end
25
+ end
@@ -0,0 +1,36 @@
1
+ class ServersController < MVCLI::Controller
2
+ requires :compute
3
+
4
+ def index
5
+ compute.servers.all
6
+ end
7
+
8
+ def show
9
+ server
10
+ end
11
+
12
+ def create
13
+ options = {
14
+ name: generate_name,
15
+ flavor_id: 2,
16
+ image_id: '9922a7c7-5a42-4a56-bc6a-93f857ae2346'
17
+ }
18
+ compute.servers.create options
19
+ end
20
+
21
+ def destroy
22
+ server.tap do |s|
23
+ s.destroy
24
+ end
25
+ end
26
+
27
+ private
28
+
29
+ def server
30
+ index.find {|s| s.name == params[:id]} or fail Fog::Errors::NotFound
31
+ end
32
+
33
+ def generate_name
34
+ 'divine-reef'
35
+ end
36
+ end
@@ -0,0 +1,14 @@
1
+ require 'fog'
2
+ class ComputeProvider
3
+ requires :credentials
4
+
5
+ def value
6
+ options = {
7
+ :provider => 'Rackspace',
8
+ :rackspace_username => credentials.username,
9
+ :rackspace_api_key => credentials.api_key,
10
+ :version => :v2
11
+ }
12
+ Fog::Compute.new(options)
13
+ end
14
+ end
@@ -0,0 +1,12 @@
1
+ require 'netrc'
2
+
3
+ class CredentialsProvider
4
+
5
+ def value
6
+ if creds = Netrc.read['api.rackspace.com']
7
+ Map(username: creds.first, api_key: creds.last)
8
+ else
9
+ fail Rax::LoginRequired, "login required"
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,8 @@
1
+ match 'login' => 'authentication#login'
2
+ match 'logout' => 'authentication#logout'
3
+
4
+ match 'show servers' => 'servers#index'
5
+ match 'show server :id' => 'servers#show'
6
+ match 'create server' => 'servers#create'
7
+ match 'update server :id' => 'servers#update'
8
+ match 'destroy server :id' => 'servers#destroy'
@@ -0,0 +1,7 @@
1
+ logged in as <%= @username %>, credentials written to ~/.raxrc
2
+
3
+ dump:
4
+
5
+ <%= self.inspect %>
6
+
7
+ thanks, the mgmt.
@@ -0,0 +1 @@
1
+ logged out.
@@ -0,0 +1,2 @@
1
+ created server: <%= name %>
2
+ id: <%= id %>, password: <% password %>
@@ -0,0 +1 @@
1
+ requested destruction of server <%= name %>
@@ -0,0 +1,8 @@
1
+ <% if empty? %>
2
+ you don't have any servers, but you can create one by running:
3
+ rax create server
4
+ <% else %>
5
+ <% each do |server| %>
6
+ <%= server.name %> -> id: <%= server.id %>, status: <%= server.state %><%= "(#{server.progress}%)" unless server.state == 'ACTIVE' %>, ipv4: <%= server.ipv4_address == '' ? 'not available' : server.ipv4_address %>
7
+ <% end %>
8
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <%= name %>: <%= id %> (<%= state %>)
2
+ <%= image.name %> <%= flavor.name %>
3
+ created: <%= created %>
4
+ ipv4: <%= ipv4_address %>
5
+ ipv6: <%= ipv6_address %>
data/bin/rax ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ # -*- mode: ruby -*-
3
+
4
+ require File.expand_path '../../app', __FILE__
5
+ exit Rax::App.main
@@ -1,3 +1,3 @@
1
1
  module Rax
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -17,4 +17,8 @@ Gem::Specification.new do |spec|
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "mvcli", "~> 0.0.4"
22
+ spec.add_dependency "fog", "~> 1.11.0"
23
+ spec.add_dependency "netrc"
20
24
  end
@@ -0,0 +1,48 @@
1
+ require "spec_helper"
2
+
3
+ describe "logging in" do
4
+ before do
5
+ pending
6
+ @announce_dir = true
7
+ @announce_cmd = true
8
+ @announce_env = true
9
+ @announce_stdout = true
10
+ @announce_stderr = true
11
+ @home = Pathname(set_env "HOME", File.expand_path(current_dir))
12
+ end
13
+ describe "interactively with valid credentials" do
14
+ before do
15
+ run_interactive "rax login"
16
+ type "<username>"
17
+ type "<valid-password>"
18
+ stop_process @interactive
19
+ end
20
+ it "successfully exits" do
21
+ last_exit_status.should eq(0), "process failed"
22
+ end
23
+ it "stores the authentication information and service catalog" do
24
+ @home.join('.raxrc').should exist
25
+ access = Map(JSON.parse @home.join(".raxrc").read).access
26
+ access.user.name.should eql "cowboyd"
27
+ access.serviceCatalog.first.name.should eql "cloudServers"
28
+ end
29
+ end
30
+ describe "non-interactively" do
31
+ before do
32
+ run "rax login --username <username> --password <valid-password>"
33
+ end
34
+ it "works also" do
35
+
36
+ end
37
+ end
38
+ describe "failure to log in" do
39
+ before do
40
+ run "rax login --username <username> --password <invalid-password>"
41
+ end
42
+ it "exits with an error message an EX_NOPERM" do
43
+ last_exit_status.should eql 67
44
+ end
45
+ end
46
+
47
+ describe "with an expired auth token"
48
+ end
@@ -0,0 +1,35 @@
1
+ require "spec_helper"
2
+
3
+ describe "using the server api" do
4
+ context "with credentials are present" do
5
+ Given(:home) {Pathname(set_env "HOME", File.expand_path(current_dir))}
6
+ Given do
7
+ File.open(home.join('.netrc'), "w") do |f|
8
+ f.chmod 0600
9
+ f.puts "machine api.rackspace.com"
10
+ f.puts " login #{ENV['RACKSPACE_LOGIN'] || '<rackspace-username>'}"
11
+ f.puts " password #{ENV['RACKSPACE_API_TOKEN'] || '<rackspace-api-token>'}"
12
+ end
13
+ end
14
+ context "when I list all my servers (and I don't have any')" do
15
+ When {VCR.use_cassette('show-servers') {run "rax show servers"}}
16
+ Then {all_stdout =~ /you don't have any servers/}
17
+ And {last_exit_status.should eql 0}
18
+ end
19
+ context "when I create a server" do
20
+ When {VCR.use_cassette('create-server') {run "rax create server"}}
21
+ Then {all_stdout =~ /created server (\w+)/}
22
+ And {last_exit_status.should eql 0}
23
+ end
24
+ context "when I show a server" do
25
+ When {VCR.use_cassette('show-server') {run "rax show server divine-reef"}}
26
+ Then {last_exit_status.should eql 0}
27
+ end
28
+ context "when I destroy a server that exists" do
29
+ When {VCR.use_cassette('destroy-server') {run "rax destroy server divine-reef"}}
30
+ Then {all_stdout =~ /destruction/}
31
+ And {last_exit_status.should eql 0}
32
+ end
33
+ end
34
+ context "without credentials"
35
+ end
@@ -0,0 +1,86 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://identity.api.rackspacecloud.com/v2.0/tokens
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"auth":{"RAX-KSKEY:apiKeyCredentials":{"username":"<rackspace-login>","apiKey":"<rackspace-api-token>"}}}'
9
+ headers:
10
+ User-Agent:
11
+ - fog/1.11.1
12
+ Content-Type:
13
+ - application/json
14
+ Accept:
15
+ - application/json
16
+ X-Auth-Token: []
17
+ response:
18
+ status:
19
+ code: 200
20
+ message:
21
+ headers:
22
+ Server:
23
+ - nginx/0.8.55
24
+ Date:
25
+ - Mon, 27 May 2013 16:59:08 GMT
26
+ Content-Type:
27
+ - application/json
28
+ Transfer-Encoding:
29
+ - chunked
30
+ Connection:
31
+ - keep-alive
32
+ response-source:
33
+ - cloud-auth
34
+ vary:
35
+ - Accept, Accept-Encoding, X-Auth-Token
36
+ VIA:
37
+ - 1.0 Repose (Repose/2.3.5)
38
+ Front-End-Https:
39
+ - 'on'
40
+ body:
41
+ encoding: UTF-8
42
+ string: |
43
+ {"access":{"token":{"id":"6e57ad98-4d0b-4414-b9be-4c8a75e81261","expires":"2013-05-28T11:24:07.000-05:00","tenant":{"id":"829771","name":"829771"}},"serviceCatalog":[{"endpoints":[{"region":"DFW","tenantId":"829771","publicURL":"https:\/\/dfw.servers.api.rackspacecloud.com\/v2\/829771","versionInfo":"https:\/\/dfw.servers.api.rackspacecloud.com\/v2","versionList":"https:\/\/dfw.servers.api.rackspacecloud.com\/","versionId":"2"},{"region":"ORD","tenantId":"829771","publicURL":"https:\/\/ord.servers.api.rackspacecloud.com\/v2\/829771","versionInfo":"https:\/\/ord.servers.api.rackspacecloud.com\/v2","versionList":"https:\/\/ord.servers.api.rackspacecloud.com\/","versionId":"2"}],"name":"cloudServersOpenStack","type":"compute"},{"endpoints":[{"region":"DFW","tenantId":"829771","publicURL":"https:\/\/dfw.blockstorage.api.rackspacecloud.com\/v1\/829771"},{"region":"ORD","tenantId":"829771","publicURL":"https:\/\/ord.blockstorage.api.rackspacecloud.com\/v1\/829771"}],"name":"cloudBlockStorage","type":"volume"},{"endpoints":[{"tenantId":"829771","publicURL":"https:\/\/servers.api.rackspacecloud.com\/v1.0\/829771","versionInfo":"https:\/\/servers.api.rackspacecloud.com\/v1.0","versionList":"https:\/\/servers.api.rackspacecloud.com\/","versionId":"1.0"}],"name":"cloudServers","type":"compute"},{"endpoints":[{"tenantId":"829771","publicURL":"https:\/\/monitoring.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudMonitoring","type":"rax:monitor"},{"endpoints":[{"tenantId":"829771","publicURL":"https:\/\/backup.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudBackup","type":"rax:backup"},{"endpoints":[{"region":"DFW","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/storage101.dfw1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","internalURL":"https:\/\/snet-storage101.dfw1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d"},{"region":"ORD","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/storage101.ord1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","internalURL":"https:\/\/snet-storage101.ord1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d"}],"name":"cloudFiles","type":"object-store"},{"endpoints":[{"region":"ORD","tenantId":"829771","publicURL":"https:\/\/ord.loadbalancers.api.rackspacecloud.com\/v1.0\/829771"},{"region":"DFW","tenantId":"829771","publicURL":"https:\/\/dfw.loadbalancers.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudLoadBalancers","type":"rax:load-balancer"},{"endpoints":[{"region":"DFW","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/cdn1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d"},{"region":"ORD","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/cdn2.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d"}],"name":"cloudFilesCDN","type":"rax:object-cdn"},{"endpoints":[{"tenantId":"829771","publicURL":"https:\/\/dns.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudDNS","type":"rax:dns"},{"endpoints":[{"region":"DFW","tenantId":"829771","publicURL":"https:\/\/dfw.databases.api.rackspacecloud.com\/v1.0\/829771"},{"region":"ORD","tenantId":"829771","publicURL":"https:\/\/ord.databases.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudDatabases","type":"rax:database"}],"user":{"id":"356537","roles":[{"id":"3","description":"User Admin Role.","name":"identity:user-admin"}],"name":"<rackspace-login>","RAX-AUTH:defaultRegion":""}}}
44
+ http_version:
45
+ recorded_at: Mon, 27 May 2013 16:59:08 GMT
46
+ - request:
47
+ method: post
48
+ uri: https://dfw.servers.api.rackspacecloud.com/v2/829771/servers
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"server":{"name":"divine-reef","imageRef":"9922a7c7-5a42-4a56-bc6a-93f857ae2346","flavorRef":2,"minCount":1,"maxCount":1,"networks":[{"uuid":"00000000-0000-0000-0000-000000000000"},{"uuid":"11111111-1111-1111-1111-111111111111"}]}}'
52
+ headers:
53
+ User-Agent:
54
+ - fog/1.11.1
55
+ Content-Type:
56
+ - application/json
57
+ Accept:
58
+ - application/json
59
+ X-Auth-Token:
60
+ - 6e57ad98-4d0b-4414-b9be-4c8a75e81261
61
+ response:
62
+ status:
63
+ code: 202
64
+ message:
65
+ headers:
66
+ Date:
67
+ - Mon, 27 May 2013 16:59:09 GMT
68
+ Content-Length:
69
+ - '380'
70
+ Location:
71
+ - https://dfw.servers.api.rackspacecloud.com/v2/829771/servers/2211c095-db96-4098-9577-345e0d86a4c7
72
+ Content-Type:
73
+ - application/json
74
+ X-Compute-Request-Id:
75
+ - req-e7bdfd25-32d3-48c8-965d-15cb896aeff2
76
+ Server:
77
+ - Jetty(8.0.y.z-SNAPSHOT)
78
+ body:
79
+ encoding: UTF-8
80
+ string: '{"server": {"OS-DCF:diskConfig": "AUTO", "id": "2211c095-db96-4098-9577-345e0d86a4c7",
81
+ "links": [{"href": "https://dfw.servers.api.rackspacecloud.com/v2/829771/servers/2211c095-db96-4098-9577-345e0d86a4c7",
82
+ "rel": "self"}, {"href": "https://dfw.servers.api.rackspacecloud.com/829771/servers/2211c095-db96-4098-9577-345e0d86a4c7",
83
+ "rel": "bookmark"}], "adminPass": "23nhD4mpHJk4"}}'
84
+ http_version:
85
+ recorded_at: Mon, 27 May 2013 16:59:09 GMT
86
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,130 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://identity.api.rackspacecloud.com/v2.0/tokens
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"auth":{"RAX-KSKEY:apiKeyCredentials":{"username":"<rackspace-login>","apiKey":"<rackspace-api-token>"}}}'
9
+ headers:
10
+ User-Agent:
11
+ - fog/1.11.1
12
+ Content-Type:
13
+ - application/json
14
+ Accept:
15
+ - application/json
16
+ X-Auth-Token: []
17
+ response:
18
+ status:
19
+ code: 200
20
+ message:
21
+ headers:
22
+ Server:
23
+ - nginx/0.8.55
24
+ Date:
25
+ - Tue, 28 May 2013 20:16:11 GMT
26
+ Content-Type:
27
+ - application/json
28
+ Transfer-Encoding:
29
+ - chunked
30
+ Connection:
31
+ - keep-alive
32
+ response-source:
33
+ - cloud-auth
34
+ vary:
35
+ - Accept, Accept-Encoding, X-Auth-Token
36
+ VIA:
37
+ - 1.0 Repose (Repose/2.3.5)
38
+ Front-End-Https:
39
+ - 'on'
40
+ body:
41
+ encoding: UTF-8
42
+ string: |
43
+ {"access":{"token":{"id":"c8e0d8ec-c73d-48c5-9b80-548ef8f40dc4","expires":"2013-05-29T14:36:08.000-05:00","tenant":{"id":"829771","name":"829771"}},"serviceCatalog":[{"endpoints":[{"tenantId":"829771","publicURL":"https:\/\/servers.api.rackspacecloud.com\/v1.0\/829771","versionInfo":"https:\/\/servers.api.rackspacecloud.com\/v1.0","versionList":"https:\/\/servers.api.rackspacecloud.com\/","versionId":"1.0"}],"name":"cloudServers","type":"compute"},{"endpoints":[{"region":"DFW","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/storage101.dfw1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","internalURL":"https:\/\/snet-storage101.dfw1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d"},{"region":"ORD","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/storage101.ord1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","internalURL":"https:\/\/snet-storage101.ord1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d"}],"name":"cloudFiles","type":"object-store"},{"endpoints":[{"tenantId":"829771","publicURL":"https:\/\/backup.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudBackup","type":"rax:backup"},{"endpoints":[{"region":"DFW","tenantId":"829771","publicURL":"https:\/\/dfw.servers.api.rackspacecloud.com\/v2\/829771","versionInfo":"https:\/\/dfw.servers.api.rackspacecloud.com\/v2","versionList":"https:\/\/dfw.servers.api.rackspacecloud.com\/","versionId":"2"},{"region":"ORD","tenantId":"829771","publicURL":"https:\/\/ord.servers.api.rackspacecloud.com\/v2\/829771","versionInfo":"https:\/\/ord.servers.api.rackspacecloud.com\/v2","versionList":"https:\/\/ord.servers.api.rackspacecloud.com\/","versionId":"2"}],"name":"cloudServersOpenStack","type":"compute"},{"endpoints":[{"region":"DFW","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/cdn1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d"},{"region":"ORD","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/cdn2.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d"}],"name":"cloudFilesCDN","type":"rax:object-cdn"},{"endpoints":[{"tenantId":"829771","publicURL":"https:\/\/dns.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudDNS","type":"rax:dns"},{"endpoints":[{"region":"DFW","tenantId":"829771","publicURL":"https:\/\/dfw.blockstorage.api.rackspacecloud.com\/v1\/829771"},{"region":"ORD","tenantId":"829771","publicURL":"https:\/\/ord.blockstorage.api.rackspacecloud.com\/v1\/829771"}],"name":"cloudBlockStorage","type":"volume"},{"endpoints":[{"region":"DFW","tenantId":"829771","publicURL":"https:\/\/dfw.databases.api.rackspacecloud.com\/v1.0\/829771"},{"region":"ORD","tenantId":"829771","publicURL":"https:\/\/ord.databases.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudDatabases","type":"rax:database"},{"endpoints":[{"region":"ORD","tenantId":"829771","publicURL":"https:\/\/ord.loadbalancers.api.rackspacecloud.com\/v1.0\/829771"},{"region":"DFW","tenantId":"829771","publicURL":"https:\/\/dfw.loadbalancers.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudLoadBalancers","type":"rax:load-balancer"},{"endpoints":[{"tenantId":"829771","publicURL":"https:\/\/monitoring.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudMonitoring","type":"rax:monitor"}],"user":{"id":"356537","roles":[{"id":"3","description":"User Admin Role.","name":"identity:user-admin"}],"name":"<rackspace-login>","RAX-AUTH:defaultRegion":""}}}
44
+ http_version:
45
+ recorded_at: Tue, 28 May 2013 20:16:11 GMT
46
+ - request:
47
+ method: get
48
+ uri: https://dfw.servers.api.rackspacecloud.com/v2/829771/servers/detail
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ''
52
+ headers:
53
+ User-Agent:
54
+ - fog/1.11.1
55
+ Content-Type:
56
+ - application/json
57
+ Accept:
58
+ - application/json
59
+ X-Auth-Token:
60
+ - c8e0d8ec-c73d-48c5-9b80-548ef8f40dc4
61
+ response:
62
+ status:
63
+ code: 200
64
+ message:
65
+ headers:
66
+ Date:
67
+ - Tue, 28 May 2013 20:16:12 GMT
68
+ Content-Length:
69
+ - '1302'
70
+ Content-Type:
71
+ - application/json
72
+ X-Compute-Request-Id:
73
+ - req-0fb719cd-3ec8-4246-85a5-0c276fa1ad75
74
+ Server:
75
+ - Jetty(8.0.y.z-SNAPSHOT)
76
+ body:
77
+ encoding: UTF-8
78
+ string: '{"servers": [{"status": "ACTIVE", "updated": "2013-05-28T20:09:58Z",
79
+ "hostId": "bb771e19097c2f6c7feae19a5d86527e24c34f57b31f0df46ff3cdc8", "addresses":
80
+ {"public": [{"version": 6, "addr": "2001:4800:7810:0512:6ee9:7eb9:ff04:e242"},
81
+ {"version": 4, "addr": "166.78.13.242"}], "private": [{"version": 4, "addr":
82
+ "10.181.29.78"}]}, "links": [{"href": "https://dfw.servers.api.rackspacecloud.com/v2/829771/servers/bceb657a-a4a5-4531-9464-75abd9e6916d",
83
+ "rel": "self"}, {"href": "https://dfw.servers.api.rackspacecloud.com/829771/servers/bceb657a-a4a5-4531-9464-75abd9e6916d",
84
+ "rel": "bookmark"}], "image": {"id": "9922a7c7-5a42-4a56-bc6a-93f857ae2346",
85
+ "links": [{"href": "https://dfw.servers.api.rackspacecloud.com/829771/images/9922a7c7-5a42-4a56-bc6a-93f857ae2346",
86
+ "rel": "bookmark"}]}, "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state":
87
+ "active", "flavor": {"id": "2", "links": [{"href": "https://dfw.servers.api.rackspacecloud.com/829771/flavors/2",
88
+ "rel": "bookmark"}]}, "id": "bceb657a-a4a5-4531-9464-75abd9e6916d", "user_id":
89
+ "356537", "name": "divine-reef", "created": "2013-05-28T19:59:33Z", "tenant_id":
90
+ "829771", "OS-DCF:diskConfig": "AUTO", "accessIPv4": "166.78.13.242", "accessIPv6":
91
+ "2001:4800:7810:512:6ee9:7eb9:ff04:e242", "progress": 100, "OS-EXT-STS:power_state":
92
+ 1, "metadata": {}}]}'
93
+ http_version:
94
+ recorded_at: Tue, 28 May 2013 20:16:12 GMT
95
+ - request:
96
+ method: delete
97
+ uri: https://dfw.servers.api.rackspacecloud.com/v2/829771/servers/bceb657a-a4a5-4531-9464-75abd9e6916d
98
+ body:
99
+ encoding: US-ASCII
100
+ string: ''
101
+ headers:
102
+ User-Agent:
103
+ - fog/1.11.1
104
+ Content-Type:
105
+ - application/json
106
+ Accept:
107
+ - application/json
108
+ X-Auth-Token:
109
+ - c8e0d8ec-c73d-48c5-9b80-548ef8f40dc4
110
+ response:
111
+ status:
112
+ code: 204
113
+ message:
114
+ headers:
115
+ Date:
116
+ - Tue, 28 May 2013 20:16:13 GMT
117
+ Content-Length:
118
+ - '0'
119
+ Content-Type:
120
+ - application/json
121
+ X-Compute-Request-Id:
122
+ - req-5126182b-80b0-40e1-a593-1e1c7c78347d
123
+ Server:
124
+ - Jetty(8.0.y.z-SNAPSHOT)
125
+ body:
126
+ encoding: UTF-8
127
+ string: ''
128
+ http_version:
129
+ recorded_at: Tue, 28 May 2013 20:16:13 GMT
130
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,185 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://identity.api.rackspacecloud.com/v2.0/tokens
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"auth":{"RAX-KSKEY:apiKeyCredentials":{"username":"<rackspace-login>","apiKey":"<rackspace-api-token>"}}}'
9
+ headers:
10
+ User-Agent:
11
+ - fog/1.11.1
12
+ Content-Type:
13
+ - application/json
14
+ Accept:
15
+ - application/json
16
+ X-Auth-Token: []
17
+ response:
18
+ status:
19
+ code: 200
20
+ message:
21
+ headers:
22
+ Server:
23
+ - nginx/0.8.55
24
+ Date:
25
+ - Tue, 28 May 2013 20:13:16 GMT
26
+ Content-Type:
27
+ - application/json
28
+ Transfer-Encoding:
29
+ - chunked
30
+ Connection:
31
+ - keep-alive
32
+ response-source:
33
+ - cloud-auth
34
+ vary:
35
+ - Accept, Accept-Encoding, X-Auth-Token
36
+ VIA:
37
+ - 1.0 Repose (Repose/2.3.5)
38
+ Front-End-Https:
39
+ - 'on'
40
+ body:
41
+ encoding: UTF-8
42
+ string: |
43
+ {"access":{"token":{"id":"c8e0d8ec-c73d-48c5-9b80-548ef8f40dc4","expires":"2013-05-29T14:36:08.000-05:00","tenant":{"id":"829771","name":"829771"}},"serviceCatalog":[{"endpoints":[{"tenantId":"829771","publicURL":"https:\/\/servers.api.rackspacecloud.com\/v1.0\/829771","versionInfo":"https:\/\/servers.api.rackspacecloud.com\/v1.0","versionList":"https:\/\/servers.api.rackspacecloud.com\/","versionId":"1.0"}],"name":"cloudServers","type":"compute"},{"endpoints":[{"region":"DFW","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/storage101.dfw1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","internalURL":"https:\/\/snet-storage101.dfw1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d"},{"region":"ORD","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/storage101.ord1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","internalURL":"https:\/\/snet-storage101.ord1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d"}],"name":"cloudFiles","type":"object-store"},{"endpoints":[{"tenantId":"829771","publicURL":"https:\/\/backup.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudBackup","type":"rax:backup"},{"endpoints":[{"region":"DFW","tenantId":"829771","publicURL":"https:\/\/dfw.servers.api.rackspacecloud.com\/v2\/829771","versionInfo":"https:\/\/dfw.servers.api.rackspacecloud.com\/v2","versionList":"https:\/\/dfw.servers.api.rackspacecloud.com\/","versionId":"2"},{"region":"ORD","tenantId":"829771","publicURL":"https:\/\/ord.servers.api.rackspacecloud.com\/v2\/829771","versionInfo":"https:\/\/ord.servers.api.rackspacecloud.com\/v2","versionList":"https:\/\/ord.servers.api.rackspacecloud.com\/","versionId":"2"}],"name":"cloudServersOpenStack","type":"compute"},{"endpoints":[{"region":"DFW","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/cdn1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d"},{"region":"ORD","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/cdn2.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d"}],"name":"cloudFilesCDN","type":"rax:object-cdn"},{"endpoints":[{"tenantId":"829771","publicURL":"https:\/\/dns.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudDNS","type":"rax:dns"},{"endpoints":[{"region":"DFW","tenantId":"829771","publicURL":"https:\/\/dfw.blockstorage.api.rackspacecloud.com\/v1\/829771"},{"region":"ORD","tenantId":"829771","publicURL":"https:\/\/ord.blockstorage.api.rackspacecloud.com\/v1\/829771"}],"name":"cloudBlockStorage","type":"volume"},{"endpoints":[{"region":"DFW","tenantId":"829771","publicURL":"https:\/\/dfw.databases.api.rackspacecloud.com\/v1.0\/829771"},{"region":"ORD","tenantId":"829771","publicURL":"https:\/\/ord.databases.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudDatabases","type":"rax:database"},{"endpoints":[{"region":"ORD","tenantId":"829771","publicURL":"https:\/\/ord.loadbalancers.api.rackspacecloud.com\/v1.0\/829771"},{"region":"DFW","tenantId":"829771","publicURL":"https:\/\/dfw.loadbalancers.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudLoadBalancers","type":"rax:load-balancer"},{"endpoints":[{"tenantId":"829771","publicURL":"https:\/\/monitoring.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudMonitoring","type":"rax:monitor"}],"user":{"id":"356537","roles":[{"id":"3","description":"User Admin Role.","name":"identity:user-admin"}],"name":"<rackspace-login>","RAX-AUTH:defaultRegion":""}}}
44
+ http_version:
45
+ recorded_at: Tue, 28 May 2013 20:13:16 GMT
46
+ - request:
47
+ method: get
48
+ uri: https://dfw.servers.api.rackspacecloud.com/v2/829771/servers/detail
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ''
52
+ headers:
53
+ User-Agent:
54
+ - fog/1.11.1
55
+ Content-Type:
56
+ - application/json
57
+ Accept:
58
+ - application/json
59
+ X-Auth-Token:
60
+ - c8e0d8ec-c73d-48c5-9b80-548ef8f40dc4
61
+ response:
62
+ status:
63
+ code: 200
64
+ message:
65
+ headers:
66
+ Date:
67
+ - Tue, 28 May 2013 20:13:17 GMT
68
+ Content-Length:
69
+ - '1302'
70
+ Content-Type:
71
+ - application/json
72
+ X-Compute-Request-Id:
73
+ - req-c50caa22-5f16-4a48-8362-eacee70d6207
74
+ Server:
75
+ - Jetty(8.0.y.z-SNAPSHOT)
76
+ body:
77
+ encoding: UTF-8
78
+ string: '{"servers": [{"status": "ACTIVE", "updated": "2013-05-28T20:09:58Z",
79
+ "hostId": "bb771e19097c2f6c7feae19a5d86527e24c34f57b31f0df46ff3cdc8", "addresses":
80
+ {"public": [{"version": 6, "addr": "2001:4800:7810:0512:6ee9:7eb9:ff04:e242"},
81
+ {"version": 4, "addr": "166.78.13.242"}], "private": [{"version": 4, "addr":
82
+ "10.181.29.78"}]}, "links": [{"href": "https://dfw.servers.api.rackspacecloud.com/v2/829771/servers/bceb657a-a4a5-4531-9464-75abd9e6916d",
83
+ "rel": "self"}, {"href": "https://dfw.servers.api.rackspacecloud.com/829771/servers/bceb657a-a4a5-4531-9464-75abd9e6916d",
84
+ "rel": "bookmark"}], "image": {"id": "9922a7c7-5a42-4a56-bc6a-93f857ae2346",
85
+ "links": [{"href": "https://dfw.servers.api.rackspacecloud.com/829771/images/9922a7c7-5a42-4a56-bc6a-93f857ae2346",
86
+ "rel": "bookmark"}]}, "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state":
87
+ "active", "flavor": {"id": "2", "links": [{"href": "https://dfw.servers.api.rackspacecloud.com/829771/flavors/2",
88
+ "rel": "bookmark"}]}, "id": "bceb657a-a4a5-4531-9464-75abd9e6916d", "user_id":
89
+ "356537", "name": "divine-reef", "created": "2013-05-28T19:59:33Z", "tenant_id":
90
+ "829771", "OS-DCF:diskConfig": "AUTO", "accessIPv4": "166.78.13.242", "accessIPv6":
91
+ "2001:4800:7810:512:6ee9:7eb9:ff04:e242", "progress": 100, "OS-EXT-STS:power_state":
92
+ 1, "metadata": {}}]}'
93
+ http_version:
94
+ recorded_at: Tue, 28 May 2013 20:13:17 GMT
95
+ - request:
96
+ method: get
97
+ uri: https://dfw.servers.api.rackspacecloud.com/v2/829771/images/9922a7c7-5a42-4a56-bc6a-93f857ae2346
98
+ body:
99
+ encoding: US-ASCII
100
+ string: ''
101
+ headers:
102
+ User-Agent:
103
+ - fog/1.11.1
104
+ Content-Type:
105
+ - application/json
106
+ Accept:
107
+ - application/json
108
+ X-Auth-Token:
109
+ - c8e0d8ec-c73d-48c5-9b80-548ef8f40dc4
110
+ response:
111
+ status:
112
+ code: 200
113
+ message:
114
+ headers:
115
+ Date:
116
+ - Tue, 28 May 2013 20:13:17 GMT
117
+ Content-Length:
118
+ - '1514'
119
+ Content-Type:
120
+ - application/json
121
+ X-Compute-Request-Id:
122
+ - req-f047d1b9-2292-4353-b896-33918bd01189
123
+ Server:
124
+ - Jetty(8.0.y.z-SNAPSHOT)
125
+ body:
126
+ encoding: UTF-8
127
+ string: '{"image": {"status": "ACTIVE", "updated": "2013-04-26T19:32:23Z", "links":
128
+ [{"href": "https://dfw.servers.api.rackspacecloud.com/v2/829771/images/9922a7c7-5a42-4a56-bc6a-93f857ae2346",
129
+ "rel": "self"}, {"href": "https://dfw.servers.api.rackspacecloud.com/829771/images/9922a7c7-5a42-4a56-bc6a-93f857ae2346",
130
+ "rel": "bookmark"}, {"href": "https://dfw.servers.api.rackspacecloud.com/829771/images/9922a7c7-5a42-4a56-bc6a-93f857ae2346",
131
+ "type": "application/vnd.openstack.image", "rel": "alternate"}], "OS-DCF:diskConfig":
132
+ "AUTO", "id": "9922a7c7-5a42-4a56-bc6a-93f857ae2346", "OS-EXT-IMG-SIZE:size":
133
+ 211452277, "name": "Ubuntu 13.04 (Raring Ringtail)", "created": "2013-04-26T13:37:43Z",
134
+ "minDisk": 0, "progress": 100, "minRam": 512, "metadata": {"os_distro": "ubuntu",
135
+ "com.rackspace__1__visible_core": "1", "com.rackspace__1__build_rackconnect":
136
+ "1", "com.rackspace__1__options": "0", "image_type": "base", "cache_in_nova":
137
+ "True", "com.rackspace__1__source": "kickstart", "org.openstack__1__os_distro":
138
+ "com.ubuntu", "com.rackspace__1__release_build_date": "2013-04-25_17-03-56",
139
+ "os_type": "linux", "auto_disk_config": "True", "com.rackspace__1__release_version":
140
+ "2", "com.rackspace__1__release_state": "kickstart_qc_pass", "com.rackspace__1__visible_rackconnect":
141
+ "1", "com.rackspace__1__release_id": "1005", "com.rackspace__1__visible_managed":
142
+ "1", "com.rackspace__1__build_core": "1", "org.openstack__1__os_version":
143
+ "13.04", "org.openstack__1__architecture": "x64", "com.rackspace__1__build_managed":
144
+ "1"}}}'
145
+ http_version:
146
+ recorded_at: Tue, 28 May 2013 20:13:17 GMT
147
+ - request:
148
+ method: get
149
+ uri: https://dfw.servers.api.rackspacecloud.com/v2/829771/flavors/2
150
+ body:
151
+ encoding: US-ASCII
152
+ string: ''
153
+ headers:
154
+ User-Agent:
155
+ - fog/1.11.1
156
+ Content-Type:
157
+ - application/json
158
+ Accept:
159
+ - application/json
160
+ X-Auth-Token:
161
+ - c8e0d8ec-c73d-48c5-9b80-548ef8f40dc4
162
+ response:
163
+ status:
164
+ code: 200
165
+ message:
166
+ headers:
167
+ Date:
168
+ - Tue, 28 May 2013 20:13:17 GMT
169
+ Content-Length:
170
+ - '353'
171
+ Content-Type:
172
+ - application/json
173
+ X-Compute-Request-Id:
174
+ - req-22347c6b-1d56-4200-a334-96d6be6dddd8
175
+ Server:
176
+ - Jetty(8.0.y.z-SNAPSHOT)
177
+ body:
178
+ encoding: UTF-8
179
+ string: '{"flavor": {"name": "512MB Standard Instance", "links": [{"href": "https://dfw.servers.api.rackspacecloud.com/v2/829771/flavors/2",
180
+ "rel": "self"}, {"href": "https://dfw.servers.api.rackspacecloud.com/829771/flavors/2",
181
+ "rel": "bookmark"}], "ram": 512, "vcpus": 1, "swap": 512, "rxtx_factor": 2.0,
182
+ "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 20, "id": "2"}}'
183
+ http_version:
184
+ recorded_at: Tue, 28 May 2013 20:13:17 GMT
185
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,81 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://identity.api.rackspacecloud.com/v2.0/tokens
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"auth":{"RAX-KSKEY:apiKeyCredentials":{"username":"<rackspace-login>","apiKey":"<rackspace-api-token>"}}}'
9
+ headers:
10
+ User-Agent:
11
+ - fog/1.11.1
12
+ Content-Type:
13
+ - application/json
14
+ Accept:
15
+ - application/json
16
+ X-Auth-Token: []
17
+ response:
18
+ status:
19
+ code: 200
20
+ message:
21
+ headers:
22
+ Server:
23
+ - nginx/0.8.55
24
+ Date:
25
+ - Sat, 25 May 2013 01:55:06 GMT
26
+ Content-Type:
27
+ - application/json
28
+ Transfer-Encoding:
29
+ - chunked
30
+ Connection:
31
+ - keep-alive
32
+ response-source:
33
+ - cloud-auth
34
+ vary:
35
+ - Accept, Accept-Encoding, X-Auth-Token
36
+ VIA:
37
+ - 1.0 Repose (Repose/2.3.5)
38
+ Front-End-Https:
39
+ - 'on'
40
+ body:
41
+ encoding: UTF-8
42
+ string: |
43
+ {"access":{"token":{"id":"116366a2-74c0-4a43-9d06-82b9f0f0dbf0","expires":"2013-05-25T17:00:57.000-05:00","tenant":{"id":"829771","name":"829771"}},"serviceCatalog":[{"endpoints":[{"region":"DFW","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/cdn1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d"},{"region":"ORD","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/cdn2.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d"}],"name":"cloudFilesCDN","type":"rax:object-cdn"},{"endpoints":[{"tenantId":"829771","publicURL":"https:\/\/monitoring.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudMonitoring","type":"rax:monitor"},{"endpoints":[{"region":"DFW","tenantId":"829771","publicURL":"https:\/\/dfw.servers.api.rackspacecloud.com\/v2\/829771","versionInfo":"https:\/\/dfw.servers.api.rackspacecloud.com\/v2","versionList":"https:\/\/dfw.servers.api.rackspacecloud.com\/","versionId":"2"},{"region":"ORD","tenantId":"829771","publicURL":"https:\/\/ord.servers.api.rackspacecloud.com\/v2\/829771","versionInfo":"https:\/\/ord.servers.api.rackspacecloud.com\/v2","versionList":"https:\/\/ord.servers.api.rackspacecloud.com\/","versionId":"2"}],"name":"cloudServersOpenStack","type":"compute"},{"endpoints":[{"tenantId":"829771","publicURL":"https:\/\/backup.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudBackup","type":"rax:backup"},{"endpoints":[{"region":"DFW","tenantId":"829771","publicURL":"https:\/\/dfw.databases.api.rackspacecloud.com\/v1.0\/829771"},{"region":"ORD","tenantId":"829771","publicURL":"https:\/\/ord.databases.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudDatabases","type":"rax:database"},{"endpoints":[{"region":"ORD","tenantId":"829771","publicURL":"https:\/\/ord.loadbalancers.api.rackspacecloud.com\/v1.0\/829771"},{"region":"DFW","tenantId":"829771","publicURL":"https:\/\/dfw.loadbalancers.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudLoadBalancers","type":"rax:load-balancer"},{"endpoints":[{"tenantId":"829771","publicURL":"https:\/\/dns.api.rackspacecloud.com\/v1.0\/829771"}],"name":"cloudDNS","type":"rax:dns"},{"endpoints":[{"region":"DFW","tenantId":"829771","publicURL":"https:\/\/dfw.blockstorage.api.rackspacecloud.com\/v1\/829771"},{"region":"ORD","tenantId":"829771","publicURL":"https:\/\/ord.blockstorage.api.rackspacecloud.com\/v1\/829771"}],"name":"cloudBlockStorage","type":"volume"},{"endpoints":[{"region":"DFW","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/storage101.dfw1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","internalURL":"https:\/\/snet-storage101.dfw1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d"},{"region":"ORD","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/storage101.ord1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","internalURL":"https:\/\/snet-storage101.ord1.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d"}],"name":"cloudFiles","type":"object-store"},{"endpoints":[{"tenantId":"829771","publicURL":"https:\/\/servers.api.rackspacecloud.com\/v1.0\/829771","versionInfo":"https:\/\/servers.api.rackspacecloud.com\/v1.0","versionList":"https:\/\/servers.api.rackspacecloud.com\/","versionId":"1.0"}],"name":"cloudServers","type":"compute"}],"user":{"id":"356537","roles":[{"id":"3","description":"User Admin Role.","name":"identity:user-admin"}],"name":"<rackspace-login>","RAX-AUTH:defaultRegion":""}}}
44
+ http_version:
45
+ recorded_at: Sat, 25 May 2013 01:55:06 GMT
46
+ - request:
47
+ method: get
48
+ uri: https://dfw.servers.api.rackspacecloud.com/v2/829771/servers/detail
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ''
52
+ headers:
53
+ User-Agent:
54
+ - fog/1.11.1
55
+ Content-Type:
56
+ - application/json
57
+ Accept:
58
+ - application/json
59
+ X-Auth-Token:
60
+ - 116366a2-74c0-4a43-9d06-82b9f0f0dbf0
61
+ response:
62
+ status:
63
+ code: 200
64
+ message:
65
+ headers:
66
+ Date:
67
+ - Sat, 25 May 2013 01:55:07 GMT
68
+ Content-Length:
69
+ - '15'
70
+ Content-Type:
71
+ - application/json
72
+ X-Compute-Request-Id:
73
+ - req-ee6bfa06-62e9-4e9b-b707-4848316d7826
74
+ Server:
75
+ - Jetty(8.0.y.z-SNAPSHOT)
76
+ body:
77
+ encoding: UTF-8
78
+ string: '{"servers": []}'
79
+ http_version:
80
+ recorded_at: Sat, 25 May 2013 01:55:07 GMT
81
+ recorded_with: VCR 2.5.0
@@ -1 +1,47 @@
1
- require 'rax'
1
+ require "rax"
2
+ require "vcr"
3
+ require "aruba/api"
4
+ require "rspec-given"
5
+
6
+ RSpec.configure do |config|
7
+ config.color_enabled = true
8
+ config.include Aruba::Api, :example_group => {
9
+ :file_path => /spec\/features/
10
+ }
11
+ config.before(:each) do
12
+ @__aruba_original_paths = (ENV['PATH'] || '').split(File::PATH_SEPARATOR)
13
+ ENV['PATH'] = ([File.expand_path('bin')] + @__aruba_original_paths).join(File::PATH_SEPARATOR)
14
+ end
15
+
16
+ config.after(:each) do
17
+ ENV['PATH'] = @__aruba_original_paths.join(File::PATH_SEPARATOR)
18
+ end
19
+ end
20
+
21
+ VCR.configure do |c|
22
+ c.default_cassette_options = { :record => :new_episodes }
23
+ c.hook_into :excon
24
+ # c.debug_logger = $stderr
25
+
26
+ c.cassette_library_dir = 'spec/fixtures/cassettes'
27
+ c.filter_sensitive_data("<rackspace-login>") do
28
+ ENV['RACKSPACE_LOGIN']
29
+ end
30
+ c.filter_sensitive_data("<rackspace-api-token>") do
31
+ ENV['RACKSPACE_API_TOKEN']
32
+ end
33
+ end
34
+
35
+
36
+ require "aruba/in_process"
37
+ require_relative "../app"
38
+ Aruba.process = Aruba::InProcess
39
+ Aruba::InProcess.main_class = Class.new do
40
+ def initialize(argv, stdin=STDIN, stdout=STDOUT, stderr=STDERR, kernel=Kernel)
41
+ @argv, @stdin, @stdout, @stderr, @kernel = argv, stdin, stdout, stderr, kernel
42
+ end
43
+
44
+ def execute!
45
+ @kernel.exit Rax::App.main @argv, @stdin, @stdout, @stderr
46
+ end
47
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rax
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Lowell
@@ -29,12 +29,55 @@ cert_chain:
29
29
  UgImJlChAzCoDP9zi9tdm6jAr7ttF25R9PPYr11ILb7dYe3qUzlNlM6zJx/nb31b
30
30
  IhdyRVup4qLcqYSTPsm6u7VA
31
31
  -----END CERTIFICATE-----
32
- date: 2013-03-29 00:00:00.000000000 Z
33
- dependencies: []
32
+ date: 2013-05-28 00:00:00.000000000 Z
33
+ dependencies:
34
+ - !ruby/object:Gem::Dependency
35
+ name: mvcli
36
+ requirement: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 0.0.4
41
+ type: :runtime
42
+ prerelease: false
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 0.0.4
48
+ - !ruby/object:Gem::Dependency
49
+ name: fog
50
+ requirement: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 1.11.0
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 1.11.0
62
+ - !ruby/object:Gem::Dependency
63
+ name: netrc
64
+ requirement: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ type: :runtime
70
+ prerelease: false
71
+ version_requirements: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
34
76
  description: Lift heavy things inside your Rackspace
35
77
  email:
36
78
  - cowboyd@thefrontside.net
37
- executables: []
79
+ executables:
80
+ - rax
38
81
  extensions: []
39
82
  extra_rdoc_files: []
40
83
  files:
@@ -43,9 +86,28 @@ files:
43
86
  - LICENSE.txt
44
87
  - README.md
45
88
  - Rakefile
89
+ - app.rb
90
+ - app/controllers/authentication_controller.rb
91
+ - app/controllers/servers_controller.rb
92
+ - app/providers/compute_provider.rb
93
+ - app/providers/credentials_provider.rb
94
+ - app/routes.rb
95
+ - app/views/authentication/login.txt.erb
96
+ - app/views/authentication/logout.txt.erb
97
+ - app/views/servers/create.txt.erb
98
+ - app/views/servers/destroy.txt.erb
99
+ - app/views/servers/index.txt.erb
100
+ - app/views/servers/show.txt.erb
101
+ - bin/rax
46
102
  - lib/rax.rb
47
103
  - lib/rax/version.rb
48
104
  - rax.gemspec
105
+ - spec/features/login_spec.rb
106
+ - spec/features/servers_spec.rb
107
+ - spec/fixtures/cassettes/create-server.yml
108
+ - spec/fixtures/cassettes/destroy-server.yml
109
+ - spec/fixtures/cassettes/show-server.yml
110
+ - spec/fixtures/cassettes/show-servers.yml
49
111
  - spec/rax_spec.rb
50
112
  - spec/spec_helper.rb
51
113
  homepage: https://github.com/cowboyd/rax
@@ -73,5 +135,11 @@ signing_key:
73
135
  specification_version: 4
74
136
  summary: CLI and API for managing Rackspace infrastructure
75
137
  test_files:
138
+ - spec/features/login_spec.rb
139
+ - spec/features/servers_spec.rb
140
+ - spec/fixtures/cassettes/create-server.yml
141
+ - spec/fixtures/cassettes/destroy-server.yml
142
+ - spec/fixtures/cassettes/show-server.yml
143
+ - spec/fixtures/cassettes/show-servers.yml
76
144
  - spec/rax_spec.rb
77
145
  - spec/spec_helper.rb