brightbox-cli 2.2.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/Gemfile.lock +5 -2
- data/brightbox-cli.gemspec +1 -1
- data/lib/brightbox/cli/config.rb +19 -0
- data/lib/brightbox-cli/accounts.rb +2 -2
- data/lib/brightbox-cli/api.rb +4 -4
- data/lib/brightbox-cli/commands/accounts/default.rb +1 -1
- data/lib/brightbox-cli/commands/accounts/list.rb +1 -1
- data/lib/brightbox-cli/commands/config/client-add.rb +2 -2
- data/lib/brightbox-cli/commands/config/client-default.rb +3 -3
- data/lib/brightbox-cli/commands/config/client-list.rb +6 -6
- data/lib/brightbox-cli/commands/config/client-remove.rb +4 -4
- data/lib/brightbox-cli/commands/config/user-add.rb +2 -2
- data/lib/brightbox-cli/commands/login.rb +53 -0
- data/lib/brightbox-cli/config/accounts.rb +5 -0
- data/lib/brightbox-cli/config/authentication_tokens.rb +10 -3
- data/lib/brightbox-cli/config/cache.rb +8 -12
- data/lib/brightbox-cli/config/clients.rb +14 -38
- data/lib/brightbox-cli/config/sections.rb +70 -13
- data/lib/brightbox-cli/config/user_application.rb +13 -5
- data/lib/brightbox-cli/config.rb +22 -14
- data/lib/brightbox-cli/connection_manager.rb +2 -2
- data/lib/brightbox-cli/gli_global_hooks.rb +25 -28
- data/lib/brightbox-cli/version.rb +1 -1
- data/lib/brightbox_cli.rb +4 -0
- data/spec/cassettes/Brightbox_BBConfig/_add_section/when_config_exists_and_overwrite_duplicates_is_false/does_not_update_the_config_file.yml +199 -0
- data/spec/cassettes/Brightbox_BBConfig/_add_section/when_config_exists_and_overwrite_duplicates_is_true/does_not_update_the_config_file.yml +199 -0
- data/spec/cassettes/Brightbox_BBConfig_add_login/when_altering_a_custom_option/does_not_alter_the_configuration.yml +99 -0
- data/spec/cassettes/Brightbox_BBConfig_add_login/when_altering_a_custom_option/updates_access_token.yml +99 -0
- data/spec/cassettes/Brightbox_BBConfig_add_login/when_altering_a_custom_option/updates_refresh_token.yml +99 -0
- data/spec/cassettes/Brightbox_BBConfig_add_login/when_configured_with_custom_options/does_not_alter_the_configuration.yml +99 -0
- data/spec/cassettes/Brightbox_BBConfig_add_login/when_configured_with_custom_options/updates_access_token.yml +99 -0
- data/spec/cassettes/Brightbox_BBConfig_add_login/when_configured_with_custom_options/updates_refresh_token.yml +99 -0
- data/spec/cassettes/Brightbox_BBConfig_add_login/when_logged_in_previously/does_not_alter_the_configuration.yml +149 -0
- data/spec/cassettes/Brightbox_BBConfig_add_login/when_logged_in_previously/updates_access_token.yml +149 -0
- data/spec/cassettes/Brightbox_BBConfig_add_login/when_logged_in_previously/updates_refresh_token.yml +149 -0
- data/spec/cassettes/Brightbox_BBConfig_add_login/when_no_config_exists/creates_the_configuration.yml +101 -0
- data/spec/cassettes/Brightbox_BBConfig_add_login/when_no_config_exists/refreshed_tokens.yml +101 -0
- data/spec/cassettes/Brightbox_BBConfig_add_login/when_using_an_email_and_suffix/creates_the_configuration.yml +101 -0
- data/spec/cassettes/Brightbox_BBConfig_add_login/when_using_an_email_and_suffix/refreshed_tokens.yml +101 -0
- data/spec/cassettes/brightbox_accounts/list/_when_access_token_expired_/does_not_report_invalid_token_errors.yml +64 -18
- data/spec/cassettes/brightbox_accounts/list/_when_no_tokens_/does_not_report_invalid_token_errors.yml +62 -16
- data/spec/cassettes/brightbox_login/when_alternative_client_credentials_are_given/does_not_error.yml +101 -0
- data/spec/cassettes/brightbox_login/when_alternative_client_credentials_are_given/does_not_prompt_to_rerun_the_command.yml +101 -0
- data/spec/cassettes/brightbox_login/when_alternative_client_credentials_are_given/prompts_for_the_password.yml +101 -0
- data/spec/cassettes/brightbox_login/when_alternative_client_credentials_are_given/requests_access_tokens.yml +101 -0
- data/spec/cassettes/brightbox_login/when_alternative_client_credentials_are_given/sets_up_the_config.yml +101 -0
- data/spec/cassettes/brightbox_login/when_custom_api/auth_URLs_are_given/does_not_error.yml +101 -0
- data/spec/cassettes/brightbox_login/when_custom_api/auth_URLs_are_given/does_not_prompt_to_rerun_the_command.yml +101 -0
- data/spec/cassettes/brightbox_login/when_custom_api/auth_URLs_are_given/prompts_for_the_password.yml +101 -0
- data/spec/cassettes/brightbox_login/when_custom_api/auth_URLs_are_given/requests_access_tokens.yml +101 -0
- data/spec/cassettes/brightbox_login/when_custom_api/auth_URLs_are_given/sets_up_the_config.yml +101 -0
- data/spec/cassettes/brightbox_login/when_default_account_is_passed/does_not_error.yml +51 -0
- data/spec/cassettes/brightbox_login/when_default_account_is_passed/does_not_prompt_to_rerun_the_command.yml +51 -0
- data/spec/cassettes/brightbox_login/when_default_account_is_passed/prompts_for_the_password.yml +51 -0
- data/spec/cassettes/brightbox_login/when_default_account_is_passed/requests_access_tokens.yml +51 -0
- data/spec/cassettes/brightbox_login/when_default_account_is_passed/sets_up_the_config.yml +51 -0
- data/spec/cassettes/brightbox_login/when_no_config_is_present/does_not_error.yml +101 -0
- data/spec/cassettes/brightbox_login/when_no_config_is_present/does_not_prompt_to_rerun_the_command.yml +101 -0
- data/spec/cassettes/brightbox_login/when_no_config_is_present/requests_access_tokens.yml +101 -0
- data/spec/cassettes/brightbox_login/when_no_config_is_present/sets_up_the_config.yml +101 -0
- data/spec/cassettes/brightbox_login/when_no_password_is_given/does_not_error.yml +101 -0
- data/spec/cassettes/brightbox_login/when_no_password_is_given/does_not_prompt_to_rerun_the_command.yml +101 -0
- data/spec/cassettes/brightbox_login/when_no_password_is_given/prompts_for_the_password.yml +101 -0
- data/spec/cassettes/brightbox_login/when_no_password_is_given/requests_access_tokens.yml +101 -0
- data/spec/cassettes/brightbox_login/when_no_password_is_given/sets_up_the_config.yml +101 -0
- data/spec/commands/accounts/list_spec.rb +1 -0
- data/spec/commands/login_spec.rb +239 -0
- data/spec/configs/user_app.ini +0 -2
- data/spec/spec_helper.rb +1 -0
- data/spec/support/config_helpers.rb +5 -0
- data/spec/unit/brightbox/account/all_spec.rb +1 -3
- data/spec/unit/brightbox/api/conn_spec.rb +3 -0
- data/spec/unit/brightbox/api/find_spec.rb +3 -0
- data/spec/unit/brightbox/bb_config/account_spec.rb +2 -0
- data/spec/unit/brightbox/bb_config/add_login_spec.rb +222 -0
- data/spec/unit/brightbox/bb_config/client_name_spec.rb +4 -12
- data/spec/unit/brightbox/bb_config/client_named_spec.rb +1 -1
- data/spec/unit/brightbox/bb_config/config_directory_exists_spec.rb +5 -2
- data/spec/unit/brightbox/bb_config/config_directory_spec.rb +4 -2
- data/spec/unit/brightbox/bb_config/config_spec.rb +4 -8
- data/spec/unit/brightbox/bb_config/default_account_spec.rb +10 -6
- data/spec/unit/brightbox/bb_config/find_or_set_default_account_spec.rb +2 -0
- data/spec/unit/brightbox/bb_config/renew_tokens_spec.rb +3 -0
- data/spec/unit/brightbox/bb_config/section_names_spec.rb +46 -0
- data/spec/unit/brightbox/bb_config/using_client_spec.rb +12 -12
- data/spec/unit/brightbox/bb_config_spec.rb +0 -1
- data/spec/unit/brightbox/cloud_ip/find_spec.rb +3 -0
- data/spec/unit/brightbox/config/user_application/to_fog_spec.rb +33 -29
- data/spec/unit/brightbox/config/user_application/valid_spec.rb +0 -32
- data/spec/unit/brightbox/connection_manager/fetch_connection_spec.rb +7 -3
- data/spec/unit/brightbox/firewall_policy/apply_to_spec.rb +3 -0
- data/spec/unit/brightbox/firewall_policy/create_spec.rb +3 -0
- data/spec/unit/brightbox/firewall_policy/destroy_spec.rb +3 -0
- data/spec/unit/brightbox/firewall_policy/find_or_call_spec.rb +3 -0
- data/spec/unit/brightbox/firewall_policy/find_spec.rb +3 -0
- data/spec/unit/brightbox/firewall_rule/create_spec.rb +3 -0
- data/spec/unit/brightbox/firewall_rule/destroy_spec.rb +3 -0
- data/spec/unit/brightbox/firewall_rule/find_spec.rb +3 -0
- data/spec/unit/brightbox/firewall_rule/from_policy_spec.rb +3 -0
- data/spec/unit/brightbox/server/destroy_spec.rb +4 -0
- data/spec/unit/brightbox/server/find_or_call_spec.rb +3 -0
- data/spec/unit/brightbox/server/find_spec.rb +4 -0
- data/spec/unit/brightbox/server/shutdown_spec.rb +4 -0
- data/spec/unit/brightbox/server/start_spec.rb +4 -0
- data/spec/unit/brightbox/server/stop_spec.rb +4 -0
- data/spec/unit/brightbox/server/update_spec.rb +4 -0
- data/spec/unit/brightbox/server_group/find_spec.rb +3 -0
- data/spec/unit/brightbox/user_collaboration/get_for_account_spec.rb +3 -0
- metadata +90 -3
@@ -0,0 +1,101 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api.brightbox.dev/token
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"grant_type":"password","username":"jason.null@brightbox.com","password":"N:B3e%7Cmh"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- fog-core/1.32.1
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwLTEyMzQ1Om1vY2J1aXBiaWFhNms2Yw==
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
Cache-Control:
|
24
|
+
- no-store
|
25
|
+
X-Oauth-Scopes:
|
26
|
+
- infrastructure, orbit
|
27
|
+
Content-Length:
|
28
|
+
- '190'
|
29
|
+
X-Content-Type-Options:
|
30
|
+
- nosniff
|
31
|
+
X-Ua-Compatible:
|
32
|
+
- IE=Edge
|
33
|
+
Etag:
|
34
|
+
- '"89f175c34bfcea4f13ca83f4e28948e1"'
|
35
|
+
X-Request-Id:
|
36
|
+
- 5cc0625f0d653ed56648aa58eb0b912f
|
37
|
+
X-Runtime:
|
38
|
+
- '0.087828'
|
39
|
+
Server:
|
40
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2014-11-13)
|
41
|
+
Date:
|
42
|
+
- Mon, 12 Oct 2015 14:53:54 GMT
|
43
|
+
Connection:
|
44
|
+
- Keep-Alive
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: '{"access_token":"f04583a23a52ebd80898bafd1e1025327fb97544","token_type":"Bearer","refresh_token":"b8efc70e9ab697d2ac19bb54efabf317239bb246","scope":"infrastructure,
|
48
|
+
orbit","expires_in":7200}'
|
49
|
+
http_version:
|
50
|
+
recorded_at: Mon, 12 Oct 2015 14:53:54 GMT
|
51
|
+
- request:
|
52
|
+
method: get
|
53
|
+
uri: http://api.brightbox.dev/1.0/accounts
|
54
|
+
body:
|
55
|
+
encoding: US-ASCII
|
56
|
+
string: ''
|
57
|
+
headers:
|
58
|
+
User-Agent:
|
59
|
+
- fog-core/1.32.1
|
60
|
+
Authorization:
|
61
|
+
- Bearer f04583a23a52ebd80898bafd1e1025327fb97544
|
62
|
+
Content-Type:
|
63
|
+
- application/json
|
64
|
+
response:
|
65
|
+
status:
|
66
|
+
code: 200
|
67
|
+
message:
|
68
|
+
headers:
|
69
|
+
X-Oauth-Scopes:
|
70
|
+
- infrastructure, orbit
|
71
|
+
Content-Type:
|
72
|
+
- application/json; charset=utf-8
|
73
|
+
X-Ua-Compatible:
|
74
|
+
- IE=Edge
|
75
|
+
Etag:
|
76
|
+
- '"c9a269456e92ca15ff834e08ba6414ad"'
|
77
|
+
Cache-Control:
|
78
|
+
- max-age=0, private, must-revalidate
|
79
|
+
X-Request-Id:
|
80
|
+
- 3a7e02d34f671a05919ada58ce47eb5c
|
81
|
+
X-Runtime:
|
82
|
+
- '0.125844'
|
83
|
+
Server:
|
84
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2014-11-13)
|
85
|
+
Date:
|
86
|
+
- Mon, 12 Oct 2015 14:53:54 GMT
|
87
|
+
Content-Length:
|
88
|
+
- '1611'
|
89
|
+
Connection:
|
90
|
+
- Keep-Alive
|
91
|
+
body:
|
92
|
+
encoding: UTF-8
|
93
|
+
string: '[{"id":"acc-12345","resource_type":"account","url":"https://api.gb1.brightbox.com/1.0/accounts/acc-12345","name":"CLI
|
94
|
+
test account","status":"active","ram_limit":3200000,"ram_used":0,"dbs_ram_limit":32768,"dbs_ram_used":0,"cloud_ips_limit":32,"cloud_ips_used":0,"load_balancers_limit":5,"load_balancers_used":0,"clients":[{"id":"cli-12345","resource_type":"api_client","url":"https://api.gb1.brightbox.com/1.0/api_clients/cli-12345","name":"CLI
|
95
|
+
test API client","description":"","revoked_at":null,"permissions_group":"full"}],"images":[],"servers":[],"load_balancers":[],"database_servers":[],"database_snapshots":[],"cloud_ips":[],"server_groups":[{"id":"grp-12345","resource_type":"server_group","url":"https://api.gb1.brightbox.com/1.0/server_groups/grp-12345","name":"default","description":"All
|
96
|
+
new servers are added to this group unless specified otherwise.","created_at":"2015-10-12T09:23:03Z","default":true}],"firewall_policies":[{"id":"fwp-12345","resource_type":"firewall_policy","url":"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345","default":true,"name":"default","created_at":"2015-10-12T09:23:03Z","description":"Applied
|
97
|
+
to the default server group."}],"owner":{"id":"usr-12345","resource_type":"user","url":"https://api.gb1.brightbox.com/1.0/users/usr-12345","name":"Jason
|
98
|
+
Null","email_address":"jason.null@brightbox.com"},"users":[],"zones":[{"id":"zon-12345","resource_type":"zone","url":"https://api.gb1.brightbox.com/1.0/zones/zon-12345","handle":"gb1-a"},{"id":"zon-12345","resource_type":"zone","url":"https://api.gb1.brightbox.com/1.0/zones/zon-12345","handle":"gb1-b"}]}]'
|
99
|
+
http_version:
|
100
|
+
recorded_at: Mon, 12 Oct 2015 14:53:54 GMT
|
101
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,101 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api.brightbox.dev/token
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"grant_type":"password","username":"jason.null@brightbox.com","password":"N:B3e%7Cmh"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- fog-core/1.32.1
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwLTEyMzQ1Om1vY2J1aXBiaWFhNms2Yw==
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
Cache-Control:
|
24
|
+
- no-store
|
25
|
+
X-Oauth-Scopes:
|
26
|
+
- infrastructure, orbit
|
27
|
+
Content-Length:
|
28
|
+
- '190'
|
29
|
+
X-Content-Type-Options:
|
30
|
+
- nosniff
|
31
|
+
X-Ua-Compatible:
|
32
|
+
- IE=Edge
|
33
|
+
Etag:
|
34
|
+
- '"8ee14672175020dbbb988fe0623ff19a"'
|
35
|
+
X-Request-Id:
|
36
|
+
- 1f42116179b87819053cc6860dfb1fd3
|
37
|
+
X-Runtime:
|
38
|
+
- '0.171759'
|
39
|
+
Server:
|
40
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2014-11-13)
|
41
|
+
Date:
|
42
|
+
- Mon, 12 Oct 2015 14:53:53 GMT
|
43
|
+
Connection:
|
44
|
+
- Keep-Alive
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: '{"access_token":"12249a52a3f5d7aa4912764e6e5d70c78ff664f3","token_type":"Bearer","refresh_token":"3b3245e1cdc86dfab023a80755c7d07c56c4d16e","scope":"infrastructure,
|
48
|
+
orbit","expires_in":7200}'
|
49
|
+
http_version:
|
50
|
+
recorded_at: Mon, 12 Oct 2015 14:53:53 GMT
|
51
|
+
- request:
|
52
|
+
method: get
|
53
|
+
uri: http://api.brightbox.dev/1.0/accounts
|
54
|
+
body:
|
55
|
+
encoding: US-ASCII
|
56
|
+
string: ''
|
57
|
+
headers:
|
58
|
+
User-Agent:
|
59
|
+
- fog-core/1.32.1
|
60
|
+
Authorization:
|
61
|
+
- Bearer 12249a52a3f5d7aa4912764e6e5d70c78ff664f3
|
62
|
+
Content-Type:
|
63
|
+
- application/json
|
64
|
+
response:
|
65
|
+
status:
|
66
|
+
code: 200
|
67
|
+
message:
|
68
|
+
headers:
|
69
|
+
X-Oauth-Scopes:
|
70
|
+
- infrastructure, orbit
|
71
|
+
Content-Type:
|
72
|
+
- application/json; charset=utf-8
|
73
|
+
X-Ua-Compatible:
|
74
|
+
- IE=Edge
|
75
|
+
Etag:
|
76
|
+
- '"c9a269456e92ca15ff834e08ba6414ad"'
|
77
|
+
Cache-Control:
|
78
|
+
- max-age=0, private, must-revalidate
|
79
|
+
X-Request-Id:
|
80
|
+
- 1c2c9d198c6200ba54dd8bbb4deaf74d
|
81
|
+
X-Runtime:
|
82
|
+
- '0.045588'
|
83
|
+
Server:
|
84
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2014-11-13)
|
85
|
+
Date:
|
86
|
+
- Mon, 12 Oct 2015 14:53:53 GMT
|
87
|
+
Content-Length:
|
88
|
+
- '1611'
|
89
|
+
Connection:
|
90
|
+
- Keep-Alive
|
91
|
+
body:
|
92
|
+
encoding: UTF-8
|
93
|
+
string: '[{"id":"acc-12345","resource_type":"account","url":"https://api.gb1.brightbox.com/1.0/accounts/acc-12345","name":"CLI
|
94
|
+
test account","status":"active","ram_limit":3200000,"ram_used":0,"dbs_ram_limit":32768,"dbs_ram_used":0,"cloud_ips_limit":32,"cloud_ips_used":0,"load_balancers_limit":5,"load_balancers_used":0,"clients":[{"id":"cli-12345","resource_type":"api_client","url":"https://api.gb1.brightbox.com/1.0/api_clients/cli-12345","name":"CLI
|
95
|
+
test API client","description":"","revoked_at":null,"permissions_group":"full"}],"images":[],"servers":[],"load_balancers":[],"database_servers":[],"database_snapshots":[],"cloud_ips":[],"server_groups":[{"id":"grp-12345","resource_type":"server_group","url":"https://api.gb1.brightbox.com/1.0/server_groups/grp-12345","name":"default","description":"All
|
96
|
+
new servers are added to this group unless specified otherwise.","created_at":"2015-10-12T09:23:03Z","default":true}],"firewall_policies":[{"id":"fwp-12345","resource_type":"firewall_policy","url":"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345","default":true,"name":"default","created_at":"2015-10-12T09:23:03Z","description":"Applied
|
97
|
+
to the default server group."}],"owner":{"id":"usr-12345","resource_type":"user","url":"https://api.gb1.brightbox.com/1.0/users/usr-12345","name":"Jason
|
98
|
+
Null","email_address":"jason.null@brightbox.com"},"users":[],"zones":[{"id":"zon-12345","resource_type":"zone","url":"https://api.gb1.brightbox.com/1.0/zones/zon-12345","handle":"gb1-a"},{"id":"zon-12345","resource_type":"zone","url":"https://api.gb1.brightbox.com/1.0/zones/zon-12345","handle":"gb1-b"}]}]'
|
99
|
+
http_version:
|
100
|
+
recorded_at: Mon, 12 Oct 2015 14:53:53 GMT
|
101
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,101 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api.brightbox.dev/token
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"grant_type":"password","username":"jason.null@brightbox.com","password":"N:B3e%7Cmh"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- fog-core/1.32.1
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwLTEyMzQ1Om1vY2J1aXBiaWFhNms2Yw==
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
Cache-Control:
|
24
|
+
- no-store
|
25
|
+
X-Oauth-Scopes:
|
26
|
+
- infrastructure, orbit
|
27
|
+
Content-Length:
|
28
|
+
- '190'
|
29
|
+
X-Content-Type-Options:
|
30
|
+
- nosniff
|
31
|
+
X-Ua-Compatible:
|
32
|
+
- IE=Edge
|
33
|
+
Etag:
|
34
|
+
- '"83e745f60b53dd59c18d345a33ba61dd"'
|
35
|
+
X-Request-Id:
|
36
|
+
- facf28b9c514be4a55e55964e7c3a4bd
|
37
|
+
X-Runtime:
|
38
|
+
- '0.170048'
|
39
|
+
Server:
|
40
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2014-11-13)
|
41
|
+
Date:
|
42
|
+
- Mon, 12 Oct 2015 14:53:54 GMT
|
43
|
+
Connection:
|
44
|
+
- Keep-Alive
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: '{"access_token":"67ba17bf0f2c8c8b5fbcdd27745ded8c8acd75a1","token_type":"Bearer","refresh_token":"7d0559c8de7546463a7fb3e608e234ba4b980aff","scope":"infrastructure,
|
48
|
+
orbit","expires_in":7200}'
|
49
|
+
http_version:
|
50
|
+
recorded_at: Mon, 12 Oct 2015 14:53:54 GMT
|
51
|
+
- request:
|
52
|
+
method: get
|
53
|
+
uri: http://api.brightbox.dev/1.0/accounts
|
54
|
+
body:
|
55
|
+
encoding: US-ASCII
|
56
|
+
string: ''
|
57
|
+
headers:
|
58
|
+
User-Agent:
|
59
|
+
- fog-core/1.32.1
|
60
|
+
Authorization:
|
61
|
+
- Bearer 67ba17bf0f2c8c8b5fbcdd27745ded8c8acd75a1
|
62
|
+
Content-Type:
|
63
|
+
- application/json
|
64
|
+
response:
|
65
|
+
status:
|
66
|
+
code: 200
|
67
|
+
message:
|
68
|
+
headers:
|
69
|
+
X-Oauth-Scopes:
|
70
|
+
- infrastructure, orbit
|
71
|
+
Content-Type:
|
72
|
+
- application/json; charset=utf-8
|
73
|
+
X-Ua-Compatible:
|
74
|
+
- IE=Edge
|
75
|
+
Etag:
|
76
|
+
- '"c9a269456e92ca15ff834e08ba6414ad"'
|
77
|
+
Cache-Control:
|
78
|
+
- max-age=0, private, must-revalidate
|
79
|
+
X-Request-Id:
|
80
|
+
- ad87366e92ce11bd3dd96c53cd4dc77c
|
81
|
+
X-Runtime:
|
82
|
+
- '0.045671'
|
83
|
+
Server:
|
84
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2014-11-13)
|
85
|
+
Date:
|
86
|
+
- Mon, 12 Oct 2015 14:53:54 GMT
|
87
|
+
Content-Length:
|
88
|
+
- '1611'
|
89
|
+
Connection:
|
90
|
+
- Keep-Alive
|
91
|
+
body:
|
92
|
+
encoding: UTF-8
|
93
|
+
string: '[{"id":"acc-12345","resource_type":"account","url":"https://api.gb1.brightbox.com/1.0/accounts/acc-12345","name":"CLI
|
94
|
+
test account","status":"active","ram_limit":3200000,"ram_used":0,"dbs_ram_limit":32768,"dbs_ram_used":0,"cloud_ips_limit":32,"cloud_ips_used":0,"load_balancers_limit":5,"load_balancers_used":0,"clients":[{"id":"cli-12345","resource_type":"api_client","url":"https://api.gb1.brightbox.com/1.0/api_clients/cli-12345","name":"CLI
|
95
|
+
test API client","description":"","revoked_at":null,"permissions_group":"full"}],"images":[],"servers":[],"load_balancers":[],"database_servers":[],"database_snapshots":[],"cloud_ips":[],"server_groups":[{"id":"grp-12345","resource_type":"server_group","url":"https://api.gb1.brightbox.com/1.0/server_groups/grp-12345","name":"default","description":"All
|
96
|
+
new servers are added to this group unless specified otherwise.","created_at":"2015-10-12T09:23:03Z","default":true}],"firewall_policies":[{"id":"fwp-12345","resource_type":"firewall_policy","url":"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345","default":true,"name":"default","created_at":"2015-10-12T09:23:03Z","description":"Applied
|
97
|
+
to the default server group."}],"owner":{"id":"usr-12345","resource_type":"user","url":"https://api.gb1.brightbox.com/1.0/users/usr-12345","name":"Jason
|
98
|
+
Null","email_address":"jason.null@brightbox.com"},"users":[],"zones":[{"id":"zon-12345","resource_type":"zone","url":"https://api.gb1.brightbox.com/1.0/zones/zon-12345","handle":"gb1-a"},{"id":"zon-12345","resource_type":"zone","url":"https://api.gb1.brightbox.com/1.0/zones/zon-12345","handle":"gb1-b"}]}]'
|
99
|
+
http_version:
|
100
|
+
recorded_at: Mon, 12 Oct 2015 14:53:54 GMT
|
101
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,101 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api.brightbox.dev/token
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"grant_type":"password","username":"jason.null@brightbox.com","password":"N:B3e%7Cmh"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- fog-core/1.32.1
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwLTEyMzQ1Om1vY2J1aXBiaWFhNms2Yw==
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
Cache-Control:
|
24
|
+
- no-store
|
25
|
+
X-Oauth-Scopes:
|
26
|
+
- infrastructure, orbit
|
27
|
+
Content-Length:
|
28
|
+
- '190'
|
29
|
+
X-Content-Type-Options:
|
30
|
+
- nosniff
|
31
|
+
X-Ua-Compatible:
|
32
|
+
- IE=Edge
|
33
|
+
Etag:
|
34
|
+
- '"4c6305171eb034617f74e513e2cf77a7"'
|
35
|
+
X-Request-Id:
|
36
|
+
- 44702d958126ab7bc04ce5e380f36bdb
|
37
|
+
X-Runtime:
|
38
|
+
- '0.089354'
|
39
|
+
Server:
|
40
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2014-11-13)
|
41
|
+
Date:
|
42
|
+
- Mon, 12 Oct 2015 14:53:53 GMT
|
43
|
+
Connection:
|
44
|
+
- Keep-Alive
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: '{"access_token":"c8038e9c15ef8c53dcf1c746944c09283ad95c3b","token_type":"Bearer","refresh_token":"1e36d9917dc7ecfcbae82b35711746ceecbd602f","scope":"infrastructure,
|
48
|
+
orbit","expires_in":7200}'
|
49
|
+
http_version:
|
50
|
+
recorded_at: Mon, 12 Oct 2015 14:53:53 GMT
|
51
|
+
- request:
|
52
|
+
method: get
|
53
|
+
uri: http://api.brightbox.dev/1.0/accounts
|
54
|
+
body:
|
55
|
+
encoding: US-ASCII
|
56
|
+
string: ''
|
57
|
+
headers:
|
58
|
+
User-Agent:
|
59
|
+
- fog-core/1.32.1
|
60
|
+
Authorization:
|
61
|
+
- Bearer c8038e9c15ef8c53dcf1c746944c09283ad95c3b
|
62
|
+
Content-Type:
|
63
|
+
- application/json
|
64
|
+
response:
|
65
|
+
status:
|
66
|
+
code: 200
|
67
|
+
message:
|
68
|
+
headers:
|
69
|
+
X-Oauth-Scopes:
|
70
|
+
- infrastructure, orbit
|
71
|
+
Content-Type:
|
72
|
+
- application/json; charset=utf-8
|
73
|
+
X-Ua-Compatible:
|
74
|
+
- IE=Edge
|
75
|
+
Etag:
|
76
|
+
- '"c9a269456e92ca15ff834e08ba6414ad"'
|
77
|
+
Cache-Control:
|
78
|
+
- max-age=0, private, must-revalidate
|
79
|
+
X-Request-Id:
|
80
|
+
- 813c1093305858464f5f6e3bd26e7e85
|
81
|
+
X-Runtime:
|
82
|
+
- '0.045726'
|
83
|
+
Server:
|
84
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2014-11-13)
|
85
|
+
Date:
|
86
|
+
- Mon, 12 Oct 2015 14:53:53 GMT
|
87
|
+
Content-Length:
|
88
|
+
- '1611'
|
89
|
+
Connection:
|
90
|
+
- Keep-Alive
|
91
|
+
body:
|
92
|
+
encoding: UTF-8
|
93
|
+
string: '[{"id":"acc-12345","resource_type":"account","url":"https://api.gb1.brightbox.com/1.0/accounts/acc-12345","name":"CLI
|
94
|
+
test account","status":"active","ram_limit":3200000,"ram_used":0,"dbs_ram_limit":32768,"dbs_ram_used":0,"cloud_ips_limit":32,"cloud_ips_used":0,"load_balancers_limit":5,"load_balancers_used":0,"clients":[{"id":"cli-12345","resource_type":"api_client","url":"https://api.gb1.brightbox.com/1.0/api_clients/cli-12345","name":"CLI
|
95
|
+
test API client","description":"","revoked_at":null,"permissions_group":"full"}],"images":[],"servers":[],"load_balancers":[],"database_servers":[],"database_snapshots":[],"cloud_ips":[],"server_groups":[{"id":"grp-12345","resource_type":"server_group","url":"https://api.gb1.brightbox.com/1.0/server_groups/grp-12345","name":"default","description":"All
|
96
|
+
new servers are added to this group unless specified otherwise.","created_at":"2015-10-12T09:23:03Z","default":true}],"firewall_policies":[{"id":"fwp-12345","resource_type":"firewall_policy","url":"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345","default":true,"name":"default","created_at":"2015-10-12T09:23:03Z","description":"Applied
|
97
|
+
to the default server group."}],"owner":{"id":"usr-12345","resource_type":"user","url":"https://api.gb1.brightbox.com/1.0/users/usr-12345","name":"Jason
|
98
|
+
Null","email_address":"jason.null@brightbox.com"},"users":[],"zones":[{"id":"zon-12345","resource_type":"zone","url":"https://api.gb1.brightbox.com/1.0/zones/zon-12345","handle":"gb1-a"},{"id":"zon-12345","resource_type":"zone","url":"https://api.gb1.brightbox.com/1.0/zones/zon-12345","handle":"gb1-b"}]}]'
|
99
|
+
http_version:
|
100
|
+
recorded_at: Mon, 12 Oct 2015 14:53:53 GMT
|
101
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,101 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api.brightbox.dev/token
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"grant_type":"password","username":"jason.null@brightbox.com","password":"N:B3e%7Cmh"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- fog-core/1.32.1
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwLTEyMzQ1Om1vY2J1aXBiaWFhNms2Yw==
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
Cache-Control:
|
24
|
+
- no-store
|
25
|
+
X-Oauth-Scopes:
|
26
|
+
- infrastructure, orbit
|
27
|
+
Content-Length:
|
28
|
+
- '190'
|
29
|
+
X-Content-Type-Options:
|
30
|
+
- nosniff
|
31
|
+
X-Ua-Compatible:
|
32
|
+
- IE=Edge
|
33
|
+
Etag:
|
34
|
+
- '"0c187be7c32a4e07d5ba8e4941f8cb23"'
|
35
|
+
X-Request-Id:
|
36
|
+
- 3df44cf01874a87583b07e45c05e972d
|
37
|
+
X-Runtime:
|
38
|
+
- '0.090117'
|
39
|
+
Server:
|
40
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2014-11-13)
|
41
|
+
Date:
|
42
|
+
- Mon, 12 Oct 2015 14:53:52 GMT
|
43
|
+
Connection:
|
44
|
+
- Keep-Alive
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: '{"access_token":"007db0c2d5319fe5c1699d77e41e3a279c53ff26","token_type":"Bearer","refresh_token":"6011155876a84e5a18f76522b8cec0d5bd95b936","scope":"infrastructure,
|
48
|
+
orbit","expires_in":7200}'
|
49
|
+
http_version:
|
50
|
+
recorded_at: Mon, 12 Oct 2015 14:53:52 GMT
|
51
|
+
- request:
|
52
|
+
method: get
|
53
|
+
uri: http://api.brightbox.dev/1.0/accounts
|
54
|
+
body:
|
55
|
+
encoding: US-ASCII
|
56
|
+
string: ''
|
57
|
+
headers:
|
58
|
+
User-Agent:
|
59
|
+
- fog-core/1.32.1
|
60
|
+
Authorization:
|
61
|
+
- Bearer 007db0c2d5319fe5c1699d77e41e3a279c53ff26
|
62
|
+
Content-Type:
|
63
|
+
- application/json
|
64
|
+
response:
|
65
|
+
status:
|
66
|
+
code: 200
|
67
|
+
message:
|
68
|
+
headers:
|
69
|
+
X-Oauth-Scopes:
|
70
|
+
- infrastructure, orbit
|
71
|
+
Content-Type:
|
72
|
+
- application/json; charset=utf-8
|
73
|
+
X-Ua-Compatible:
|
74
|
+
- IE=Edge
|
75
|
+
Etag:
|
76
|
+
- '"c9a269456e92ca15ff834e08ba6414ad"'
|
77
|
+
Cache-Control:
|
78
|
+
- max-age=0, private, must-revalidate
|
79
|
+
X-Request-Id:
|
80
|
+
- 0b74f8782db16178888090c0ff65c87f
|
81
|
+
X-Runtime:
|
82
|
+
- '0.048228'
|
83
|
+
Server:
|
84
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2014-11-13)
|
85
|
+
Date:
|
86
|
+
- Mon, 12 Oct 2015 14:53:52 GMT
|
87
|
+
Content-Length:
|
88
|
+
- '1611'
|
89
|
+
Connection:
|
90
|
+
- Keep-Alive
|
91
|
+
body:
|
92
|
+
encoding: UTF-8
|
93
|
+
string: '[{"id":"acc-12345","resource_type":"account","url":"https://api.gb1.brightbox.com/1.0/accounts/acc-12345","name":"CLI
|
94
|
+
test account","status":"active","ram_limit":3200000,"ram_used":0,"dbs_ram_limit":32768,"dbs_ram_used":0,"cloud_ips_limit":32,"cloud_ips_used":0,"load_balancers_limit":5,"load_balancers_used":0,"clients":[{"id":"cli-12345","resource_type":"api_client","url":"https://api.gb1.brightbox.com/1.0/api_clients/cli-12345","name":"CLI
|
95
|
+
test API client","description":"","revoked_at":null,"permissions_group":"full"}],"images":[],"servers":[],"load_balancers":[],"database_servers":[],"database_snapshots":[],"cloud_ips":[],"server_groups":[{"id":"grp-12345","resource_type":"server_group","url":"https://api.gb1.brightbox.com/1.0/server_groups/grp-12345","name":"default","description":"All
|
96
|
+
new servers are added to this group unless specified otherwise.","created_at":"2015-10-12T09:23:03Z","default":true}],"firewall_policies":[{"id":"fwp-12345","resource_type":"firewall_policy","url":"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345","default":true,"name":"default","created_at":"2015-10-12T09:23:03Z","description":"Applied
|
97
|
+
to the default server group."}],"owner":{"id":"usr-12345","resource_type":"user","url":"https://api.gb1.brightbox.com/1.0/users/usr-12345","name":"Jason
|
98
|
+
Null","email_address":"jason.null@brightbox.com"},"users":[],"zones":[{"id":"zon-12345","resource_type":"zone","url":"https://api.gb1.brightbox.com/1.0/zones/zon-12345","handle":"gb1-a"},{"id":"zon-12345","resource_type":"zone","url":"https://api.gb1.brightbox.com/1.0/zones/zon-12345","handle":"gb1-b"}]}]'
|
99
|
+
http_version:
|
100
|
+
recorded_at: Mon, 12 Oct 2015 14:53:52 GMT
|
101
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,101 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api.brightbox.dev/token
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"grant_type":"password","username":"jason.null@brightbox.com","password":"N:B3e%7Cmh"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- fog-core/1.32.1
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwLTEyMzQ1Om1vY2J1aXBiaWFhNms2Yw==
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
Cache-Control:
|
24
|
+
- no-store
|
25
|
+
X-Oauth-Scopes:
|
26
|
+
- infrastructure, orbit
|
27
|
+
Content-Length:
|
28
|
+
- '190'
|
29
|
+
X-Content-Type-Options:
|
30
|
+
- nosniff
|
31
|
+
X-Ua-Compatible:
|
32
|
+
- IE=Edge
|
33
|
+
Etag:
|
34
|
+
- '"07327efef8081c3646b3e15bc0109f24"'
|
35
|
+
X-Request-Id:
|
36
|
+
- 2b0d7c3ef5a6ca9350bf224c49f8d228
|
37
|
+
X-Runtime:
|
38
|
+
- '0.087681'
|
39
|
+
Server:
|
40
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2014-11-13)
|
41
|
+
Date:
|
42
|
+
- Mon, 12 Oct 2015 14:53:52 GMT
|
43
|
+
Connection:
|
44
|
+
- Keep-Alive
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: '{"access_token":"e4d0e860186948c4fe5d46f6637e2d64f3d75a0b","token_type":"Bearer","refresh_token":"4ee0543818f24cc945944b30c7365a2995d3c467","scope":"infrastructure,
|
48
|
+
orbit","expires_in":7200}'
|
49
|
+
http_version:
|
50
|
+
recorded_at: Mon, 12 Oct 2015 14:53:52 GMT
|
51
|
+
- request:
|
52
|
+
method: get
|
53
|
+
uri: http://api.brightbox.dev/1.0/accounts
|
54
|
+
body:
|
55
|
+
encoding: US-ASCII
|
56
|
+
string: ''
|
57
|
+
headers:
|
58
|
+
User-Agent:
|
59
|
+
- fog-core/1.32.1
|
60
|
+
Authorization:
|
61
|
+
- Bearer e4d0e860186948c4fe5d46f6637e2d64f3d75a0b
|
62
|
+
Content-Type:
|
63
|
+
- application/json
|
64
|
+
response:
|
65
|
+
status:
|
66
|
+
code: 200
|
67
|
+
message:
|
68
|
+
headers:
|
69
|
+
X-Oauth-Scopes:
|
70
|
+
- infrastructure, orbit
|
71
|
+
Content-Type:
|
72
|
+
- application/json; charset=utf-8
|
73
|
+
X-Ua-Compatible:
|
74
|
+
- IE=Edge
|
75
|
+
Etag:
|
76
|
+
- '"c9a269456e92ca15ff834e08ba6414ad"'
|
77
|
+
Cache-Control:
|
78
|
+
- max-age=0, private, must-revalidate
|
79
|
+
X-Request-Id:
|
80
|
+
- 81076b505b40bac2fbced1b019efcc58
|
81
|
+
X-Runtime:
|
82
|
+
- '0.046246'
|
83
|
+
Server:
|
84
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2014-11-13)
|
85
|
+
Date:
|
86
|
+
- Mon, 12 Oct 2015 14:53:52 GMT
|
87
|
+
Content-Length:
|
88
|
+
- '1611'
|
89
|
+
Connection:
|
90
|
+
- Keep-Alive
|
91
|
+
body:
|
92
|
+
encoding: UTF-8
|
93
|
+
string: '[{"id":"acc-12345","resource_type":"account","url":"https://api.gb1.brightbox.com/1.0/accounts/acc-12345","name":"CLI
|
94
|
+
test account","status":"active","ram_limit":3200000,"ram_used":0,"dbs_ram_limit":32768,"dbs_ram_used":0,"cloud_ips_limit":32,"cloud_ips_used":0,"load_balancers_limit":5,"load_balancers_used":0,"clients":[{"id":"cli-12345","resource_type":"api_client","url":"https://api.gb1.brightbox.com/1.0/api_clients/cli-12345","name":"CLI
|
95
|
+
test API client","description":"","revoked_at":null,"permissions_group":"full"}],"images":[],"servers":[],"load_balancers":[],"database_servers":[],"database_snapshots":[],"cloud_ips":[],"server_groups":[{"id":"grp-12345","resource_type":"server_group","url":"https://api.gb1.brightbox.com/1.0/server_groups/grp-12345","name":"default","description":"All
|
96
|
+
new servers are added to this group unless specified otherwise.","created_at":"2015-10-12T09:23:03Z","default":true}],"firewall_policies":[{"id":"fwp-12345","resource_type":"firewall_policy","url":"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345","default":true,"name":"default","created_at":"2015-10-12T09:23:03Z","description":"Applied
|
97
|
+
to the default server group."}],"owner":{"id":"usr-12345","resource_type":"user","url":"https://api.gb1.brightbox.com/1.0/users/usr-12345","name":"Jason
|
98
|
+
Null","email_address":"jason.null@brightbox.com"},"users":[],"zones":[{"id":"zon-12345","resource_type":"zone","url":"https://api.gb1.brightbox.com/1.0/zones/zon-12345","handle":"gb1-a"},{"id":"zon-12345","resource_type":"zone","url":"https://api.gb1.brightbox.com/1.0/zones/zon-12345","handle":"gb1-b"}]}]'
|
99
|
+
http_version:
|
100
|
+
recorded_at: Mon, 12 Oct 2015 14:53:52 GMT
|
101
|
+
recorded_with: VCR 2.5.0
|