brightbox-cli 2.1.2 → 2.2.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 +21 -0
- data/Gemfile.lock +7 -6
- data/brightbox-cli.gemspec +2 -1
- data/lib/brightbox-cli/config/clients.rb +1 -1
- data/lib/brightbox-cli/gli_global_hooks.rb +3 -1
- data/lib/brightbox-cli/images.rb +1 -1
- data/lib/brightbox-cli/version.rb +1 -1
- data/lib/brightbox_cli.rb +1 -1
- data/spec/cassettes/Brightbox_Account/_all/when_connected_using_an_application/returns_a_collection_of_Accounts.yml +3 -3
- data/spec/cassettes/Brightbox_Account/_all/when_connected_using_an_application/returns_resources_on_the_same_connection.yml +1 -1
- data/spec/cassettes/Brightbox_Account/_all/when_connected_using_an_client/returns_a_collection_of_Accounts.yml +2 -2
- data/spec/cassettes/Brightbox_Account/_all/when_connected_using_an_client/returns_resources_on_the_same_connection.yml +1 -1
- data/spec/cassettes/Brightbox_BBConfig/_add_section/when_first_and_only_client/saves_changes_to_the_config_file.yml +1 -1
- data/spec/cassettes/Brightbox_BBConfig/_add_section/when_first_and_only_client/saves_the_default_account.yml +1 -1
- data/spec/cassettes/Brightbox_BBConfig/_add_section/when_first_and_only_client/saves_the_new_client_as_the_default.yml +1 -1
- data/spec/cassettes/Brightbox_BBConfig/_find_or_set_default_account/when_client_is_not_authenticated/does_not_raise_an_error.yml +5 -5
- data/spec/cassettes/Brightbox_BBConfig/_find_or_set_default_account/when_client_may_access_one_account/updates_the_setting.yml +5 -5
- data/spec/cassettes/Brightbox_BBConfig/_renew_tokens/when_config_in_use_is_not_the_default/uses_correct_credentials.yml +1 -1
- data/spec/cassettes/Brightbox_BBConfig/_renew_tokens/when_using_a_user_app_with_a_cached_refresh_token/caches_the_new_tokens.yml +1 -1
- data/spec/cassettes/Brightbox_BBConfig/_renew_tokens/when_using_a_user_app_with_an_expired_refresh_token/caches_the_new_tokens.yml +2 -2
- data/spec/cassettes/Brightbox_BBConfig/_renew_tokens/when_using_a_user_app_with_no_tokens/caches_the_new_tokens.yml +1 -1
- data/spec/cassettes/Brightbox_BBConfig/_renew_tokens/when_using_a_user_app_with_no_tokens/prompts_user_to_retry_command.yml +1 -1
- data/spec/cassettes/Brightbox_BBConfig/_renew_tokens/when_using_an_API_client_with_no_tokens/caches_a_new_access_token.yml +1 -1
- data/spec/cassettes/Brightbox_CloudIP/_find_all_/when_a_Cloud_IP_exists/returns_a_suitable.yml +7 -7
- data/spec/cassettes/Brightbox_FirewallPolicy/_apply_to/should_apply_firewall_policy.yml +6 -6
- data/spec/cassettes/Brightbox_FirewallPolicy/_create/should_create_firewall_policy.yml +6 -6
- data/spec/cassettes/Brightbox_FirewallPolicy/_destroy/should_destroy_firewall_policy.yml +7 -7
- data/spec/cassettes/Brightbox_FirewallPolicy/_find_all_/when_a_policy_exists/should_list_firewall_policy.yml +6 -6
- data/spec/cassettes/Brightbox_FirewallPolicy/_find_or_call/when_a_policy_exists/should_show_firewall_policy.yml +5 -5
- data/spec/cassettes/Brightbox_FirewallRule/_create/when_policy_exists/creates_the_rule_successfully.yml +6 -6
- data/spec/cassettes/Brightbox_FirewallRule/_destroy/when_rule_exists/destroys_a_rule.yml +5 -5
- data/spec/cassettes/Brightbox_FirewallRule/_find/when_rule_exists/can_display_the_result.yml +6 -6
- data/spec/cassettes/Brightbox_FirewallRule/_from_policy/when_policy_exists_with_a_rule/lists_all_rules.yml +8 -8
- data/spec/cassettes/Brightbox_Server/_destroy/when_server_exists/should_work.yml +5 -5
- data/spec/cassettes/Brightbox_Server/_find_all_/when_a_server_exists/should_print_server_list.yml +7 -7
- data/spec/cassettes/Brightbox_Server/_show/when_server_exists/shows_detailed_attributes_of_a_server.yml +8 -8
- data/spec/cassettes/Brightbox_Server/_shutdown/should_work.yml +8 -8
- data/spec/cassettes/Brightbox_Server/_start/should_work.yml +11 -11
- data/spec/cassettes/Brightbox_Server/_stop/should_work.yml +8 -8
- data/spec/cassettes/Brightbox_Server/_update/when_passing_new_group_membership/should_update_with_group.yml +10 -10
- data/spec/cassettes/Brightbox_ServerGroup/_find_all_/when_a_group_exists/list_server_groups.yml +6 -6
- data/spec/cassettes/Firewall_policies/update/when_the_policy_does_not_exist/prints_error_to_STDERR.yml +1 -1
- data/spec/cassettes/brightbox_accounts/list/_when_access_token_expired_/does_not_report_invalid_token_errors.yml +7 -7
- data/spec/cassettes/brightbox_accounts/list/_when_both_tokens_expired_/does_not_report_invalid_token_errors.yml +7 -7
- data/spec/cassettes/brightbox_accounts/list/_when_invalid_tokens_/does_not_report_invalid_token_errors.yml +7 -7
- data/spec/cassettes/brightbox_accounts/list/_when_no_tokens_/does_not_report_invalid_token_errors.yml +6 -6
- data/spec/cassettes/brightbox_accounts/list/_when_no_tokens_/reports_they_were_updated.yml +5 -5
- data/spec/cassettes/brightbox_accounts/list/_when_no_tokens_and_password_incorrect_/does_not_report_invalid_token_errors.yml +5 -5
- data/spec/cassettes/brightbox_accounts/list/_when_no_tokens_and_password_incorrect_/reports_unable_to_authenticate.yml +4 -4
- data/spec/cassettes/brightbox_accounts/list/does_not_error.yml +2 -2
- data/spec/cassettes/brightbox_cloudips/map/when_destination_is_a_server_ID/passes_the_interface_identifier_to_the_API.yml +6 -6
- data/spec/cassettes/brightbox_cloudips/map/when_destination_is_another_value/passes_the_identifier_to_the_API.yml +3 -3
- data/spec/cassettes/brightbox_config/client_add/when_adding_a_new_client/does_not_error.yml +4 -4
- data/spec/cassettes/brightbox_config/client_add/when_adding_a_new_client/sets_up_the_config.yml +4 -4
- data/spec/cassettes/brightbox_config/client_add/when_new_client_is_first_and_only_client/does_not_change_the_default_client.yml +4 -4
- data/spec/cassettes/brightbox_config/client_add/when_new_client_is_first_and_only_client/does_not_error.yml +4 -4
- data/spec/cassettes/brightbox_config/client_add/when_new_client_is_first_and_only_client/sets_this_as_the_default_client.yml +4 -4
- data/spec/cassettes/brightbox_config/client_add/when_new_client_is_first_and_only_client/sets_up_the_config.yml +4 -4
- data/spec/cassettes/brightbox_config/user_add/when_NO_config_file_on_disk/sets_up_the_config.yml +3 -3
- data/spec/cassettes/brightbox_config/user_add/when_a_default_client_is_already_set/does_not_change_the_default_client.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_application_details_in_config/does_not_error.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_application_details_in_config/sets_up_the_config.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_application_has_access_only_one_active_account/display_an_warning_about_preselected_default.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_application_has_access_only_one_active_account/does_not_error.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_application_has_access_only_one_active_account/selects_the_active_account_for_the_default.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_application_has_access_only_one_active_account/sets_up_the_config.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_application_has_access_to_multiple_accounts/display_an_warning_about_preselected_default.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_application_has_access_to_multiple_accounts/does_not_error.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_application_has_access_to_multiple_accounts/sets_up_the_config.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_new_client_is_first_and_only_client/does_not_error.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_new_client_is_first_and_only_client/does_not_prompt_to_rerun_the_command.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_new_client_is_first_and_only_client/requests_access_tokens.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_new_client_is_first_and_only_client/sets_this_as_the_default_client.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_new_client_is_first_and_only_client/sets_up_the_config.yml +3 -3
- data/spec/cassettes/brightbox_config/user_add/when_passing_in_required_arguments/does_not_error.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_passing_in_required_arguments/does_not_prompt_to_rerun_the_command.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_passing_in_required_arguments/requests_access_tokens.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_passing_in_required_arguments/sets_up_the_config.yml +2 -2
- data/spec/cassettes/brightbox_config/user_add/when_passing_in_required_arguments_and_api_url/does_not_error.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_passing_in_required_arguments_and_api_url/requests_access_tokens.yml +1 -1
- data/spec/cassettes/brightbox_config/user_add/when_passing_in_required_arguments_and_api_url/sets_up_the_config.yml +1 -1
- data/spec/cassettes/brightbox_database-servers/create/--allow-access_10_0_0_0/correctly_sends_API_parameters.yml +1 -1
- data/spec/cassettes/brightbox_database-servers/create/--allow-access_srv-12345_grp-12345/correctly_sends_API_parameters.yml +1 -1
- data/spec/cassettes/brightbox_database-servers/create/--engine_mysql/correctly_sends_API_parameters.yml +1 -1
- data/spec/cassettes/brightbox_database-servers/create/--engine_mysql_--engine-version_5_6/correctly_sends_API_parameters.yml +1 -1
- data/spec/cassettes/brightbox_database-servers/create/without_arguments/reports_the_new_admin_password.yml +1 -1
- data/spec/cassettes/brightbox_database-servers/create/without_arguments/reports_the_new_admin_username.yml +1 -1
- data/spec/cassettes/brightbox_database-servers/snapshot/when_database_server_active/correctly_sends_API_parameters.yml +2 -2
- data/spec/cassettes/brightbox_database-servers/snapshot/when_database_server_can_not_be_snapshotted/reports_an_error_to_the_user.yml +1 -1
- data/spec/cassettes/brightbox_database-snapshots/list/when_resources_are_available/does_not_output_to_stderr.yml +1 -1
- data/spec/cassettes/brightbox_database-snapshots/list/when_resources_are_available/outputs_table_details_to_stdout.yml +1 -1
- data/spec/cassettes/brightbox_database-snapshots/show/when_resource_exists/does_not_output_to_stderr.yml +1 -1
- data/spec/commands/accounts/list_spec.rb +6 -6
- data/spec/commands/cloudips/map_spec.rb +2 -2
- data/spec/commands/config/client_add_spec.rb +3 -3
- data/spec/commands/config/user_add_spec.rb +8 -8
- data/spec/commands/firewall_policies/update_spec.rb +5 -5
- data/spec/commands/sql/instances/create_spec.rb +5 -5
- data/spec/commands/sql/instances/snapshot_spec.rb +2 -2
- data/spec/commands/sql/snapshots/list_spec.rb +1 -1
- data/spec/commands/sql/snapshots/show_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -4
- data/spec/support/vcr.rb +0 -4
- data/spec/unit/brightbox/account/all_spec.rb +2 -2
- data/spec/unit/brightbox/account/get_spec.rb +5 -5
- data/spec/unit/brightbox/api/conn_spec.rb +1 -1
- data/spec/unit/brightbox/bb_config/add_section_spec.rb +1 -1
- data/spec/unit/brightbox/bb_config/find_or_set_default_account_spec.rb +3 -3
- data/spec/unit/brightbox/bb_config/renew_tokens_spec.rb +5 -5
- data/spec/unit/brightbox/cloud_ip/find_spec.rb +1 -1
- data/spec/unit/brightbox/config/api_client/to_fog_spec.rb +3 -3
- data/spec/unit/brightbox/config/user_application/to_fog_spec.rb +4 -4
- data/spec/unit/brightbox/firewall_policy/apply_to_spec.rb +1 -1
- data/spec/unit/brightbox/firewall_policy/create_spec.rb +1 -1
- data/spec/unit/brightbox/firewall_policy/destroy_spec.rb +1 -1
- data/spec/unit/brightbox/firewall_policy/find_or_call_spec.rb +1 -1
- data/spec/unit/brightbox/firewall_policy/find_spec.rb +2 -2
- data/spec/unit/brightbox/firewall_rule/create_spec.rb +1 -1
- data/spec/unit/brightbox/firewall_rule/destroy_spec.rb +1 -1
- data/spec/unit/brightbox/firewall_rule/find_spec.rb +1 -1
- data/spec/unit/brightbox/firewall_rule/from_policy_spec.rb +1 -1
- data/spec/unit/brightbox/server/destroy_spec.rb +1 -1
- data/spec/unit/brightbox/server/find_or_call_spec.rb +1 -1
- data/spec/unit/brightbox/server/find_spec.rb +1 -1
- data/spec/unit/brightbox/server/shutdown_spec.rb +1 -1
- data/spec/unit/brightbox/server/start_spec.rb +1 -1
- data/spec/unit/brightbox/server/stop_spec.rb +1 -1
- data/spec/unit/brightbox/server/update_spec.rb +1 -1
- data/spec/unit/brightbox/server_group/find_spec.rb +1 -1
- data/spec/unit/brightbox/user_collaboration/get_for_account_spec.rb +4 -4
- metadata +19 -5
@@ -5,7 +5,7 @@ http_interactions:
|
|
5
5
|
uri: http://api.brightbox.dev/token
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"grant_type":"password","
|
8
|
+
string: '{"grant_type":"password","username":"jason.null@brightbox.com","password":"N:B3e%7Cmh"}'
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
11
|
- fog/1.15.0
|
@@ -5,7 +5,7 @@ http_interactions:
|
|
5
5
|
uri: http://api.brightbox.dev/token
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"grant_type":"password","
|
8
|
+
string: '{"grant_type":"password","username":"jason.null@brightbox.com","password":"N:B3e%7Cmh"}'
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
11
|
- fog/1.15.0
|
@@ -50,7 +50,7 @@ http_interactions:
|
|
50
50
|
uri: http://api.brightbox.dev/token
|
51
51
|
body:
|
52
52
|
encoding: UTF-8
|
53
|
-
string: '{"grant_type":"
|
53
|
+
string: '{"grant_type":"client_credentials"}'
|
54
54
|
headers:
|
55
55
|
User-Agent:
|
56
56
|
- fog/1.15.0
|
@@ -5,7 +5,7 @@ http_interactions:
|
|
5
5
|
uri: http://api.brightbox.dev/token
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"grant_type":"password","
|
8
|
+
string: '{"grant_type":"password","username":"jason.null@brightbox.com","password":"N:B3e%7Cmh"}'
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
11
|
- fog/1.15.0
|
@@ -5,7 +5,7 @@ http_interactions:
|
|
5
5
|
uri: http://api.brightbox.dev/token
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"grant_type":"password","
|
8
|
+
string: '{"grant_type":"password","username":"jason.null@brightbox.com","password":"N:B3e%7Cmh"}'
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
11
|
- fog/1.15.0
|
@@ -5,7 +5,7 @@ http_interactions:
|
|
5
5
|
uri: http://api.brightbox.dev/token
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"grant_type":"password","
|
8
|
+
string: '{"grant_type":"password","username":"jason.null@brightbox.com","password":"N:B3e%7Cmh"}'
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
11
|
- fog/1.15.0
|
@@ -91,7 +91,7 @@ http_interactions:
|
|
91
91
|
uri: http://api.brightbox.dev/token
|
92
92
|
body:
|
93
93
|
encoding: UTF-8
|
94
|
-
string: "{\"grant_type\":\"
|
94
|
+
string: "{\"grant_type\":\"client_credentials\"}"
|
95
95
|
headers:
|
96
96
|
User-Agent:
|
97
97
|
- fog/1.20.0
|
@@ -137,7 +137,7 @@ http_interactions:
|
|
137
137
|
uri: http://api.brightbox.dev/token
|
138
138
|
body:
|
139
139
|
encoding: UTF-8
|
140
|
-
string: "{\"grant_type\":\"
|
140
|
+
string: "{\"grant_type\":\"client_credentials\"}"
|
141
141
|
headers:
|
142
142
|
User-Agent:
|
143
143
|
- fog/1.20.0
|
@@ -7,7 +7,7 @@ describe "brightbox accounts" do
|
|
7
7
|
let(:stdout) { output.stdout }
|
8
8
|
let(:stderr) { output.stderr }
|
9
9
|
|
10
|
-
context "", :
|
10
|
+
context "", vcr: true do
|
11
11
|
let(:argv) { %w(accounts list) }
|
12
12
|
|
13
13
|
it "does not error" do
|
@@ -15,7 +15,7 @@ describe "brightbox accounts" do
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
-
context "(when no tokens)", :
|
18
|
+
context "(when no tokens)", vcr: true do
|
19
19
|
let(:password) { default_test_password }
|
20
20
|
|
21
21
|
let(:argv) { %w(accounts list) }
|
@@ -34,7 +34,7 @@ describe "brightbox accounts" do
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
context "(when no tokens and password incorrect)", :
|
37
|
+
context "(when no tokens and password incorrect)", vcr: true do
|
38
38
|
let(:password) { "wrong" }
|
39
39
|
|
40
40
|
let(:argv) { %w(accounts list) }
|
@@ -53,7 +53,7 @@ describe "brightbox accounts" do
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
context "(when access token expired)", :
|
56
|
+
context "(when access token expired)", vcr: true do
|
57
57
|
let(:password) { default_test_password }
|
58
58
|
|
59
59
|
let(:argv) { %w(accounts list) }
|
@@ -71,7 +71,7 @@ describe "brightbox accounts" do
|
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
|
-
context "(when both tokens expired)", :
|
74
|
+
context "(when both tokens expired)", vcr: true do
|
75
75
|
let(:password) { default_test_password }
|
76
76
|
|
77
77
|
let(:argv) { %w(accounts list) }
|
@@ -90,7 +90,7 @@ describe "brightbox accounts" do
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
|
-
context "(when invalid tokens)", :
|
93
|
+
context "(when invalid tokens)", vcr: true do
|
94
94
|
let(:password) { default_test_password }
|
95
95
|
|
96
96
|
let(:argv) { %w(accounts list) }
|
@@ -14,7 +14,7 @@ describe "brightbox cloudips" do
|
|
14
14
|
cache_access_token(config, "f83da712e6299cda953513ec07f7a754f747d727")
|
15
15
|
end
|
16
16
|
|
17
|
-
context "when destination is a server ID", :
|
17
|
+
context "when destination is a server ID", vcr: true do
|
18
18
|
let(:argv) { %w(cloudips map cip-12345 srv-12345) }
|
19
19
|
let(:target) { "int-12345" }
|
20
20
|
|
@@ -24,7 +24,7 @@ describe "brightbox cloudips" do
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
context "when destination is another value", :
|
27
|
+
context "when destination is another value", vcr: true do
|
28
28
|
let(:target) { "res-12345" }
|
29
29
|
let(:argv) { %w(cloudips map cip-12345 res-12345) }
|
30
30
|
|
@@ -21,7 +21,7 @@ describe "brightbox config" do
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
context "when adding a new client", :
|
24
|
+
context "when adding a new client", vcr: true do
|
25
25
|
let(:argv) { ["config", "client_add", client_id, secret] }
|
26
26
|
|
27
27
|
it "does not error" do
|
@@ -42,7 +42,7 @@ describe "brightbox config" do
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
-
context "when new client is first and only client", :
|
45
|
+
context "when new client is first and only client", vcr: true do
|
46
46
|
let(:argv) { ["config", "client_add", client_id, secret] }
|
47
47
|
|
48
48
|
before do
|
@@ -74,7 +74,7 @@ describe "brightbox config" do
|
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
77
|
-
context "when new client is first and only client", :
|
77
|
+
context "when new client is first and only client", vcr: true do
|
78
78
|
let(:argv) { ["config", "client_add", client_id, secret] }
|
79
79
|
|
80
80
|
it "does not change the default client" do
|
@@ -28,7 +28,7 @@ describe "brightbox config" do
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
context "when NO config file on disk", :
|
31
|
+
context "when NO config file on disk", vcr: true do
|
32
32
|
let(:argv) { ["config", "user_add", email, client_id, secret] }
|
33
33
|
|
34
34
|
before do
|
@@ -52,7 +52,7 @@ describe "brightbox config" do
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
-
context "when passing in required arguments", :
|
55
|
+
context "when passing in required arguments", vcr: true do
|
56
56
|
let(:argv) { ["config", "user_add", email, client_id, secret] }
|
57
57
|
|
58
58
|
before do
|
@@ -92,7 +92,7 @@ describe "brightbox config" do
|
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
95
|
-
context "when new client is first and only client", :
|
95
|
+
context "when new client is first and only client", vcr: true do
|
96
96
|
let(:argv) { ["config", "user_add", email, client_id, secret] }
|
97
97
|
|
98
98
|
before do
|
@@ -139,7 +139,7 @@ describe "brightbox config" do
|
|
139
139
|
end
|
140
140
|
end
|
141
141
|
|
142
|
-
context "when a default client is already set", :
|
142
|
+
context "when a default client is already set", vcr: true do
|
143
143
|
let(:argv) { ["config", "user_add", email, client_id, secret] }
|
144
144
|
|
145
145
|
before do
|
@@ -154,7 +154,7 @@ describe "brightbox config" do
|
|
154
154
|
end
|
155
155
|
end
|
156
156
|
|
157
|
-
context "when passing in required arguments and api_url", :
|
157
|
+
context "when passing in required arguments and api_url", vcr: true do
|
158
158
|
let(:argv) { ["config", "user_add", email, client_id, secret, api_url] }
|
159
159
|
|
160
160
|
before do
|
@@ -190,7 +190,7 @@ describe "brightbox config" do
|
|
190
190
|
end
|
191
191
|
end
|
192
192
|
|
193
|
-
context "when application details in config", :
|
193
|
+
context "when application details in config", vcr: true do
|
194
194
|
let(:revised_alias) { "#{client_alias}_1" }
|
195
195
|
let(:argv) { ["config", "user_add", email, client_id, secret] }
|
196
196
|
|
@@ -225,7 +225,7 @@ describe "brightbox config" do
|
|
225
225
|
end
|
226
226
|
end
|
227
227
|
|
228
|
-
context "when application has access to multiple accounts", :
|
228
|
+
context "when application has access to multiple accounts", vcr: true do
|
229
229
|
# Hardcoded in response, different from single account value
|
230
230
|
let(:default_account) { "acc-54321" }
|
231
231
|
let(:argv) { ["config", "user_add", email, client_id, secret] }
|
@@ -259,7 +259,7 @@ describe "brightbox config" do
|
|
259
259
|
end
|
260
260
|
end
|
261
261
|
|
262
|
-
context "when application has access only one active account", :
|
262
|
+
context "when application has access only one active account", vcr: true do
|
263
263
|
# Hardcoded in response, different from single account value
|
264
264
|
let(:default_account) { "acc-33333" }
|
265
265
|
let(:argv) { ["config", "user_add", email, client_id, secret] }
|
@@ -10,7 +10,7 @@ describe "Firewall policies" do
|
|
10
10
|
let(:stdout) { output.stdout }
|
11
11
|
let(:stderr) { output.stderr }
|
12
12
|
|
13
|
-
context "when no identifier is given", :
|
13
|
+
context "when no identifier is given", vcr: true do
|
14
14
|
let(:argv) { %w(firewall-policies update) }
|
15
15
|
|
16
16
|
it "prints error to STDERR" do
|
@@ -18,7 +18,7 @@ describe "Firewall policies" do
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
context "when the policy does not exist", :
|
21
|
+
context "when the policy does not exist", vcr: true do
|
22
22
|
let(:argv) { %w(firewall-policies update -n missing fwp-12345) }
|
23
23
|
|
24
24
|
it "prints error to STDERR" do
|
@@ -36,7 +36,7 @@ describe "Firewall policies" do
|
|
36
36
|
@policy.destroy if @policy
|
37
37
|
end
|
38
38
|
|
39
|
-
context "when new name is given", :
|
39
|
+
context "when new name is given", vcr: true do
|
40
40
|
let(:name) { "fnord" }
|
41
41
|
let(:argv) { ["firewall-policies", "update", "-n", name, @policy.id] }
|
42
42
|
|
@@ -52,7 +52,7 @@ describe "Firewall policies" do
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
-
context "when new description is given", :
|
55
|
+
context "when new description is given", vcr: true do
|
56
56
|
let(:description) { "New policy description" }
|
57
57
|
let(:argv) { ["firewall-policies", "update", "-d", description, @policy.id] }
|
58
58
|
|
@@ -68,7 +68,7 @@ describe "Firewall policies" do
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
-
context "when no options are given", :
|
71
|
+
context "when no options are given", vcr: true do
|
72
72
|
let(:argv) { ["firewall-policies", "update", @policy.id] }
|
73
73
|
|
74
74
|
it "prints error to STDERR" do
|
@@ -13,7 +13,7 @@ describe "brightbox database-servers" do
|
|
13
13
|
cache_access_token(config, "f83da712e6299cda953513ec07f7a754f747d727")
|
14
14
|
end
|
15
15
|
|
16
|
-
context "without arguments", :
|
16
|
+
context "without arguments", vcr: true do
|
17
17
|
let(:argv) { %w(sql instances create) }
|
18
18
|
let(:expected_password) { "477wwwj48yifrnuk" }
|
19
19
|
|
@@ -26,7 +26,7 @@ describe "brightbox database-servers" do
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
context "--allow-access=10.0.0.0", :
|
29
|
+
context "--allow-access=10.0.0.0", vcr: true do
|
30
30
|
let(:argv) { %w(sql instances create --allow-access=10.0.0.0) }
|
31
31
|
let(:expected_args) { { :allow_access => ["10.0.0.0"] } }
|
32
32
|
|
@@ -36,7 +36,7 @@ describe "brightbox database-servers" do
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
-
context "--allow-access=srv-12345,grp-12345", :
|
39
|
+
context "--allow-access=srv-12345,grp-12345", vcr: true do
|
40
40
|
let(:argv) { %w(sql instances create --allow-access srv-12345,grp-12345) }
|
41
41
|
let(:expected_args) { { :allow_access => %w(srv-12345 grp-12345) } }
|
42
42
|
|
@@ -46,7 +46,7 @@ describe "brightbox database-servers" do
|
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
-
context "--engine=mysql", :
|
49
|
+
context "--engine=mysql", vcr: true do
|
50
50
|
let(:argv) { %w(sql instances create --engine=mysql) }
|
51
51
|
let(:expected_args) { { :database_engine => "mysql" } }
|
52
52
|
|
@@ -56,7 +56,7 @@ describe "brightbox database-servers" do
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
context "--engine=mysql --engine-version=5.6", :
|
59
|
+
context "--engine=mysql --engine-version=5.6", vcr: true do
|
60
60
|
let(:argv) { %w(sql instances create --engine=mysql --engine-version=5.6) }
|
61
61
|
let(:expected_args) { { :database_engine => "mysql", :database_version => "5.6" } }
|
62
62
|
|
@@ -13,7 +13,7 @@ describe "brightbox database-servers" do
|
|
13
13
|
cache_access_token(config, "f83da712e6299cda953513ec07f7a754f747d727")
|
14
14
|
end
|
15
15
|
|
16
|
-
context "when database server active", :
|
16
|
+
context "when database server active", vcr: true do
|
17
17
|
let(:argv) { %w(sql instances snapshot dbs-12345) }
|
18
18
|
let(:expected_args) { { :allow_access => ["10.0.0.0"] } }
|
19
19
|
|
@@ -23,7 +23,7 @@ describe "brightbox database-servers" do
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
context "when database server can not be snapshotted", :
|
26
|
+
context "when database server can not be snapshotted", vcr: true do
|
27
27
|
let(:argv) { %w(sql instances snapshot dbs-12345) }
|
28
28
|
|
29
29
|
it "reports an error to the user" do
|
@@ -13,7 +13,7 @@ describe "brightbox database-snapshots" do
|
|
13
13
|
cache_access_token(config, "f83da712e6299cda953513ec07f7a754f747d727")
|
14
14
|
end
|
15
15
|
|
16
|
-
context "when resources are available", :
|
16
|
+
context "when resources are available", vcr: true do
|
17
17
|
let(:argv) { %w(sql snapshots list) }
|
18
18
|
|
19
19
|
it "does not output to stderr" do
|