brightbox-cli 1.0.0.rc1 → 1.0.0.rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. data/Gemfile.lock +1 -1
  2. data/Rakefile +0 -6
  3. data/lib/brightbox-cli/commands/accounts-accept-invite.rb +1 -0
  4. data/lib/brightbox-cli/commands/accounts-default.rb +1 -1
  5. data/lib/brightbox-cli/gli_global_hooks.rb +2 -1
  6. data/lib/brightbox-cli/version.rb +1 -1
  7. data/spec/cassettes/Brightbox_BBConfig/_find_or_set_default_account/when_client_is_not_authenticated/does_not_raise_an_error.yml +258 -193
  8. data/spec/cassettes/Brightbox_BBConfig/_find_or_set_default_account/when_client_may_access_one_account/updates_the_setting.yml +258 -195
  9. data/spec/cassettes/Firewall_policies/update/when_the_policy_does_not_exist/prints_error_to_STDERR.yml +153 -0
  10. data/spec/cassettes/brightbox_config/client_add/when_adding_a_new_client/does_not_error.yml +229 -160
  11. data/spec/cassettes/brightbox_config/client_add/when_adding_a_new_client/sets_up_the_config.yml +229 -162
  12. data/spec/cassettes/brightbox_config/client_add/when_new_client_is_first_and_only_client/does_not_change_the_default_client.yml +229 -162
  13. data/spec/cassettes/brightbox_config/client_add/when_new_client_is_first_and_only_client/does_not_error.yml +229 -162
  14. data/spec/cassettes/brightbox_config/client_add/when_new_client_is_first_and_only_client/sets_this_as_the_default_client.yml +229 -162
  15. data/spec/cassettes/brightbox_config/client_add/when_new_client_is_first_and_only_client/sets_up_the_config.yml +229 -162
  16. data/spec/commands/accounts/list_spec.rb +1 -1
  17. data/spec/commands/config/user_add_spec.rb +1 -1
  18. data/spec/spec_helper.rb +4 -0
  19. data/spec/support/vcr.rb +2 -2
  20. data/spec/unit/brightbox/bb_config/add_section_spec.rb +1 -1
  21. data/spec/unit/brightbox/bb_config/renew_tokens_spec.rb +1 -1
  22. data/spec/unit/brightbox/firewall_policy/create_spec.rb +1 -1
  23. data/spec/unit/brightbox/firewall_policy/destroy_spec.rb +1 -1
  24. data/spec/unit/brightbox/firewall_rule/create_spec.rb +1 -1
  25. data/spec/unit/brightbox/firewall_rule/destroy_spec.rb +1 -1
  26. data/spec/unit/brightbox/firewall_rule/find_spec.rb +1 -1
  27. data/spec/unit/brightbox/firewall_rule/from_policy_spec.rb +1 -1
  28. data/spec/unit/brightbox/server/destroy_spec.rb +1 -1
  29. data/spec/unit/brightbox/server/find_or_call_spec.rb +1 -1
  30. data/spec/unit/brightbox/server/shutdown_spec.rb +1 -1
  31. data/spec/unit/brightbox/server/start_spec.rb +1 -1
  32. data/spec/unit/brightbox/server/stop_spec.rb +1 -1
  33. data/spec/unit/brightbox/server/update_spec.rb +1 -1
  34. data/spec/unit/brightbox/server_group/find_spec.rb +1 -1
  35. metadata +5 -4
  36. data/lib/brightbox-cli/command_generator.rb +0 -53
@@ -1,264 +1,327 @@
1
- ---
2
- http_interactions:
3
- - request:
1
+ ---
2
+ recorded_with: VCR 2.5.0
3
+ http_interactions:
4
+ - request:
4
5
  method: get
5
6
  uri: http://api.brightbox.dev/1.0/account
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
7
+ body:
8
+ string: ""
9
+ headers:
10
+ User-Agent:
11
11
  - fog/1.15.0
12
- Authorization:
13
- - OAuth 63a4f6dbf53263e7468d3084ae9c50ecdcdf1714
14
- Content-Type:
12
+ Content-Type:
15
13
  - application/json
16
- response:
17
- status:
14
+ Authorization:
15
+ - OAuth 63a4f6dbf53263e7468d3084ae9c50ecdcdf1714
16
+ response:
17
+ status:
18
18
  code: 200
19
19
  message:
20
- headers:
21
- Content-Type:
22
- - application/json; charset=utf-8
23
- X-UA-Compatible:
20
+ headers:
21
+ Date:
22
+ - Tue, 27 Aug 2013 16:12:40 GMT
23
+ X-UA-Compatible:
24
24
  - IE=Edge
25
- ETag:
26
- - '"1e11c0b6a848197a2fc399e1a9ebb662"'
27
- Cache-Control:
28
- - max-age=0, private, must-revalidate
29
- X-Request-Id:
25
+ X-Request-Id:
30
26
  - 01458febfd839b35068837e5dab8176b
31
- X-Runtime:
32
- - '0.363480'
33
- Date:
34
- - Tue, 27 Aug 2013 16:12:40 GMT
35
- Connection:
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ X-Runtime:
30
+ - "0.363480"
31
+ ETag:
32
+ - "\"1e11c0b6a848197a2fc399e1a9ebb662\""
33
+ Connection:
36
34
  - close
37
- body:
38
- encoding: UTF-8
39
- string: '{"id":"acc-12345","resource_type":"account","url":"https://api.gb1.brightbox.com/1.0/accounts/acc-12345","name":"Avkruvviumpksysor","status":"active","address_1":"Israel
40
- Flats","address_2":"","city":"Clarkmouth","county":"","postcode":"97088-3817","country_code":"GB","country_name":"United
41
- Kingdom","vat_registration_number":"","telephone_number":"+445722683970","telephone_verified":false,"verified_telephone":null,"verified_at":null,"verified_ip":null,"created_at":"2013-08-27T15:47:00Z","ram_limit":32768,"ram_used":15360,"cloud_ips_limit":20,"cloud_ips_used":1,"load_balancers_limit":5,"load_balancers_used":0,"valid_credit_card":false,"library_ftp_host":"ftp.library.gb1.brightbox.com","library_ftp_user":"acc-12345","library_ftp_password":null,"clients":[{"id":"cli-12345","resource_type":"api_client","url":"https://api.gb1.brightbox.com/1.0/api_clients/cli-12345","name":null,"description":null,"revoked_at":null}],"images":[],"servers":[{"id":"srv-12345","resource_type":"server","url":"https://api.gb1.brightbox.com/1.0/servers/srv-12345","name":"wow","status":"active","hostname":"srv-12345","fqdn":"srv-12345.gb1.brightbox.com","created_at":"2013-08-27T15:54:24Z","started_at":"2013-08-27T15:54:27Z","deleted_at":null},{"id":"srv-12345","resource_type":"server","url":"https://api.gb1.brightbox.com/1.0/servers/srv-12345","name":"medium
42
- servers","status":"active","hostname":"srv-12345","fqdn":"srv-12345.gb1.brightbox.com","created_at":"2013-08-27T15:54:26Z","started_at":"2013-08-27T15:54:29Z","deleted_at":null},{"id":"srv-12345","resource_type":"server","url":"https://api.gb1.brightbox.com/1.0/servers/srv-12345","name":"","status":"deleted","hostname":"srv-12345","fqdn":"srv-12345.gb1.brightbox.com","created_at":"2013-08-27T15:54:30Z","started_at":"2013-08-27T15:54:32Z","deleted_at":"2013-08-27T15:54:35Z"},{"id":"srv-12345","resource_type":"server","url":"https://api.gb1.brightbox.com/1.0/servers/srv-12345","name":"rspec_server_shutdown","status":"active","hostname":"srv-12345","fqdn":"srv-12345.gb1.brightbox.com","created_at":"2013-08-27T15:54:36Z","started_at":"2013-08-27T15:54:38Z","deleted_at":null},{"id":"srv-12345","resource_type":"server","url":"https://api.gb1.brightbox.com/1.0/servers/srv-12345","name":"rspec_server_start","status":"active","hostname":"srv-12345","fqdn":"srv-12345.gb1.brightbox.com","created_at":"2013-08-27T15:54:41Z","started_at":"2013-08-27T15:54:47Z","deleted_at":null},{"id":"srv-12345","resource_type":"server","url":"https://api.gb1.brightbox.com/1.0/servers/srv-12345","name":"rspec_server_stop","status":"inactive","hostname":"srv-12345","fqdn":"srv-12345.gb1.brightbox.com","created_at":"2013-08-27T15:54:48Z","started_at":"2013-08-27T15:54:51Z","deleted_at":null},{"id":"srv-12345","resource_type":"server","url":"https://api.gb1.brightbox.com/1.0/servers/srv-12345","name":"","status":"deleted","hostname":"srv-12345","fqdn":"srv-12345.gb1.brightbox.com","created_at":"2013-08-27T15:54:52Z","started_at":"2013-08-27T15:54:55Z","deleted_at":"2013-08-27T15:54:58Z"},{"id":"srv-12345","resource_type":"server","url":"https://api.gb1.brightbox.com/1.0/servers/srv-12345","name":"","status":"deleted","hostname":"srv-12345","fqdn":"srv-12345.gb1.brightbox.com","created_at":"2013-08-27T16:12:22Z","started_at":"2013-08-27T16:12:25Z","deleted_at":"2013-08-27T16:12:27Z"}],"load_balancers":[],"cloud_ips":[{"id":"cip-12345","resource_type":"cloud_ip","url":"https://api.gb1.brightbox.com/1.0/cloud_ips/cip-12345","status":"unmapped","public_ip":"217.16.230.132","reverse_dns":"cip-12345-16-230-132.gb1.brightbox.com","name":null}],"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
43
- new servers are added to this group unless specified otherwise.","created_at":"2013-08-27T15:47:00Z","default":true},{"id":"grp-12345","resource_type":"server_group","url":"https://api.gb1.brightbox.com/1.0/server_groups/grp-12345","name":"test","description":null,"created_at":"2013-08-27T15:54:53Z","default":false},{"id":"grp-12345","resource_type":"server_group","url":"https://api.gb1.brightbox.com/1.0/server_groups/grp-12345","name":"test","description":null,"created_at":"2013-08-27T16:12:22Z","default":false}],"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":"2013-08-27T15:47:00Z","description":"Applied
44
- to the default server group."},{"id":"fwp-12345","resource_type":"firewall_policy","url":"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345","default":false,"name":"rspec_firewall_policy_apply","created_at":"2013-08-27T15:54:12Z","description":null},{"id":"fwp-12345","resource_type":"firewall_policy","url":"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345","default":false,"name":"rspec_firewall_policy","created_at":"2013-08-27T15:54:13Z","description":null},{"id":"fwp-12345","resource_type":"firewall_policy","url":"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345","default":false,"name":null,"created_at":"2013-08-27T15:54:20Z","description":null},{"id":"fwp-12345","resource_type":"firewall_policy","url":"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345","default":false,"name":null,"created_at":"2013-08-27T15:54:21Z","description":null},{"id":"fwp-12345","resource_type":"firewall_policy","url":"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345","default":false,"name":"rspec_firewall_policy","created_at":"2013-08-27T15:56:46Z","description":null},{"id":"fwp-12345","resource_type":"firewall_policy","url":"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345","default":false,"name":"rspec_firewall_policy","created_at":"2013-08-27T16:06:22Z","description":null}],"owner":{"id":"usr-12345","resource_type":"user","url":"https://api.gb1.brightbox.com/1.0/users/usr-12345","name":"Teresa
45
- Ullrich","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"}]}'
35
+ Cache-Control:
36
+ - max-age=0, private, must-revalidate
37
+ body:
38
+ string: "{\"id\":\"acc-12345\",\"resource_type\":\"account\",\"url\":\"https://api.gb1.brightbox.com/1.0/accounts/acc-12345\",\"name\":\"Avkruvviumpksysor\",\"status\":\"active\",\"address_1\":\"Israel Flats\",\"address_2\":\"\",\"city\":\"Clarkmouth\",\"county\":\"\",\"postcode\":\"97088-3817\",\"country_code\":\"GB\",\"country_name\":\"United Kingdom\",\"vat_registration_number\":\"\",\"telephone_number\":\"+445722683970\",\"telephone_verified\":false,\"verified_telephone\":null,\"verified_at\":null,\"verified_ip\":null,\"created_at\":\"2013-08-27T15:47:00Z\",\"ram_limit\":32768,\"ram_used\":15360,\"cloud_ips_limit\":20,\"cloud_ips_used\":1,\"load_balancers_limit\":5,\"load_balancers_used\":0,\"valid_credit_card\":false,\"library_ftp_host\":\"ftp.library.gb1.brightbox.com\",\"library_ftp_user\":\"acc-12345\",\"library_ftp_password\":null,\"clients\":[{\"id\":\"cli-12345\",\"resource_type\":\"api_client\",\"url\":\"https://api.gb1.brightbox.com/1.0/api_clients/cli-12345\",\"name\":null,\"description\":null,\"revoked_at\":null}],\"images\":[],\"servers\":[{\"id\":\"srv-12345\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-12345\",\"name\":\"wow\",\"status\":\"active\",\"hostname\":\"srv-12345\",\"fqdn\":\"srv-12345.gb1.brightbox.com\",\"created_at\":\"2013-08-27T15:54:24Z\",\"started_at\":\"2013-08-27T15:54:27Z\",\"deleted_at\":null},{\"id\":\"srv-12345\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-12345\",\"name\":\"medium servers\",\"status\":\"active\",\"hostname\":\"srv-12345\",\"fqdn\":\"srv-12345.gb1.brightbox.com\",\"created_at\":\"2013-08-27T15:54:26Z\",\"started_at\":\"2013-08-27T15:54:29Z\",\"deleted_at\":null},{\"id\":\"srv-12345\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-12345\",\"name\":\"\",\"status\":\"deleted\",\"hostname\":\"srv-12345\",\"fqdn\":\"srv-12345.gb1.brightbox.com\",\"created_at\":\"2013-08-27T15:54:30Z\",\"started_at\":\"2013-08-27T15:54:32Z\",\"deleted_at\":\"2013-08-27T15:54:35Z\"},{\"id\":\"srv-12345\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-12345\",\"name\":\"rspec_server_shutdown\",\"status\":\"active\",\"hostname\":\"srv-12345\",\"fqdn\":\"srv-12345.gb1.brightbox.com\",\"created_at\":\"2013-08-27T15:54:36Z\",\"started_at\":\"2013-08-27T15:54:38Z\",\"deleted_at\":null},{\"id\":\"srv-12345\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-12345\",\"name\":\"rspec_server_start\",\"status\":\"active\",\"hostname\":\"srv-12345\",\"fqdn\":\"srv-12345.gb1.brightbox.com\",\"created_at\":\"2013-08-27T15:54:41Z\",\"started_at\":\"2013-08-27T15:54:47Z\",\"deleted_at\":null},{\"id\":\"srv-12345\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-12345\",\"name\":\"rspec_server_stop\",\"status\":\"inactive\",\"hostname\":\"srv-12345\",\"fqdn\":\"srv-12345.gb1.brightbox.com\",\"created_at\":\"2013-08-27T15:54:48Z\",\"started_at\":\"2013-08-27T15:54:51Z\",\"deleted_at\":null},{\"id\":\"srv-12345\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-12345\",\"name\":\"\",\"status\":\"deleted\",\"hostname\":\"srv-12345\",\"fqdn\":\"srv-12345.gb1.brightbox.com\",\"created_at\":\"2013-08-27T15:54:52Z\",\"started_at\":\"2013-08-27T15:54:55Z\",\"deleted_at\":\"2013-08-27T15:54:58Z\"},{\"id\":\"srv-12345\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-12345\",\"name\":\"\",\"status\":\"deleted\",\"hostname\":\"srv-12345\",\"fqdn\":\"srv-12345.gb1.brightbox.com\",\"created_at\":\"2013-08-27T16:12:22Z\",\"started_at\":\"2013-08-27T16:12:25Z\",\"deleted_at\":\"2013-08-27T16:12:27Z\"}],\"load_balancers\":[],\"cloud_ips\":[{\"id\":\"cip-12345\",\"resource_type\":\"cloud_ip\",\"url\":\"https://api.gb1.brightbox.com/1.0/cloud_ips/cip-12345\",\"status\":\"unmapped\",\"public_ip\":\"217.16.230.132\",\"reverse_dns\":\"cip-12345-16-230-132.gb1.brightbox.com\",\"name\":null}],\"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 new servers are added to this group unless specified otherwise.\",\"created_at\":\"2013-08-27T15:47:00Z\",\"default\":true},{\"id\":\"grp-12345\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1.brightbox.com/1.0/server_groups/grp-12345\",\"name\":\"test\",\"description\":null,\"created_at\":\"2013-08-27T15:54:53Z\",\"default\":false},{\"id\":\"grp-12345\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1.brightbox.com/1.0/server_groups/grp-12345\",\"name\":\"test\",\"description\":null,\"created_at\":\"2013-08-27T16:12:22Z\",\"default\":false}],\"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\":\"2013-08-27T15:47:00Z\",\"description\":\"Applied to the default server group.\"},{\"id\":\"fwp-12345\",\"resource_type\":\"firewall_policy\",\"url\":\"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345\",\"default\":false,\"name\":\"rspec_firewall_policy_apply\",\"created_at\":\"2013-08-27T15:54:12Z\",\"description\":null},{\"id\":\"fwp-12345\",\"resource_type\":\"firewall_policy\",\"url\":\"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345\",\"default\":false,\"name\":\"rspec_firewall_policy\",\"created_at\":\"2013-08-27T15:54:13Z\",\"description\":null},{\"id\":\"fwp-12345\",\"resource_type\":\"firewall_policy\",\"url\":\"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345\",\"default\":false,\"name\":null,\"created_at\":\"2013-08-27T15:54:20Z\",\"description\":null},{\"id\":\"fwp-12345\",\"resource_type\":\"firewall_policy\",\"url\":\"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345\",\"default\":false,\"name\":null,\"created_at\":\"2013-08-27T15:54:21Z\",\"description\":null},{\"id\":\"fwp-12345\",\"resource_type\":\"firewall_policy\",\"url\":\"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345\",\"default\":false,\"name\":\"rspec_firewall_policy\",\"created_at\":\"2013-08-27T15:56:46Z\",\"description\":null},{\"id\":\"fwp-12345\",\"resource_type\":\"firewall_policy\",\"url\":\"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345\",\"default\":false,\"name\":\"rspec_firewall_policy\",\"created_at\":\"2013-08-27T16:06:22Z\",\"description\":null}],\"owner\":{\"id\":\"usr-12345\",\"resource_type\":\"user\",\"url\":\"https://api.gb1.brightbox.com/1.0/users/usr-12345\",\"name\":\"Teresa Ullrich\",\"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\"}]}"
46
39
  http_version:
47
40
  recorded_at: Tue, 27 Aug 2013 16:12:40 GMT
48
- - request:
41
+ - request:
49
42
  method: post
50
43
  uri: http://api.brightbox.dev/token
51
- body:
52
- encoding: UTF-8
53
- string: '{"grant_type":"none","client_id":"app-12345"}'
54
- headers:
55
- User-Agent:
44
+ body:
45
+ string: "{\"grant_type\":\"none\",\"client_id\":\"app-12345\"}"
46
+ headers:
47
+ User-Agent:
56
48
  - fog/1.15.0
57
- Authorization:
58
- - Basic YXBwLTEyMzQ1Om1vY2J1aXBiaWFhNms2Yw==
59
- Content-Type:
49
+ Content-Type:
60
50
  - application/json
61
- response:
62
- status:
51
+ Authorization:
52
+ - Basic YXBwLTEyMzQ1Om1vY2J1aXBiaWFhNms2Yw==
53
+ response:
54
+ status:
63
55
  code: 400
64
56
  message:
65
- headers:
66
- X-Frame-Options:
57
+ headers:
58
+ X-Frame-Options:
67
59
  - sameorigin
68
- X-XSS-Protection:
69
- - 1; mode=block
70
- Content-Type:
71
- - application/json;charset=utf-8
72
- Cache-Control:
73
- - no-store
74
- Content-Length:
75
- - '135'
76
- X-UA-Compatible:
60
+ Date:
61
+ - Tue, 27 Aug 2013 17:09:58 GMT
62
+ X-UA-Compatible:
77
63
  - IE=Edge
78
- X-Request-Id:
64
+ X-Request-Id:
79
65
  - c33ed223f526036731d04080739c8328
80
- X-Runtime:
81
- - '0.096899'
82
- Date:
83
- - Tue, 27 Aug 2013 17:09:58 GMT
84
- Connection:
66
+ Content-Type:
67
+ - application/json;charset=utf-8
68
+ X-Runtime:
69
+ - "0.096899"
70
+ Content-Length:
71
+ - "135"
72
+ X-XSS-Protection:
73
+ - 1; mode=block
74
+ Connection:
85
75
  - keep-alive
86
- body:
87
- encoding: UTF-8
88
- string: '{"error":"unauthorized_client","error_description":"The authenticated
89
- client is not authorized to use the access grant type provided."}'
76
+ Cache-Control:
77
+ - no-store
78
+ body:
79
+ string: "{\"error\":\"unauthorized_client\",\"error_description\":\"The authenticated client is not authorized to use the access grant type provided.\"}"
90
80
  http_version:
91
81
  recorded_at: Tue, 27 Aug 2013 17:09:58 GMT
92
- - request:
82
+ - request:
93
83
  method: post
94
84
  uri: http://api.brightbox.dev/token
95
- body:
96
- encoding: UTF-8
97
- string: '{"grant_type":"none","client_id":"cli-12345"}'
98
- headers:
99
- User-Agent:
85
+ body:
86
+ string: "{\"grant_type\":\"none\",\"client_id\":\"cli-12345\"}"
87
+ headers:
88
+ User-Agent:
100
89
  - fog/1.15.0
101
- Authorization:
102
- - Basic Y2xpLTEyMzQ1OnF5Nnh4bnZ5NG8wdGd2NQ==
103
- Content-Type:
90
+ Content-Type:
104
91
  - application/json
105
- response:
106
- status:
92
+ Authorization:
93
+ - Basic Y2xpLTEyMzQ1OnF5Nnh4bnZ5NG8wdGd2NQ==
94
+ response:
95
+ status:
107
96
  code: 200
108
97
  message:
109
- headers:
110
- X-Frame-Options:
98
+ headers:
99
+ X-Frame-Options:
111
100
  - sameorigin
112
- X-XSS-Protection:
113
- - 1; mode=block
114
- Content-Type:
115
- - application/json;charset=utf-8
116
- Cache-Control:
117
- - no-store
118
- Content-Length:
119
- - '77'
120
- X-UA-Compatible:
101
+ Date:
102
+ - Wed, 28 Aug 2013 16:08:24 GMT
103
+ X-UA-Compatible:
121
104
  - IE=Edge
122
- ETag:
123
- - '"6ba0903c80d74cba28ff11d3b1b6c595"'
124
- X-Request-Id:
105
+ X-Request-Id:
125
106
  - e3a289fa626dc44f0e44afa68d82b3e5
126
- X-Runtime:
127
- - '0.113261'
128
- Date:
129
- - Wed, 28 Aug 2013 16:08:24 GMT
130
- Connection:
107
+ Content-Type:
108
+ - application/json;charset=utf-8
109
+ X-Runtime:
110
+ - "0.113261"
111
+ Content-Length:
112
+ - "77"
113
+ ETag:
114
+ - "\"6ba0903c80d74cba28ff11d3b1b6c595\""
115
+ X-XSS-Protection:
116
+ - 1; mode=block
117
+ Connection:
131
118
  - keep-alive
132
- body:
133
- encoding: UTF-8
134
- string: '{"access_token":"64a61980c09105f0c9000b480473f118461e9bec","expires_in":7200}'
119
+ Cache-Control:
120
+ - no-store
121
+ body:
122
+ string: "{\"access_token\":\"64a61980c09105f0c9000b480473f118461e9bec\",\"expires_in\":7200}"
135
123
  http_version:
136
124
  recorded_at: Wed, 28 Aug 2013 16:08:24 GMT
137
- - request:
125
+ - request:
138
126
  method: get
139
127
  uri: http://api.brightbox.dev/1.0/accounts
140
- body:
141
- encoding: US-ASCII
142
- string: ''
143
- headers:
144
- User-Agent:
128
+ body:
129
+ string: ""
130
+ headers:
131
+ User-Agent:
145
132
  - fog/1.15.0
146
- Authorization:
147
- - OAuth 64a61980c09105f0c9000b480473f118461e9bec
148
- Content-Type:
133
+ Content-Type:
149
134
  - application/json
150
- response:
151
- status:
135
+ Authorization:
136
+ - OAuth 64a61980c09105f0c9000b480473f118461e9bec
137
+ response:
138
+ status:
152
139
  code: 401
153
140
  message:
154
- headers:
155
- WWW-Authenticate:
156
- - OAuth error="invalid_token"
157
- Content-Type:
158
- - application/json; charset=utf-8
159
- X-UA-Compatible:
141
+ headers:
142
+ Date:
143
+ - Tue, 17 Sep 2013 17:07:41 GMT
144
+ X-UA-Compatible:
160
145
  - IE=Edge
161
- Cache-Control:
162
- - no-cache
163
- X-Request-Id:
146
+ X-Request-Id:
164
147
  - f8a904ab18d1a86f21c62f2b69a3ebf8
165
- X-Runtime:
166
- - '0.016519'
167
- Date:
168
- - Tue, 17 Sep 2013 17:07:41 GMT
169
- Connection:
148
+ Content-Type:
149
+ - application/json; charset=utf-8
150
+ X-Runtime:
151
+ - "0.016519"
152
+ WWW-Authenticate:
153
+ - OAuth error="invalid_token"
154
+ Connection:
170
155
  - close
171
- body:
172
- encoding: UTF-8
173
- string: '{"error":"invalid_token","error_description":"The OAuth token can not
174
- be found"}'
156
+ Cache-Control:
157
+ - no-cache
158
+ body:
159
+ string: "{\"error\":\"invalid_token\",\"error_description\":\"The OAuth token can not be found\"}"
175
160
  http_version:
176
161
  recorded_at: Tue, 17 Sep 2013 17:07:41 GMT
177
- - request:
162
+ - request:
178
163
  method: post
179
164
  uri: http://api.brightbox.dev/token
180
- body:
181
- encoding: UTF-8
182
- string: '{"grant_type":"none","client_id":"cli-12345"}'
183
- headers:
184
- User-Agent:
165
+ body:
166
+ string: "{\"grant_type\":\"none\",\"client_id\":\"cli-12345\"}"
167
+ headers:
168
+ User-Agent:
185
169
  - fog/1.15.0
186
- Authorization:
187
- - Basic Y2xpLTEyMzQ1OnF5Nnh4bnZ5NG8wdGd2NQ==
188
- Content-Type:
170
+ Content-Type:
189
171
  - application/json
190
- response:
191
- status:
172
+ Authorization:
173
+ - Basic Y2xpLTEyMzQ1OnF5Nnh4bnZ5NG8wdGd2NQ==
174
+ response:
175
+ status:
192
176
  code: 200
193
177
  message:
194
- headers:
195
- X-Frame-Options:
178
+ headers:
179
+ X-Frame-Options:
196
180
  - sameorigin
197
- X-XSS-Protection:
198
- - 1; mode=block
199
- Content-Type:
200
- - application/json;charset=utf-8
201
- Cache-Control:
202
- - no-store
203
- Content-Length:
204
- - '77'
205
- X-UA-Compatible:
181
+ Date:
182
+ - Tue, 17 Sep 2013 17:07:41 GMT
183
+ X-UA-Compatible:
206
184
  - IE=Edge
207
- ETag:
208
- - '"de6234a5a2fde61c1f7a8b2f7c7b2549"'
209
- X-Request-Id:
185
+ X-Request-Id:
210
186
  - 116a5ddc77e6197748e50531f3a04974
211
- X-Runtime:
212
- - '0.113636'
213
- Date:
214
- - Tue, 17 Sep 2013 17:07:41 GMT
215
- Connection:
187
+ Content-Type:
188
+ - application/json;charset=utf-8
189
+ X-Runtime:
190
+ - "0.113636"
191
+ Content-Length:
192
+ - "77"
193
+ ETag:
194
+ - "\"de6234a5a2fde61c1f7a8b2f7c7b2549\""
195
+ X-XSS-Protection:
196
+ - 1; mode=block
197
+ Connection:
216
198
  - keep-alive
217
- body:
218
- encoding: UTF-8
219
- string: '{"access_token":"18ee6be47f33d919db95c5de206ddaa1f2cb754b","expires_in":7200}'
199
+ Cache-Control:
200
+ - no-store
201
+ body:
202
+ string: "{\"access_token\":\"18ee6be47f33d919db95c5de206ddaa1f2cb754b\",\"expires_in\":7200}"
220
203
  http_version:
221
204
  recorded_at: Tue, 17 Sep 2013 17:07:41 GMT
222
- - request:
205
+ - request:
223
206
  method: get
224
207
  uri: http://api.brightbox.dev/1.0/accounts
225
- body:
226
- encoding: US-ASCII
227
- string: ''
228
- headers:
229
- User-Agent:
208
+ body:
209
+ string: ""
210
+ headers:
211
+ User-Agent:
230
212
  - fog/1.15.0
231
- Authorization:
232
- - OAuth 18ee6be47f33d919db95c5de206ddaa1f2cb754b
233
- Content-Type:
213
+ Content-Type:
234
214
  - application/json
235
- response:
236
- status:
215
+ Authorization:
216
+ - OAuth 18ee6be47f33d919db95c5de206ddaa1f2cb754b
217
+ response:
218
+ status:
237
219
  code: 200
238
220
  message:
239
- headers:
240
- Content-Type:
241
- - application/json; charset=utf-8
242
- X-UA-Compatible:
221
+ headers:
222
+ Date:
223
+ - Tue, 17 Sep 2013 17:07:41 GMT
224
+ X-UA-Compatible:
243
225
  - IE=Edge
244
- ETag:
245
- - '"7d4ad7857ea408897b8a2149197611ba"'
246
- Cache-Control:
247
- - max-age=0, private, must-revalidate
248
- X-Request-Id:
226
+ X-Request-Id:
249
227
  - aada412702ec84983c63d1f4b6a861de
250
- X-Runtime:
251
- - '0.102430'
252
- Date:
253
- - Tue, 17 Sep 2013 17:07:41 GMT
254
- Connection:
228
+ Content-Type:
229
+ - application/json; charset=utf-8
230
+ X-Runtime:
231
+ - "0.102430"
232
+ ETag:
233
+ - "\"7d4ad7857ea408897b8a2149197611ba\""
234
+ Connection:
255
235
  - close
256
- body:
257
- encoding: UTF-8
258
- string: '[{"id":"acc-12345","resource_type":"account","url":"https://api.gb1.brightbox.com/1.0/accounts/acc-12345","name":"Asaibdsjnpdgrdcqo","status":"active","ram_limit":32768,"ram_used":0,"cloud_ips_limit":20,"cloud_ips_used":1,"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":null,"description":null,"revoked_at":null}],"images":[],"servers":[],"load_balancers":[],"cloud_ips":[{"id":"cip-12345","resource_type":"cloud_ip","url":"https://api.gb1.brightbox.com/1.0/cloud_ips/cip-12345","status":"unmapped","public_ip":"153.37.92.121","reverse_dns":"cip-12345-37-92-121.gb1.brightbox.com","name":null}],"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
259
- new servers are added to this group unless specified otherwise.","created_at":"2013-09-17T08:44:16Z","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":"2013-09-17T08:44:16Z","description":"Applied
260
- to the default server group."}],"owner":{"id":"usr-12345","resource_type":"user","url":"https://api.gb1.brightbox.com/1.0/users/usr-12345","name":"Kobe
261
- Swaniawski Sr.","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"}]}]'
236
+ Cache-Control:
237
+ - max-age=0, private, must-revalidate
238
+ body:
239
+ string: "[{\"id\":\"acc-12345\",\"resource_type\":\"account\",\"url\":\"https://api.gb1.brightbox.com/1.0/accounts/acc-12345\",\"name\":\"Asaibdsjnpdgrdcqo\",\"status\":\"active\",\"ram_limit\":32768,\"ram_used\":0,\"cloud_ips_limit\":20,\"cloud_ips_used\":1,\"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\":null,\"description\":null,\"revoked_at\":null}],\"images\":[],\"servers\":[],\"load_balancers\":[],\"cloud_ips\":[{\"id\":\"cip-12345\",\"resource_type\":\"cloud_ip\",\"url\":\"https://api.gb1.brightbox.com/1.0/cloud_ips/cip-12345\",\"status\":\"unmapped\",\"public_ip\":\"153.37.92.121\",\"reverse_dns\":\"cip-12345-37-92-121.gb1.brightbox.com\",\"name\":null}],\"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 new servers are added to this group unless specified otherwise.\",\"created_at\":\"2013-09-17T08:44:16Z\",\"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\":\"2013-09-17T08:44:16Z\",\"description\":\"Applied to the default server group.\"}],\"owner\":{\"id\":\"usr-12345\",\"resource_type\":\"user\",\"url\":\"https://api.gb1.brightbox.com/1.0/users/usr-12345\",\"name\":\"Kobe Swaniawski Sr.\",\"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\"}]}]"
262
240
  http_version:
263
241
  recorded_at: Tue, 17 Sep 2013 17:07:41 GMT
264
- recorded_with: VCR 2.5.0
242
+ - request:
243
+ method: post
244
+ uri: http://api.brightbox.dev/token
245
+ body:
246
+ string: "{\"client_id\":\"cli-12345\",\"grant_type\":\"none\"}"
247
+ headers:
248
+ User-Agent:
249
+ - fog/1.15.0
250
+ Content-Type:
251
+ - application/json
252
+ Authorization:
253
+ - Basic Y2xpLTEyMzQ1OnF5Nnh4bnZ5NG8wdGd2NQ==
254
+ response:
255
+ status:
256
+ code: 200
257
+ message:
258
+ headers:
259
+ X-Frame-Options:
260
+ - sameorigin
261
+ Date:
262
+ - Fri, 27 Sep 2013 15:26:10 GMT
263
+ X-UA-Compatible:
264
+ - IE=Edge
265
+ X-Request-Id:
266
+ - c02be9b4e14a812168ffcec48389bb58
267
+ Content-Type:
268
+ - application/json;charset=utf-8
269
+ X-Runtime:
270
+ - "0.138763"
271
+ Content-Length:
272
+ - "77"
273
+ ETag:
274
+ - "\"5489b0e65c20c465e8f8fc4844f209d2\""
275
+ X-XSS-Protection:
276
+ - 1; mode=block
277
+ Connection:
278
+ - keep-alive
279
+ Cache-Control:
280
+ - no-store
281
+ body:
282
+ string: "{\"access_token\":\"b75e37eb637de1860b2a6d53a4e9f8b3c34500c2\",\"expires_in\":7200}"
283
+ http_version:
284
+ recorded_at: Fri, 27 Sep 2013 15:26:10 GMT
285
+ - request:
286
+ method: post
287
+ uri: http://api.brightbox.dev/token
288
+ body:
289
+ string: "{\"client_id\":\"cli-12345\",\"grant_type\":\"none\"}"
290
+ headers:
291
+ User-Agent:
292
+ - fog/1.15.0
293
+ Content-Type:
294
+ - application/json
295
+ Authorization:
296
+ - Basic Y2xpLTEyMzQ1OnF5Nnh4bnZ5NG8wdGd2NQ==
297
+ response:
298
+ status:
299
+ code: 200
300
+ message:
301
+ headers:
302
+ X-Frame-Options:
303
+ - sameorigin
304
+ Date:
305
+ - Fri, 27 Sep 2013 15:26:11 GMT
306
+ X-UA-Compatible:
307
+ - IE=Edge
308
+ X-Request-Id:
309
+ - 01b2fac5145bf604b23ece75050c3af7
310
+ Content-Type:
311
+ - application/json;charset=utf-8
312
+ X-Runtime:
313
+ - "0.140081"
314
+ Content-Length:
315
+ - "77"
316
+ ETag:
317
+ - "\"259feca10b7df7a375df46b8cfee97b8\""
318
+ X-XSS-Protection:
319
+ - 1; mode=block
320
+ Connection:
321
+ - keep-alive
322
+ Cache-Control:
323
+ - no-store
324
+ body:
325
+ string: "{\"access_token\":\"e1ce7a6e41c7bee7ebaf7a7416f43938cc07cdce\",\"expires_in\":7200}"
326
+ http_version:
327
+ recorded_at: Fri, 27 Sep 2013 15:26:11 GMT