fog 1.33.0 → 1.34.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 +47 -0
- data/Rakefile +3 -0
- data/fog.gemspec +4 -4
- data/lib/fog/openstack/baremetal.rb +20 -82
- data/lib/fog/openstack/compute.rb +11 -34
- data/lib/fog/openstack/core.rb +37 -10
- data/lib/fog/openstack/identity.rb +33 -44
- data/lib/fog/openstack/identity_v2.rb +14 -84
- data/lib/fog/openstack/identity_v3.rb +4 -51
- data/lib/fog/openstack/image.rb +22 -83
- data/lib/fog/openstack/metering.rb +15 -76
- data/lib/fog/openstack/models/compute/server.rb +1 -1
- data/lib/fog/openstack/models/orchestration/events.rb +1 -0
- data/lib/fog/openstack/models/orchestration/resources.rb +1 -0
- data/lib/fog/openstack/models/orchestration/stack.rb +1 -1
- data/lib/fog/openstack/models/orchestration/stacks.rb +1 -0
- data/lib/fog/openstack/models/orchestration/templates.rb +1 -0
- data/lib/fog/openstack/network.rb +21 -21
- data/lib/fog/openstack/orchestration.rb +11 -91
- data/lib/fog/openstack/planning.rb +19 -81
- data/lib/fog/openstack/requests/compute/list_security_groups.rb +9 -1
- data/lib/fog/openstack/requests/network/add_router_interface.rb +12 -4
- data/lib/fog/openstack/requests/network/create_port.rb +14 -12
- data/lib/fog/openstack/requests/network/get_port.rb +4 -0
- data/lib/fog/openstack/requests/network/set_tenant.rb +1 -0
- data/lib/fog/openstack/storage.rb +18 -57
- data/lib/fog/openstack/volume.rb +17 -79
- data/lib/fog/rackspace/requests/storage/get_object_https_url.rb +13 -2
- data/lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb +7 -6
- data/lib/fog/vcloud_director/models/compute/vm_customizations.rb +15 -0
- data/lib/fog/version.rb +1 -1
- data/lib/tasks/changelog_task.rb +1 -0
- data/spec/fog/openstack/volume_spec.rb +5 -0
- data/tests/compute/helper.rb +0 -6
- data/tests/openstack/requests/network/port_tests.rb +14 -12
- data/tests/rackspace/requests/storage/object_tests.rb +46 -4
- data/tests/vcloud_director/requests/compute/edge_gateway_tests.rb +2 -2
- metadata +11 -74
- data/lib/fog/bin/dynect.rb +0 -28
- data/tests/brightbox/compute/helper.rb +0 -1
- data/tests/brightbox/compute/schema.rb +0 -799
- data/tests/brightbox/compute_tests.rb +0 -101
- data/tests/brightbox/helper.rb +0 -1
- data/tests/brightbox/models/compute/account_tests.rb +0 -17
- data/tests/brightbox/models/compute/cloud_ip_tests.rb +0 -32
- data/tests/brightbox/models/compute/database_server_tests.rb +0 -78
- data/tests/brightbox/models/compute/database_snapshot_tests.rb +0 -26
- data/tests/brightbox/models/compute/database_type_tests.rb +0 -27
- data/tests/brightbox/models/compute/server_tests.rb +0 -19
- data/tests/brightbox/oauth2_tests.rb +0 -110
- data/tests/brightbox/requests/compute/account_tests.rb +0 -65
- data/tests/brightbox/requests/compute/api_client_tests.rb +0 -64
- data/tests/brightbox/requests/compute/application_test.rb +0 -63
- data/tests/brightbox/requests/compute/cloud_ip_tests.rb +0 -85
- data/tests/brightbox/requests/compute/collaboration_tests.rb +0 -39
- data/tests/brightbox/requests/compute/database_server_tests.rb +0 -54
- data/tests/brightbox/requests/compute/database_snapsnot_tests.rb +0 -47
- data/tests/brightbox/requests/compute/database_type_tests.rb +0 -17
- data/tests/brightbox/requests/compute/firewall_policy_tests.rb +0 -40
- data/tests/brightbox/requests/compute/firewall_rule_tests.rb +0 -43
- data/tests/brightbox/requests/compute/helper.rb +0 -41
- data/tests/brightbox/requests/compute/image_tests.rb +0 -60
- data/tests/brightbox/requests/compute/interface_tests.rb +0 -33
- data/tests/brightbox/requests/compute/load_balancer_tests.rb +0 -121
- data/tests/brightbox/requests/compute/server_group_tests.rb +0 -96
- data/tests/brightbox/requests/compute/server_tests.rb +0 -99
- data/tests/brightbox/requests/compute/server_type_tests.rb +0 -34
- data/tests/brightbox/requests/compute/user_collaboration_tests.rb +0 -67
- data/tests/brightbox/requests/compute/user_tests.rb +0 -38
- data/tests/brightbox/requests/compute/zone_tests.rb +0 -34
@@ -1,64 +0,0 @@
|
|
1
|
-
Shindo.tests('Fog::Compute[:brightbox] | api client requests', ['brightbox']) do
|
2
|
-
|
3
|
-
tests('success') do
|
4
|
-
|
5
|
-
create_options = {
|
6
|
-
:name => "Fog@#{Time.now.iso8601}",
|
7
|
-
:description => "Description from Fog test"
|
8
|
-
}
|
9
|
-
|
10
|
-
tests("#create_api_client(#{create_options.inspect})") do
|
11
|
-
pending if Fog.mocking?
|
12
|
-
result = Fog::Compute[:brightbox].create_api_client(create_options)
|
13
|
-
@api_client_id = result["id"]
|
14
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::API_CLIENT, {:allow_extra_keys => true}) { result }
|
15
|
-
end
|
16
|
-
|
17
|
-
tests("#list_api_clients") do
|
18
|
-
pending if Fog.mocking?
|
19
|
-
result = Fog::Compute[:brightbox].list_api_clients
|
20
|
-
data_matches_schema(Brightbox::Compute::Formats::Collection::API_CLIENTS, {:allow_extra_keys => true}) { result }
|
21
|
-
end
|
22
|
-
|
23
|
-
tests("#get_api_client('#{@api_client_id}')") do
|
24
|
-
pending if Fog.mocking?
|
25
|
-
result = Fog::Compute[:brightbox].get_api_client(@api_client_id)
|
26
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::API_CLIENT, {:allow_extra_keys => true}) { result }
|
27
|
-
end
|
28
|
-
|
29
|
-
update_options = {:name => "Fog@#{Time.now.iso8601}"}
|
30
|
-
tests("#update_api_client('#{@api_client_id}', #{update_options.inspect})") do
|
31
|
-
pending if Fog.mocking?
|
32
|
-
result = Fog::Compute[:brightbox].update_api_client(@api_client_id, update_options)
|
33
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::API_CLIENT, {:allow_extra_keys => true}) { result }
|
34
|
-
end
|
35
|
-
|
36
|
-
tests("#reset_secret_api_client('#{@api_client_id}')") do
|
37
|
-
pending if Fog.mocking?
|
38
|
-
result = Fog::Compute[:brightbox].reset_secret_api_client(@api_client_id)
|
39
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::API_CLIENT, {:allow_extra_keys => true}) { result }
|
40
|
-
test("new secret is visible") { ! result["secret"].nil? }
|
41
|
-
end
|
42
|
-
|
43
|
-
tests("#destroy_api_client('#{@api_client_id}')") do
|
44
|
-
pending if Fog.mocking?
|
45
|
-
result = Fog::Compute[:brightbox].destroy_api_client(@api_client_id)
|
46
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::API_CLIENT, {:allow_extra_keys => true}) { result }
|
47
|
-
end
|
48
|
-
|
49
|
-
end
|
50
|
-
|
51
|
-
tests('failure') do
|
52
|
-
|
53
|
-
tests("#get_api_client('cli-00000')").raises(Excon::Errors::NotFound) do
|
54
|
-
pending if Fog.mocking?
|
55
|
-
Fog::Compute[:brightbox].get_api_client('cli-00000')
|
56
|
-
end
|
57
|
-
|
58
|
-
tests("#get_api_client").raises(ArgumentError) do
|
59
|
-
pending if Fog.mocking?
|
60
|
-
Fog::Compute[:brightbox].get_api_client
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
end
|
@@ -1,63 +0,0 @@
|
|
1
|
-
Shindo.tests('Fog::Compute[:brightbox] | api client requests', ['brightbox']) do
|
2
|
-
|
3
|
-
tests('success') do
|
4
|
-
|
5
|
-
create_options = {
|
6
|
-
:name => "Fog@#{Time.now.iso8601}"
|
7
|
-
}
|
8
|
-
|
9
|
-
tests("#create_application(#{create_options.inspect})") do
|
10
|
-
pending if Fog.mocking?
|
11
|
-
result = Fog::Compute[:brightbox].create_application(create_options)
|
12
|
-
@application_id = result["id"]
|
13
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::APPLICATION, {:allow_extra_keys => true}) { result }
|
14
|
-
end
|
15
|
-
|
16
|
-
tests("#list_applications") do
|
17
|
-
pending if Fog.mocking?
|
18
|
-
result = Fog::Compute[:brightbox].list_applications
|
19
|
-
data_matches_schema(Brightbox::Compute::Formats::Collection::APPLICATION, {:allow_extra_keys => true}) { result }
|
20
|
-
end
|
21
|
-
|
22
|
-
tests("#get_application('#{@application_id}')") do
|
23
|
-
pending if Fog.mocking?
|
24
|
-
result = Fog::Compute[:brightbox].get_application(@application_id)
|
25
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::APPLICATION, {:allow_extra_keys => true}) { result }
|
26
|
-
end
|
27
|
-
|
28
|
-
update_options = {:name => "Fog@#{Time.now.iso8601}"}
|
29
|
-
tests("#update_application('#{@application_id}', #{update_options.inspect})") do
|
30
|
-
pending if Fog.mocking?
|
31
|
-
result = Fog::Compute[:brightbox].update_application(@application_id, update_options)
|
32
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::APPLICATION, {:allow_extra_keys => true}) { result }
|
33
|
-
end
|
34
|
-
|
35
|
-
tests("#reset_secret_application('#{@application_id}')") do
|
36
|
-
pending if Fog.mocking?
|
37
|
-
result = Fog::Compute[:brightbox].reset_secret_application(@application_id)
|
38
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::APPLICATION, {:allow_extra_keys => true}) { result }
|
39
|
-
test("new secret is visible") { ! result["secret"].nil? }
|
40
|
-
end
|
41
|
-
|
42
|
-
tests("#destroy_application('#{@application_id}')") do
|
43
|
-
pending if Fog.mocking?
|
44
|
-
result = Fog::Compute[:brightbox].destroy_application(@application_id)
|
45
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::APPLICATION, {:allow_extra_keys => true}) { result }
|
46
|
-
end
|
47
|
-
|
48
|
-
end
|
49
|
-
|
50
|
-
tests('failure') do
|
51
|
-
|
52
|
-
tests("#get_api_client('app-00000')").raises(Excon::Errors::NotFound) do
|
53
|
-
pending if Fog.mocking?
|
54
|
-
Fog::Compute[:brightbox].get_application('app-00000')
|
55
|
-
end
|
56
|
-
|
57
|
-
tests("#get_api_client").raises(ArgumentError) do
|
58
|
-
pending if Fog.mocking?
|
59
|
-
Fog::Compute[:brightbox].get_application
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
end
|
@@ -1,85 +0,0 @@
|
|
1
|
-
Shindo.tests('Fog::Compute[:brightbox] | cloud ip requests', ['brightbox']) do
|
2
|
-
|
3
|
-
tests('success') do
|
4
|
-
|
5
|
-
unless Fog.mocking?
|
6
|
-
@server = Brightbox::Compute::TestSupport.get_test_server
|
7
|
-
end
|
8
|
-
|
9
|
-
tests("#create_cloud_ip") do
|
10
|
-
pending if Fog.mocking?
|
11
|
-
result = Fog::Compute[:brightbox].create_cloud_ip
|
12
|
-
@cloud_ip_id = result["id"]
|
13
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::CLOUD_IP, {:allow_extra_keys => true}) { result }
|
14
|
-
end
|
15
|
-
|
16
|
-
tests("#list_cloud_ips") do
|
17
|
-
pending if Fog.mocking?
|
18
|
-
result = Fog::Compute[:brightbox].list_cloud_ips
|
19
|
-
data_matches_schema(Brightbox::Compute::Formats::Collection::CLOUD_IPS, {:allow_extra_keys => true}) { result }
|
20
|
-
end
|
21
|
-
|
22
|
-
tests("#get_cloud_ip('#{@cloud_ip_id}')") do
|
23
|
-
pending if Fog.mocking?
|
24
|
-
result = Fog::Compute[:brightbox].get_cloud_ip(@cloud_ip_id)
|
25
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::CLOUD_IP, {:allow_extra_keys => true}) { result }
|
26
|
-
end
|
27
|
-
|
28
|
-
unless Fog.mocking?
|
29
|
-
map_options = {:destination => @server.interfaces.first["id"]}
|
30
|
-
end
|
31
|
-
|
32
|
-
tests("#map_cloud_ip('#{@cloud_ip_id}', #{map_options.inspect})") do
|
33
|
-
pending if Fog.mocking?
|
34
|
-
result = Fog::Compute[:brightbox].map_cloud_ip(@cloud_ip_id, map_options)
|
35
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::CLOUD_IP, {:allow_extra_keys => true}) { result }
|
36
|
-
end
|
37
|
-
|
38
|
-
unless Fog.mocking?
|
39
|
-
Fog::Compute[:brightbox].cloud_ips.get(@cloud_ip_id).wait_for { mapped? }
|
40
|
-
end
|
41
|
-
|
42
|
-
tests("#unmap_cloud_ip('#{@cloud_ip_id}')") do
|
43
|
-
pending if Fog.mocking?
|
44
|
-
result = Fog::Compute[:brightbox].unmap_cloud_ip(@cloud_ip_id)
|
45
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::CLOUD_IP, {:allow_extra_keys => true}) { result }
|
46
|
-
end
|
47
|
-
|
48
|
-
unless Fog.mocking?
|
49
|
-
update_options = {:reverse_dns => "public.#{@server.id}.gb1.brightbox.com"}
|
50
|
-
end
|
51
|
-
|
52
|
-
tests("#update_cloud_ip('#{@cloud_ip_id}', #{update_options.inspect})") do
|
53
|
-
pending if Fog.mocking?
|
54
|
-
result = Fog::Compute[:brightbox].update_cloud_ip(@cloud_ip_id, update_options)
|
55
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::CLOUD_IP, {:allow_extra_keys => true}) { result }
|
56
|
-
result = Fog::Compute[:brightbox].update_cloud_ip(@cloud_ip_id, {:reverse_dns => ""})
|
57
|
-
end
|
58
|
-
|
59
|
-
tests("#destroy_cloud_ip('#{@cloud_ip_id}')") do
|
60
|
-
pending if Fog.mocking?
|
61
|
-
result = Fog::Compute[:brightbox].destroy_cloud_ip(@cloud_ip_id)
|
62
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::CLOUD_IP, {:allow_extra_keys => true}) { result }
|
63
|
-
end
|
64
|
-
|
65
|
-
unless Fog.mocking?
|
66
|
-
@server.destroy
|
67
|
-
end
|
68
|
-
|
69
|
-
end
|
70
|
-
|
71
|
-
tests('failure') do
|
72
|
-
|
73
|
-
tests("#get_cloud_ip('cip-00000')").raises(Excon::Errors::NotFound) do
|
74
|
-
pending if Fog.mocking?
|
75
|
-
Fog::Compute[:brightbox].get_cloud_ip('cip-00000')
|
76
|
-
end
|
77
|
-
|
78
|
-
tests("#get_cloud_ip").raises(ArgumentError) do
|
79
|
-
pending if Fog.mocking?
|
80
|
-
Fog::Compute[:brightbox].get_cloud_ip
|
81
|
-
end
|
82
|
-
|
83
|
-
end
|
84
|
-
|
85
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
Shindo.tests('Fog::Compute[:brightbox] | collaboration requests', ['brightbox']) do
|
2
|
-
|
3
|
-
tests('success') do
|
4
|
-
|
5
|
-
tests("#create_collaboration") do
|
6
|
-
pending if Fog.mocking?
|
7
|
-
collaboration = Fog::Compute[:brightbox].create_collaboration(:email => "paul@example.com", :role => "admin")
|
8
|
-
@collaboration_id = collaboration['id']
|
9
|
-
formats(Brightbox::Compute::Formats::Full::COLLABORATION, false) { collaboration }
|
10
|
-
end
|
11
|
-
|
12
|
-
tests("#list_collaborations") do
|
13
|
-
pending if Fog.mocking?
|
14
|
-
result = Fog::Compute[:brightbox].list_collaborations
|
15
|
-
|
16
|
-
formats(Brightbox::Compute::Formats::Collection::COLLABORATIONS, false) { result }
|
17
|
-
end
|
18
|
-
|
19
|
-
tests("#get_collaboration") do
|
20
|
-
pending if Fog.mocking?
|
21
|
-
result = Fog::Compute[:brightbox].get_collaboration(@collaboration_id)
|
22
|
-
formats(Brightbox::Compute::Formats::Full::COLLABORATION, false) { result }
|
23
|
-
end
|
24
|
-
|
25
|
-
tests("#destroy_collaboration") do
|
26
|
-
pending if Fog.mocking?
|
27
|
-
result = Fog::Compute[:brightbox].destroy_collaboration(@collaboration_id)
|
28
|
-
formats(Brightbox::Compute::Formats::Full::COLLABORATION, false) { result }
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
tests("failure") do
|
33
|
-
tests("get_collaboration('col-abcde')").raises(Excon::Errors::NotFound) do
|
34
|
-
pending if Fog.mocking?
|
35
|
-
Fog::Compute[:brightbox].get_collaboration("col-abcde")
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
@@ -1,54 +0,0 @@
|
|
1
|
-
Shindo.tests('Fog::Compute[:brightbox] | database server requests', ['brightbox']) do
|
2
|
-
pending if Fog.mocking?
|
3
|
-
|
4
|
-
tests('success') do
|
5
|
-
|
6
|
-
create_options = {}
|
7
|
-
tests("#create_database_server(#{create_options.inspect})") do
|
8
|
-
result = Fog::Compute[:brightbox].create_database_server(create_options)
|
9
|
-
@database_server_id = result["id"]
|
10
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::DATABASE_SERVER, {:allow_extra_keys => true}) { result }
|
11
|
-
end
|
12
|
-
|
13
|
-
tests("#list_database_servers") do
|
14
|
-
result = Fog::Compute[:brightbox].list_database_servers
|
15
|
-
data_matches_schema(Brightbox::Compute::Formats::Collection::DATABASE_SERVERS, {:allow_extra_keys => true}) { result }
|
16
|
-
end
|
17
|
-
|
18
|
-
tests("#get_database_server('#{@database_server_id}')") do
|
19
|
-
result = Fog::Compute[:brightbox].get_database_server(@database_server_id)
|
20
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::DATABASE_SERVER, {:allow_extra_keys => true}) { result }
|
21
|
-
end
|
22
|
-
|
23
|
-
update_options = {
|
24
|
-
:name => "New name"
|
25
|
-
}
|
26
|
-
tests("#update_database_server('#{@database_server_id}', update_options)") do
|
27
|
-
result = Fog::Compute[:brightbox].update_database_server(@database_server_id, update_options)
|
28
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::DATABASE_SERVER, {:allow_extra_keys => true}) { result }
|
29
|
-
end
|
30
|
-
|
31
|
-
Fog::Compute[:brightbox].database_servers.get(@database_server_id).wait_for { ready? }
|
32
|
-
|
33
|
-
tests("#reset_password_database_server('#{@database_server_id}')") do
|
34
|
-
result = Fog::Compute[:brightbox].reset_password_database_server(@database_server_id)
|
35
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::DATABASE_SERVER, {:allow_extra_keys => true}) { result }
|
36
|
-
test("new password is visible") { ! result["admin_password"].nil? }
|
37
|
-
end
|
38
|
-
|
39
|
-
tests("#destroy_database_server('#{@database_server_id}')") do
|
40
|
-
result = Fog::Compute[:brightbox].destroy_database_server(@database_server_id)
|
41
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::DATABASE_SERVER, {:allow_extra_keys => true}) { result }
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
tests('failure') do
|
46
|
-
tests("create_database_server").raises(ArgumentError) do
|
47
|
-
Fog::Compute[:brightbox].create_database_server
|
48
|
-
end
|
49
|
-
|
50
|
-
tests("get_database_server").raises(Excon::Errors::NotFound) do
|
51
|
-
Fog::Compute[:brightbox].get_database_server("dbs-00000")
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
Shindo.tests('Fog::Compute[:brightbox] | database snapshot requests', ['brightbox']) do
|
2
|
-
pending if Fog.mocking?
|
3
|
-
|
4
|
-
service = Fog::Compute[:brightbox]
|
5
|
-
|
6
|
-
tests('success') do
|
7
|
-
|
8
|
-
# Create a Database Server, then snapshot it
|
9
|
-
database_server = service.database_servers.create
|
10
|
-
database_server.wait_for { ready? }
|
11
|
-
service.snapshot_database_server(database_server.id)
|
12
|
-
|
13
|
-
tests("#list_database_snapshots") do
|
14
|
-
result = service.list_database_snapshots
|
15
|
-
data_matches_schema(Brightbox::Compute::Formats::Collection::DATABASE_SNAPSHOTS, {:allow_extra_keys => true}) { result }
|
16
|
-
@database_snapshot_id = result.last["id"]
|
17
|
-
end
|
18
|
-
|
19
|
-
# Can't delete the server until snapshot is finished
|
20
|
-
service.database_snapshots.get(@database_snapshot_id).wait_for { ready? }
|
21
|
-
database_server.destroy
|
22
|
-
|
23
|
-
tests("#get_database_snapshot('#{@database_snapshot_id}')") do
|
24
|
-
result = service.get_database_snapshot(@database_snapshot_id)
|
25
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::DATABASE_SNAPSHOT, {:allow_extra_keys => true}) { result }
|
26
|
-
end
|
27
|
-
|
28
|
-
update_options = {
|
29
|
-
:name => "New name"
|
30
|
-
}
|
31
|
-
tests("#update_database_snapshot('#{@database_snapshot_id}', update_options)") do
|
32
|
-
result = service.update_database_snapshot(@database_snapshot_id, update_options)
|
33
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::DATABASE_SNAPSHOT, {:allow_extra_keys => true}) { result }
|
34
|
-
end
|
35
|
-
|
36
|
-
tests("#destroy_database_snapshot('#{@database_snapshot_id}')") do
|
37
|
-
result = service.destroy_database_snapshot(@database_snapshot_id)
|
38
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::DATABASE_SNAPSHOT, {:allow_extra_keys => true}) { result }
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
tests('failure') do
|
43
|
-
tests("get_database_snapshot").raises(Excon::Errors::NotFound) do
|
44
|
-
service.get_database_snapshot("dbs-00000")
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
Shindo.tests('Fog::Compute[:brightbox] | database type requests', ['brightbox']) do
|
2
|
-
|
3
|
-
tests('success') do
|
4
|
-
tests("#list_database_types") do
|
5
|
-
pending if Fog.mocking?
|
6
|
-
result = Fog::Compute[:brightbox].list_database_types
|
7
|
-
data_matches_schema(Brightbox::Compute::Formats::Collection::DATABASE_SERVER_TYPES, {:allow_extra_keys => true}) { result }
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
tests('failure') do
|
12
|
-
tests("#get_database_type").raises(Excon::Errors::NotFound) do
|
13
|
-
pending if Fog.mocking?
|
14
|
-
Fog::Compute[:brightbox].get_database_type("dbt-00000")
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
Shindo.tests('Fog::Compute[:brightbox] | firewall policy requests', ['brightbox']) do
|
2
|
-
|
3
|
-
tests('success') do
|
4
|
-
pending if Fog.mocking?
|
5
|
-
|
6
|
-
create_options = {
|
7
|
-
:name => "Fog test policy A"
|
8
|
-
}
|
9
|
-
|
10
|
-
tests("#create_firewall_policy(#{create_options.inspect})") do
|
11
|
-
result = Fog::Compute[:brightbox].create_firewall_policy(create_options)
|
12
|
-
@firewall_policy_id = result["id"]
|
13
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::FIREWALL_POLICY, {:allow_extra_keys => true}) { result }
|
14
|
-
end
|
15
|
-
|
16
|
-
tests("#list_firewall_policies()") do
|
17
|
-
data_matches_schema(Brightbox::Compute::Formats::Collection::FIREWALL_POLICIES, {:allow_extra_keys => true}) do
|
18
|
-
Fog::Compute[:brightbox].list_firewall_policies
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
tests("#get_firewall_policy('#{@firewall_policy_id}')") do
|
23
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::FIREWALL_POLICY, {:allow_extra_keys => true}) do
|
24
|
-
Fog::Compute[:brightbox].get_firewall_policy(@firewall_policy_id)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
update_options = {:name => "Fog test policy B"}
|
29
|
-
tests("#update_firewall_policy('#{@firewall_policy_id}', #{update_options.inspect})") do
|
30
|
-
result = Fog::Compute[:brightbox].update_firewall_policy(@firewall_policy_id, update_options)
|
31
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::FIREWALL_POLICY, {:allow_extra_keys => true}) { result }
|
32
|
-
returns("Fog test policy B") { result["name"] }
|
33
|
-
end
|
34
|
-
|
35
|
-
tests("#destroy_firewall_policy('#{@firewall_policy_id}')") do
|
36
|
-
result = Fog::Compute[:brightbox].destroy_firewall_policy(@firewall_policy_id)
|
37
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::FIREWALL_POLICY, {:allow_extra_keys => true}) { result }
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
Shindo.tests('Fog::Compute[:brightbox] | firewall rule requests', ['brightbox']) do
|
2
|
-
|
3
|
-
tests('success') do
|
4
|
-
pending if Fog.mocking?
|
5
|
-
|
6
|
-
unless Fog.mocking?
|
7
|
-
policy = Fog::Compute[:brightbox].firewall_policies.create
|
8
|
-
end
|
9
|
-
|
10
|
-
create_options = {
|
11
|
-
:firewall_policy => policy.id,
|
12
|
-
:destination => "127.0.0.1"
|
13
|
-
}
|
14
|
-
|
15
|
-
tests("#create_firewall_rule(#{create_options.inspect})") do
|
16
|
-
result = Fog::Compute[:brightbox].create_firewall_rule(create_options)
|
17
|
-
@firewall_rule_id = result["id"]
|
18
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::FIREWALL_RULE, {:allow_extra_keys => true}) { result }
|
19
|
-
end
|
20
|
-
|
21
|
-
tests("#get_firewall_rule('#{@firewall_rule_id}')") do
|
22
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::FIREWALL_RULE, {:allow_extra_keys => true}) do
|
23
|
-
Fog::Compute[:brightbox].get_firewall_rule(@firewall_rule_id)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
update_options = {:source => nil, :destination => "127.0.0.1"}
|
28
|
-
tests("#update_firewall_rule('#{@firewall_rule_id}', #{update_options.inspect})") do
|
29
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::FIREWALL_RULE, {:allow_extra_keys => true}) do
|
30
|
-
Fog::Compute[:brightbox].update_firewall_rule(@firewall_rule_id, update_options)
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
tests("#destroy_firewall_rule('#{@firewall_rule_id}')") do
|
35
|
-
result = Fog::Compute[:brightbox].destroy_firewall_rule(@firewall_rule_id)
|
36
|
-
data_matches_schema(Brightbox::Compute::Formats::Full::FIREWALL_RULE, {:allow_extra_keys => true}) { result }
|
37
|
-
end
|
38
|
-
|
39
|
-
unless Fog.mocking?
|
40
|
-
policy.destroy
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|