rumm 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +8 -0
- data/README.md +5 -0
- data/app/controllers/authentication_controller.rb +15 -20
- data/app/controllers/databases_controller.rb +0 -1
- data/app/controllers/servers_controller.rb +10 -7
- data/app/controllers/users_controller.rb +22 -0
- data/app/forms/loadbalancers/create_form.rb +2 -0
- data/app/forms/servers/create_form.rb +7 -0
- data/app/forms/users/create_form.rb +10 -0
- data/app/providers/user_provider.rb +1 -1
- data/app/routes.rb +4 -0
- data/app/views/users/create.txt.erb +1 -0
- data/app/views/users/index.txt.erb +7 -0
- data/lib/rumm/version.rb +1 -1
- data/spec/features/login_spec.rb +13 -14
- data/spec/features/servers_spec.rb +5 -10
- data/spec/fixtures/cassettes/create-server.yml +20 -78
- data/spec/fixtures/cassettes/destroy-server.yml +32 -64
- data/spec/fixtures/cassettes/show-server.yml +52 -87
- data/spec/fixtures/cassettes/show-servers.yml +29 -76
- data/spec/fixtures/cassettes/successful-login.yml +78 -0
- data/spec/spec_helper.rb +53 -13
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86bfe27ae6f3268c4793883168dd315075ff5cb7
|
4
|
+
data.tar.gz: 3f17993a43ef0bffaca6f334c00620fbec070db5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5698abc60b8dc140e2f60108d3bd707e92003a07043d39742c0d9fcf609605142e72c1a0a66d74bd10ac0a8f1813bcd6b9093fff24781433880e1d12d1d41dfc
|
7
|
+
data.tar.gz: a577175f66daa7c519052d70bb5bfb18c79aa4436a60c5c4c29f7a3a99c7b2736049c6183ab3b7c46407e2b118450e3f5a74932f6aacf2a502173db3b66bf563
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
## Rumm: a tasty tool for pirates and hackers
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/rumm.png)](http://badge.fury.io/rb/rumm)
|
4
|
+
[![Build Status](https://travis-ci.org/rackerlabs/rumm.png?branch=master)](https://travis-ci.org/rackerlabs/rumm)
|
5
|
+
[![Dependency Status](https://gemnasium.com/rackerlabs/rumm.png)](https://gemnasium.com/rackerlabs/rumm)
|
6
|
+
|
7
|
+
|
3
8
|
Rumm is a command line interface and API to rackspace. You can use it
|
4
9
|
to easily build and manage infrastructure for great good.
|
5
10
|
|
@@ -7,30 +7,25 @@ class AuthenticationController < MVCLI::Controller
|
|
7
7
|
requires :user
|
8
8
|
|
9
9
|
def login
|
10
|
-
#Check if they're already logged in
|
11
|
-
#if(they're logged in)
|
12
|
-
# prompt("you sure bout that?")
|
13
10
|
login_info = user
|
14
11
|
username = login_info.name
|
15
12
|
password = login_info.password
|
16
13
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
user_credentials = Map(JSON.parse res.body)
|
14
|
+
connection = Excon.new('https://identity.api.rackspacecloud.com')
|
15
|
+
|
16
|
+
headers = {'Content-Type' => 'application/json'}
|
17
|
+
body = {auth: {passwordCredentials: {username: username, password: password}}}
|
18
|
+
|
19
|
+
response = connection.post headers: headers, body: body.to_json, path: '/v2.0/tokens'
|
20
|
+
|
21
|
+
|
22
|
+
#TODO check the status code of the request
|
23
|
+
user_info = Map(JSON.parse response.body)
|
24
|
+
|
25
|
+
headers.merge!({'X-Auth-Token' => user_info.access.token.id})
|
26
|
+
response = connection.get headers: headers, path: "/v2.0/users/#{user_info.access.user.id}/OS-KSADM/credentials/RAX-KSKEY:apiKeyCredentials"
|
27
|
+
|
28
|
+
user_credentials = Map(JSON.parse response.body)
|
34
29
|
|
35
30
|
netrc = Netrc.read
|
36
31
|
netrc['api.rackspace.com'] = username, user_credentials["RAX-KSKEY:apiKeyCredentials"].apiKey
|
@@ -1,6 +1,5 @@
|
|
1
1
|
class ServersController < MVCLI::Controller
|
2
2
|
requires :compute
|
3
|
-
requires :naming
|
4
3
|
requires :command
|
5
4
|
|
6
5
|
def index
|
@@ -13,17 +12,21 @@ class ServersController < MVCLI::Controller
|
|
13
12
|
end
|
14
13
|
|
15
14
|
def create
|
15
|
+
template = Servers::CreateForm
|
16
|
+
argv = MVCLI::Argv.new command.argv
|
17
|
+
form = template.new argv.options
|
18
|
+
form.validate!
|
16
19
|
#Add personalization
|
17
20
|
options = {
|
18
|
-
name:
|
19
|
-
flavor_id:
|
20
|
-
image_id:
|
21
|
-
private_key_path: "~/.ssh/
|
22
|
-
public_key_path: "~/.ssh/
|
21
|
+
name: form.name,
|
22
|
+
flavor_id: form.flavor_id,
|
23
|
+
image_id: form.image_id,
|
24
|
+
private_key_path: "~/.ssh/id_rsa",
|
25
|
+
public_key_path: "~/.ssh/id_rsa.pub"
|
23
26
|
}
|
24
27
|
command.output.puts "--> bootstrapping server #{options[:name]}"
|
25
28
|
#Progress bar
|
26
|
-
server = compute.servers.
|
29
|
+
server = compute.servers.create options
|
27
30
|
command.output.puts " done."
|
28
31
|
return server
|
29
32
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class UsersController < MVCLI::Controller
|
2
|
+
requires :instances
|
3
|
+
requires :command
|
4
|
+
|
5
|
+
def index
|
6
|
+
instance.users.all
|
7
|
+
end
|
8
|
+
|
9
|
+
def create
|
10
|
+
template = Users::CreateForm
|
11
|
+
argv = MVCLI::Argv.new command.argv
|
12
|
+
form = template.new argv.options
|
13
|
+
form.validate!
|
14
|
+
instance.users.create form.value
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def instance
|
20
|
+
instances.all.find {|i| i.name == params[:dbinstance_id]} or fail Fog::Errors::NotFound
|
21
|
+
end
|
22
|
+
end
|
@@ -22,6 +22,8 @@ class Loadbalancers::CreateForm < MVCLI::Form
|
|
22
22
|
validates(:condition, "invalid condition") {|c| ['ENABLED', 'DISABLED'].member? c}
|
23
23
|
end
|
24
24
|
|
25
|
+
validates(:port, "port must be between 0 and 65,535") {|port| port >=0 && port < 65535}
|
26
|
+
|
25
27
|
validates(:nodes, "at least one node must be enabled") { |nodes|
|
26
28
|
nodes.any? {|n| n.condition == 'ENABLED'}
|
27
29
|
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
class Users::CreateForm < MVCLI::Form
|
2
|
+
input :name, String, required: true
|
3
|
+
input :password, String, required: true
|
4
|
+
input :databases, [Map], decode: ->(s) {{name: s}}
|
5
|
+
input :host, String
|
6
|
+
|
7
|
+
validates(:host, "host must be a valid ip address or %") {|host|
|
8
|
+
host == "%" or IPAddr.new(host) rescue nil
|
9
|
+
}
|
10
|
+
end
|
data/app/routes.rb
CHANGED
@@ -33,6 +33,10 @@ match 'create database on dbinstance :instance_id' => 'databases#create'
|
|
33
33
|
match 'update database :id on dbinstance :instance_id' => 'databases#update'
|
34
34
|
match 'destroy database :id on dbinstance :instance_id' => 'databases#destroy'
|
35
35
|
|
36
|
+
match 'show users on dbinstance :dbinstance_id' => 'users#index'
|
37
|
+
match 'show user :id on dbinstance :dbinstance_id' => 'users#show'
|
38
|
+
match 'create user on dbinstance :dbinstance_id' => 'users#create'
|
39
|
+
|
36
40
|
match 'ssh :id' => 'servers#ssh'
|
37
41
|
|
38
42
|
match 'show containers' => 'containers#index'
|
@@ -0,0 +1 @@
|
|
1
|
+
created user <%= self.name %>
|
data/lib/rumm/version.rb
CHANGED
data/spec/features/login_spec.rb
CHANGED
@@ -2,28 +2,27 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
describe "logging in" do
|
4
4
|
before do
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
#@announce_dir = true
|
6
|
+
#@announce_cmd = true
|
7
|
+
#@announce_env = true
|
8
|
+
#@announce_stdout = true
|
9
|
+
#@announce_stderr = true
|
10
10
|
@home = Pathname(set_env "HOME", File.expand_path(current_dir))
|
11
11
|
end
|
12
12
|
describe "interactively with valid credentials" do
|
13
13
|
before do
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
VCR.use_cassette('successful-login') do
|
15
|
+
will_type ENV['RACKSPACE_USERNAME'] || "<username>"
|
16
|
+
will_type ENV['RACKSPACE_PASSWORD'] || "<valid-password>"
|
17
|
+
run_interactive "rumm login"
|
18
|
+
stop_process @interactive
|
19
|
+
end
|
18
20
|
end
|
19
21
|
it "successfully exits" do
|
20
22
|
last_exit_status.should eq(0), "process failed"
|
21
23
|
end
|
22
|
-
it "
|
23
|
-
|
24
|
-
access = Map(JSON.parse @home.join(".rummrc").read).access
|
25
|
-
access.user.name.should eql "cowboyd"
|
26
|
-
access.serviceCatalog.first.name.should eql "cloudServers"
|
24
|
+
it "places your login credentials in your .netrc" do
|
25
|
+
|
27
26
|
end
|
28
27
|
end
|
29
28
|
end
|
@@ -7,8 +7,8 @@ describe "using the server api" do
|
|
7
7
|
File.open(home.join('.netrc'), "w") do |f|
|
8
8
|
f.chmod 0600
|
9
9
|
f.puts "machine api.rackspace.com"
|
10
|
-
f.puts " login #{ENV['
|
11
|
-
f.puts " password #{ENV['
|
10
|
+
f.puts " login #{ENV['RACKSPACE_USERNAME'] || '<rackspace-username>'}"
|
11
|
+
f.puts " password #{ENV['RACKSPACE_API_KEY'] || '<rackspace-api-key>'}"
|
12
12
|
end
|
13
13
|
end
|
14
14
|
context "when I list all my servers (and I don't have any')" do
|
@@ -17,23 +17,18 @@ describe "using the server api" do
|
|
17
17
|
And {last_exit_status.should eql 0}
|
18
18
|
end
|
19
19
|
context "when I create a server" do
|
20
|
-
When {VCR.use_cassette('create-server') {run "rumm create server"}}
|
20
|
+
When {VCR.use_cassette('create-server') {run "rumm create server --name silly-saffron"}}
|
21
21
|
Then {all_stdout =~ /created server (\w+)/}
|
22
22
|
And {last_exit_status.should eql 0}
|
23
23
|
end
|
24
|
-
#context "when I ssh into a server" do
|
25
|
-
# When {VCR.use_cassette('show-server') {run "rumm ssh divine-reef"}}
|
26
|
-
# Then {all_stdout =~ /test success/}
|
27
|
-
#end
|
28
24
|
context "when I show a server" do
|
29
|
-
When {VCR.use_cassette('show-server') {run "rumm show server
|
25
|
+
When {VCR.use_cassette('show-server') {run "rumm show server silly-saffron"}}
|
30
26
|
Then {last_exit_status.should eql 0}
|
31
27
|
end
|
32
28
|
context "when I destroy a server that exists" do
|
33
|
-
When {VCR.use_cassette('destroy-server') {run "rumm destroy server
|
29
|
+
When {VCR.use_cassette('destroy-server') {run "rumm destroy server silly-saffron"}}
|
34
30
|
Then {all_stdout =~ /destruction/}
|
35
31
|
And {last_exit_status.should eql 0}
|
36
32
|
end
|
37
33
|
end
|
38
|
-
context "without credentials"
|
39
34
|
end
|
@@ -5,7 +5,7 @@ http_interactions:
|
|
5
5
|
uri: https://identity.api.rackspacecloud.com/v2.0/tokens
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"auth":{"RAX-KSKEY:apiKeyCredentials":{"username":"<rackspace-
|
8
|
+
string: '{"auth":{"RAX-KSKEY:apiKeyCredentials":{"username":"<rackspace-username>","apiKey":"<rackspace-api-key>"}}}'
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
11
|
- fog/1.11.1
|
@@ -22,33 +22,33 @@ http_interactions:
|
|
22
22
|
Server:
|
23
23
|
- nginx/0.8.55
|
24
24
|
Date:
|
25
|
-
-
|
25
|
+
- Fri, 28 Jun 2013 18:45:22 GMT
|
26
26
|
Content-Type:
|
27
27
|
- application/json
|
28
|
-
Transfer-Encoding:
|
29
|
-
- chunked
|
30
28
|
Connection:
|
31
29
|
- keep-alive
|
32
|
-
response-source:
|
33
|
-
- cloud-auth
|
34
30
|
vary:
|
35
31
|
- Accept, Accept-Encoding, X-Auth-Token
|
36
32
|
VIA:
|
37
33
|
- 1.0 Repose (Repose/2.3.5)
|
34
|
+
Content-Length:
|
35
|
+
- '4973'
|
38
36
|
Front-End-Https:
|
39
37
|
- 'on'
|
40
38
|
body:
|
41
39
|
encoding: UTF-8
|
42
|
-
string:
|
43
|
-
|
40
|
+
string: '{"access":{"token":{"id":"<rackspace-api-token>","expires":"2013-06-28T15:57:21.042-05:00","tenant":{"id":"829771","name":"829771"}},"serviceCatalog":[{"name":"cloudFiles","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":"SYD","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/storage101.syd2.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","internalURL":"https:\/\/snet-storage101.syd2.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"}],"type":"object-store"},{"name":"cloudFilesCDN","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"},{"region":"SYD","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/cdn4.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d"}],"type":"rax:object-cdn"},{"name":"cloudLoadBalancers","endpoints":[{"region":"SYD","tenantId":"829771","publicURL":"https:\/\/syd.loadbalancers.api.rackspacecloud.com\/v1.0\/829771"},{"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"}],"type":"rax:load-balancer"},{"name":"cloudBlockStorage","endpoints":[{"region":"SYD","tenantId":"829771","publicURL":"https:\/\/syd.blockstorage.api.rackspacecloud.com\/v1\/829771"},{"region":"ORD","tenantId":"829771","publicURL":"https:\/\/ord.blockstorage.api.rackspacecloud.com\/v1\/829771"},{"region":"DFW","tenantId":"829771","publicURL":"https:\/\/dfw.blockstorage.api.rackspacecloud.com\/v1\/829771"}],"type":"volume"},{"name":"cloudDatabases","endpoints":[{"region":"SYD","tenantId":"829771","publicURL":"https:\/\/syd.databases.api.rackspacecloud.com\/v1.0\/829771"},{"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"}],"type":"rax:database"},{"name":"cloudServersOpenStack","endpoints":[{"region":"SYD","tenantId":"829771","publicURL":"https:\/\/syd.servers.api.rackspacecloud.com\/v2\/829771","versionInfo":"https:\/\/syd.servers.api.rackspacecloud.com\/v2","versionList":"https:\/\/syd.servers.api.rackspacecloud.com\/","versionId":"2"},{"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"}],"type":"compute"},{"name":"cloudDNS","endpoints":[{"tenantId":"829771","publicURL":"https:\/\/dns.api.rackspacecloud.com\/v1.0\/829771"}],"type":"rax:dns"},{"name":"cloudBackup","endpoints":[{"tenantId":"829771","publicURL":"https:\/\/backup.api.rackspacecloud.com\/v1.0\/829771"}],"type":"rax:backup"},{"name":"cloudServers","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"}],"type":"compute"},{"name":"cloudMonitoring","endpoints":[{"tenantId":"829771","publicURL":"https:\/\/monitoring.api.rackspacecloud.com\/v1.0\/829771"}],"type":"rax:monitor"}],"user":{"id":"356537","roles":[{"tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","id":"5","description":"A
|
41
|
+
Role that allows a user access to keystone Service methods","name":"object-store:default"},{"tenantId":"829771","id":"6","description":"A
|
42
|
+
Role that allows a user access to keystone Service methods","name":"compute:default"},{"id":"3","description":"User
|
43
|
+
Admin Role.","name":"identity:user-admin"}],"name":"<rackspace-username>","RAX-AUTH:defaultRegion":"ORD"}}}'
|
44
44
|
http_version:
|
45
|
-
recorded_at:
|
45
|
+
recorded_at: Fri, 28 Jun 2013 18:45:22 GMT
|
46
46
|
- request:
|
47
47
|
method: post
|
48
|
-
uri: https://
|
48
|
+
uri: https://ord.servers.api.rackspacecloud.com/v2/829771/servers
|
49
49
|
body:
|
50
50
|
encoding: UTF-8
|
51
|
-
string: '{"server":{"name":"
|
51
|
+
string: '{"server":{"name":"silly-saffron","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
52
|
headers:
|
53
53
|
User-Agent:
|
54
54
|
- fog/1.11.1
|
@@ -57,88 +57,30 @@ http_interactions:
|
|
57
57
|
Accept:
|
58
58
|
- application/json
|
59
59
|
X-Auth-Token:
|
60
|
-
-
|
60
|
+
- <rackspace-api-token>
|
61
61
|
response:
|
62
62
|
status:
|
63
63
|
code: 202
|
64
64
|
message:
|
65
65
|
headers:
|
66
66
|
Date:
|
67
|
-
-
|
67
|
+
- Fri, 28 Jun 2013 18:45:25 GMT
|
68
68
|
Content-Length:
|
69
69
|
- '380'
|
70
70
|
Location:
|
71
|
-
- https://
|
71
|
+
- https://ord.servers.api.rackspacecloud.com/v2/829771/servers/ec463ae7-7e91-4ab0-95ee-84e6b116d5c8
|
72
72
|
Content-Type:
|
73
73
|
- application/json
|
74
74
|
X-Compute-Request-Id:
|
75
|
-
- req-
|
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
|
-
- request:
|
87
|
-
method: get
|
88
|
-
uri: https://dfw.servers.api.rackspacecloud.com/v2/829771/servers/2211c095-db96-4098-9577-345e0d86a4c7
|
89
|
-
body:
|
90
|
-
encoding: US-ASCII
|
91
|
-
string: ''
|
92
|
-
headers:
|
93
|
-
User-Agent:
|
94
|
-
- fog/1.11.1
|
95
|
-
Content-Type:
|
96
|
-
- application/json
|
97
|
-
Accept:
|
98
|
-
- application/json
|
99
|
-
X-Auth-Token:
|
100
|
-
- 6e57ad98-4d0b-4414-b9be-4c8a75e81261
|
101
|
-
response:
|
102
|
-
status:
|
103
|
-
code: 401
|
104
|
-
message:
|
105
|
-
headers:
|
106
|
-
Content-Length:
|
107
|
-
- '0'
|
108
|
-
Server:
|
109
|
-
- Jetty(8.0.y.z-SNAPSHOT)
|
110
|
-
body:
|
111
|
-
encoding: UTF-8
|
112
|
-
string: ''
|
113
|
-
http_version:
|
114
|
-
recorded_at: Mon, 03 Jun 2013 21:05:06 GMT
|
115
|
-
- request:
|
116
|
-
method: post
|
117
|
-
uri: https://ord.servers.api.rackspacecloud.com/v2/829771/servers
|
118
|
-
body:
|
119
|
-
encoding: UTF-8
|
120
|
-
string: '{"server":{"name":"snow-capped-saturniidae","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"}]}}'
|
121
|
-
headers:
|
122
|
-
User-Agent:
|
123
|
-
- fog/1.11.1
|
124
|
-
Content-Type:
|
125
|
-
- application/json
|
126
|
-
Accept:
|
127
|
-
- application/json
|
128
|
-
X-Auth-Token:
|
129
|
-
- 6e57ad98-4d0b-4414-b9be-4c8a75e81261
|
130
|
-
response:
|
131
|
-
status:
|
132
|
-
code: 401
|
133
|
-
message:
|
134
|
-
headers:
|
135
|
-
Content-Length:
|
136
|
-
- '0'
|
75
|
+
- req-1944260f-79d3-46cd-ae31-552feebf5bfb
|
137
76
|
Server:
|
138
77
|
- Jetty(8.0.y.z-SNAPSHOT)
|
139
78
|
body:
|
140
79
|
encoding: UTF-8
|
141
|
-
string: '
|
80
|
+
string: '{"server": {"OS-DCF:diskConfig": "AUTO", "id": "ec463ae7-7e91-4ab0-95ee-84e6b116d5c8",
|
81
|
+
"links": [{"href": "https://ord.servers.api.rackspacecloud.com/v2/829771/servers/ec463ae7-7e91-4ab0-95ee-84e6b116d5c8",
|
82
|
+
"rel": "self"}, {"href": "https://ord.servers.api.rackspacecloud.com/829771/servers/ec463ae7-7e91-4ab0-95ee-84e6b116d5c8",
|
83
|
+
"rel": "bookmark"}], "adminPass": "LNkXt2MSVp3H"}}'
|
142
84
|
http_version:
|
143
|
-
recorded_at:
|
85
|
+
recorded_at: Fri, 28 Jun 2013 18:45:25 GMT
|
144
86
|
recorded_with: VCR 2.5.0
|
@@ -5,7 +5,7 @@ http_interactions:
|
|
5
5
|
uri: https://identity.api.rackspacecloud.com/v2.0/tokens
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"auth":{"RAX-KSKEY:apiKeyCredentials":{"username":"<rackspace-
|
8
|
+
string: '{"auth":{"RAX-KSKEY:apiKeyCredentials":{"username":"<rackspace-username>","apiKey":"<rackspace-api-key>"}}}'
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
11
|
- fog/1.11.1
|
@@ -22,30 +22,30 @@ http_interactions:
|
|
22
22
|
Server:
|
23
23
|
- nginx/0.8.55
|
24
24
|
Date:
|
25
|
-
-
|
25
|
+
- Fri, 28 Jun 2013 18:46:02 GMT
|
26
26
|
Content-Type:
|
27
27
|
- application/json
|
28
|
-
Transfer-Encoding:
|
29
|
-
- chunked
|
30
28
|
Connection:
|
31
29
|
- keep-alive
|
32
|
-
response-source:
|
33
|
-
- cloud-auth
|
34
30
|
vary:
|
35
31
|
- Accept, Accept-Encoding, X-Auth-Token
|
36
32
|
VIA:
|
37
33
|
- 1.0 Repose (Repose/2.3.5)
|
34
|
+
Content-Length:
|
35
|
+
- '4973'
|
38
36
|
Front-End-Https:
|
39
37
|
- 'on'
|
40
38
|
body:
|
41
39
|
encoding: UTF-8
|
42
|
-
string:
|
43
|
-
|
40
|
+
string: '{"access":{"token":{"id":"<rackspace-api-token>","expires":"2013-06-28T15:57:21.042-05:00","tenant":{"id":"829771","name":"829771"}},"serviceCatalog":[{"name":"cloudFiles","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":"SYD","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/storage101.syd2.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","internalURL":"https:\/\/snet-storage101.syd2.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"}],"type":"object-store"},{"name":"cloudFilesCDN","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"},{"region":"SYD","tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","publicURL":"https:\/\/cdn4.clouddrive.com\/v1\/MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d"}],"type":"rax:object-cdn"},{"name":"cloudLoadBalancers","endpoints":[{"region":"SYD","tenantId":"829771","publicURL":"https:\/\/syd.loadbalancers.api.rackspacecloud.com\/v1.0\/829771"},{"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"}],"type":"rax:load-balancer"},{"name":"cloudBlockStorage","endpoints":[{"region":"SYD","tenantId":"829771","publicURL":"https:\/\/syd.blockstorage.api.rackspacecloud.com\/v1\/829771"},{"region":"ORD","tenantId":"829771","publicURL":"https:\/\/ord.blockstorage.api.rackspacecloud.com\/v1\/829771"},{"region":"DFW","tenantId":"829771","publicURL":"https:\/\/dfw.blockstorage.api.rackspacecloud.com\/v1\/829771"}],"type":"volume"},{"name":"cloudDatabases","endpoints":[{"region":"SYD","tenantId":"829771","publicURL":"https:\/\/syd.databases.api.rackspacecloud.com\/v1.0\/829771"},{"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"}],"type":"rax:database"},{"name":"cloudServersOpenStack","endpoints":[{"region":"SYD","tenantId":"829771","publicURL":"https:\/\/syd.servers.api.rackspacecloud.com\/v2\/829771","versionInfo":"https:\/\/syd.servers.api.rackspacecloud.com\/v2","versionList":"https:\/\/syd.servers.api.rackspacecloud.com\/","versionId":"2"},{"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"}],"type":"compute"},{"name":"cloudDNS","endpoints":[{"tenantId":"829771","publicURL":"https:\/\/dns.api.rackspacecloud.com\/v1.0\/829771"}],"type":"rax:dns"},{"name":"cloudBackup","endpoints":[{"tenantId":"829771","publicURL":"https:\/\/backup.api.rackspacecloud.com\/v1.0\/829771"}],"type":"rax:backup"},{"name":"cloudServers","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"}],"type":"compute"},{"name":"cloudMonitoring","endpoints":[{"tenantId":"829771","publicURL":"https:\/\/monitoring.api.rackspacecloud.com\/v1.0\/829771"}],"type":"rax:monitor"}],"user":{"id":"356537","roles":[{"tenantId":"MossoCloudFS_51a1ae47-05df-400f-91cc-0a481d4ab24d","id":"5","description":"A
|
41
|
+
Role that allows a user access to keystone Service methods","name":"object-store:default"},{"tenantId":"829771","id":"6","description":"A
|
42
|
+
Role that allows a user access to keystone Service methods","name":"compute:default"},{"id":"3","description":"User
|
43
|
+
Admin Role.","name":"identity:user-admin"}],"name":"<rackspace-username>","RAX-AUTH:defaultRegion":"ORD"}}}'
|
44
44
|
http_version:
|
45
|
-
recorded_at:
|
45
|
+
recorded_at: Fri, 28 Jun 2013 18:46:02 GMT
|
46
46
|
- request:
|
47
47
|
method: get
|
48
|
-
uri: https://
|
48
|
+
uri: https://ord.servers.api.rackspacecloud.com/v2/829771/servers/detail
|
49
49
|
body:
|
50
50
|
encoding: US-ASCII
|
51
51
|
string: ''
|
@@ -57,44 +57,41 @@ http_interactions:
|
|
57
57
|
Accept:
|
58
58
|
- application/json
|
59
59
|
X-Auth-Token:
|
60
|
-
-
|
60
|
+
- <rackspace-api-token>
|
61
61
|
response:
|
62
62
|
status:
|
63
63
|
code: 200
|
64
64
|
message:
|
65
65
|
headers:
|
66
66
|
Date:
|
67
|
-
-
|
67
|
+
- Fri, 28 Jun 2013 18:46:03 GMT
|
68
68
|
Content-Length:
|
69
|
-
- '
|
69
|
+
- '1107'
|
70
70
|
Content-Type:
|
71
71
|
- application/json
|
72
72
|
X-Compute-Request-Id:
|
73
|
-
- req-
|
73
|
+
- req-a2dbb601-e7c8-4081-8beb-f9082316c705
|
74
74
|
Server:
|
75
75
|
- Jetty(8.0.y.z-SNAPSHOT)
|
76
76
|
body:
|
77
77
|
encoding: UTF-8
|
78
|
-
string: '{"servers": [{"status": "
|
79
|
-
"hostId": "
|
80
|
-
{"
|
81
|
-
|
82
|
-
"
|
83
|
-
"
|
84
|
-
"rel": "bookmark"}], "
|
85
|
-
"links": [{"href": "https://
|
86
|
-
"rel": "bookmark"}]}, "
|
87
|
-
"
|
88
|
-
"
|
89
|
-
"
|
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": {}}]}'
|
78
|
+
string: '{"servers": [{"status": "BUILD", "updated": "2013-06-28T18:45:56Z",
|
79
|
+
"hostId": "b942d6ed1da527403619f7e9a2be7d921437b9a8fa4a881e8f9cad6a", "addresses":
|
80
|
+
{}, "links": [{"href": "https://ord.servers.api.rackspacecloud.com/v2/829771/servers/ec463ae7-7e91-4ab0-95ee-84e6b116d5c8",
|
81
|
+
"rel": "self"}, {"href": "https://ord.servers.api.rackspacecloud.com/829771/servers/ec463ae7-7e91-4ab0-95ee-84e6b116d5c8",
|
82
|
+
"rel": "bookmark"}], "key_name": null, "image": {"id": "9922a7c7-5a42-4a56-bc6a-93f857ae2346",
|
83
|
+
"links": [{"href": "https://ord.servers.api.rackspacecloud.com/829771/images/9922a7c7-5a42-4a56-bc6a-93f857ae2346",
|
84
|
+
"rel": "bookmark"}]}, "OS-EXT-STS:task_state": "networking", "OS-EXT-STS:vm_state":
|
85
|
+
"building", "flavor": {"id": "2", "links": [{"href": "https://ord.servers.api.rackspacecloud.com/829771/flavors/2",
|
86
|
+
"rel": "bookmark"}]}, "id": "ec463ae7-7e91-4ab0-95ee-84e6b116d5c8", "user_id":
|
87
|
+
"356537", "name": "silly-saffron", "created": "2013-06-28T18:45:35Z", "tenant_id":
|
88
|
+
"829771", "OS-DCF:diskConfig": "AUTO", "accessIPv4": "", "accessIPv6": "",
|
89
|
+
"progress": 0, "OS-EXT-STS:power_state": 0, "metadata": {}}]}'
|
93
90
|
http_version:
|
94
|
-
recorded_at:
|
91
|
+
recorded_at: Fri, 28 Jun 2013 18:46:03 GMT
|
95
92
|
- request:
|
96
93
|
method: delete
|
97
|
-
uri: https://
|
94
|
+
uri: https://ord.servers.api.rackspacecloud.com/v2/829771/servers/ec463ae7-7e91-4ab0-95ee-84e6b116d5c8
|
98
95
|
body:
|
99
96
|
encoding: US-ASCII
|
100
97
|
string: ''
|
@@ -106,54 +103,25 @@ http_interactions:
|
|
106
103
|
Accept:
|
107
104
|
- application/json
|
108
105
|
X-Auth-Token:
|
109
|
-
-
|
106
|
+
- <rackspace-api-token>
|
110
107
|
response:
|
111
108
|
status:
|
112
109
|
code: 204
|
113
110
|
message:
|
114
111
|
headers:
|
115
112
|
Date:
|
116
|
-
-
|
113
|
+
- Fri, 28 Jun 2013 18:46:05 GMT
|
117
114
|
Content-Length:
|
118
115
|
- '0'
|
119
116
|
Content-Type:
|
120
117
|
- application/json
|
121
118
|
X-Compute-Request-Id:
|
122
|
-
- req-
|
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
|
-
- request:
|
131
|
-
method: get
|
132
|
-
uri: https://ord.servers.api.rackspacecloud.com/v2/829771/servers/detail
|
133
|
-
body:
|
134
|
-
encoding: US-ASCII
|
135
|
-
string: ''
|
136
|
-
headers:
|
137
|
-
User-Agent:
|
138
|
-
- fog/1.11.1
|
139
|
-
Content-Type:
|
140
|
-
- application/json
|
141
|
-
Accept:
|
142
|
-
- application/json
|
143
|
-
X-Auth-Token:
|
144
|
-
- c8e0d8ec-c73d-48c5-9b80-548ef8f40dc4
|
145
|
-
response:
|
146
|
-
status:
|
147
|
-
code: 401
|
148
|
-
message:
|
149
|
-
headers:
|
150
|
-
Content-Length:
|
151
|
-
- '0'
|
119
|
+
- req-907467f1-0ebb-4bd6-9fc9-4b8c7659d542
|
152
120
|
Server:
|
153
121
|
- Jetty(8.0.y.z-SNAPSHOT)
|
154
122
|
body:
|
155
123
|
encoding: UTF-8
|
156
124
|
string: ''
|
157
125
|
http_version:
|
158
|
-
recorded_at:
|
126
|
+
recorded_at: Fri, 28 Jun 2013 18:46:05 GMT
|
159
127
|
recorded_with: VCR 2.5.0
|