fog-brightbox 1.0.0.rc2 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -2
- data/CHANGELOG.md +48 -1
- data/README.md +3 -4
- data/fog-brightbox.gemspec +1 -1
- data/lib/fog/brightbox/compute/image_selector.rb +3 -1
- data/lib/fog/brightbox/models/compute/api_client.rb +1 -1
- data/lib/fog/brightbox/models/compute/cloud_ip.rb +1 -1
- data/lib/fog/brightbox/models/compute/collaboration.rb +1 -1
- data/lib/fog/brightbox/models/compute/collaborations.rb +1 -1
- data/lib/fog/brightbox/models/compute/database_server.rb +4 -1
- data/lib/fog/brightbox/models/compute/database_snapshot.rb +1 -1
- data/lib/fog/brightbox/models/compute/firewall_policy.rb +1 -1
- data/lib/fog/brightbox/models/compute/firewall_rule.rb +1 -1
- data/lib/fog/brightbox/models/compute/image.rb +1 -1
- data/lib/fog/brightbox/models/compute/load_balancer.rb +4 -1
- data/lib/fog/brightbox/models/compute/server.rb +4 -1
- data/lib/fog/brightbox/models/compute/server_group.rb +1 -1
- data/lib/fog/brightbox/models/compute/user_collaboration.rb +1 -1
- data/lib/fog/brightbox/models/compute/user_collaborations.rb +1 -1
- data/lib/fog/brightbox/version.rb +1 -1
- data/spec/fog/brightbox/config_spec.rb +3 -3
- data/spec/fog/brightbox/link_helper_spec.rb +1 -1
- data/spec/fog/brightbox/storage/authentication_request_spec.rb +4 -4
- data/spec/fog/compute/brightbox/database_server_spec.rb +16 -1
- data/spec/fog/compute/brightbox/load_balancer_spec.rb +24 -0
- data/spec/fog/compute/brightbox/server_spec.rb +43 -1
- data/spec/fog/storage/brightbox_spec.rb +4 -4
- data/tests/brightbox/compute_tests.rb +2 -2
- data/tests/brightbox/requests/compute/api_client_tests.rb +2 -2
- data/tests/brightbox/requests/compute/application_test.rb +2 -2
- data/tests/brightbox/requests/compute/cloud_ip_tests.rb +2 -2
- data/tests/brightbox/requests/compute/collaboration_tests.rb +6 -3
- data/tests/brightbox/requests/compute/database_server_tests.rb +2 -2
- data/tests/brightbox/requests/compute/database_snapsnot_tests.rb +2 -2
- data/tests/brightbox/requests/compute/firewall_policy_tests.rb +2 -2
- data/tests/brightbox/requests/compute/firewall_rule_tests.rb +2 -2
- data/tests/brightbox/requests/compute/image_tests.rb +2 -2
- data/tests/brightbox/requests/compute/load_balancer_tests.rb +2 -2
- data/tests/brightbox/requests/compute/server_group_tests.rb +2 -2
- data/tests/brightbox/requests/compute/server_tests.rb +2 -2
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35e9bddfb076ce0f5d2aee8ffde307fa556fb566edfff3a42ec77629be90f37f
|
4
|
+
data.tar.gz: '08dbc3f72b46671785b30081e39379e0522a30aa4667fd676cf6a754359bd86d'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67694ea3b653fb45b935d1c7d0f5526df4a7087e16afb4588c59e5a8d9829a82958cffd78ec7b50be0af0966c1705e5107c824a48345a3a823ff7c72e676a323
|
7
|
+
data.tar.gz: 2170741c385dbfeb503c29f23f7289ddb4886c8318d4c15ba48ff16ee05e412b211042111f490d32a7064165806f32f9510d13fd220589e58b1294deb9d13fb0
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,42 @@
|
|
1
|
-
###
|
1
|
+
### 1.4.0 / 2021-02-17
|
2
|
+
|
3
|
+
Changes:
|
4
|
+
|
5
|
+
* Relax dependencies to allow Ruby 3.0 to be used.
|
6
|
+
|
7
|
+
### 1.3.0 / 2020-11-24
|
8
|
+
|
9
|
+
Changes:
|
10
|
+
|
11
|
+
* Add `Server#disk_encrypted` attribute to support creation of servers with
|
12
|
+
LUKS based encryption at rest.
|
13
|
+
|
14
|
+
### 1.2.0 / 2020-11-16
|
15
|
+
|
16
|
+
Changes:
|
17
|
+
|
18
|
+
* Add `LoadBalancer#ssl_minimum_version` attribute to configure the TLS/SSL
|
19
|
+
version supported by the load balancer.
|
20
|
+
|
21
|
+
### 1.1.0 / 2020-06-30
|
22
|
+
|
23
|
+
Changes:
|
24
|
+
|
25
|
+
* Add Ruby 2.6 and 2.7 to Travis CI testing matrix.
|
26
|
+
* Remove bundler installation step from Travis CI.
|
27
|
+
* Use `example.test` for testing domains rather than `example.com` to avoid
|
28
|
+
leaking routable traffic.
|
29
|
+
* Add `FOG_TEST_COLLABORATOR_EMAIL` to enable ENV based setting of email
|
30
|
+
address when using the tests for integation tests.`
|
31
|
+
|
32
|
+
Bug fixes:
|
33
|
+
|
34
|
+
* Add `status` check to `ImageSelector` so that unavailable images were not
|
35
|
+
selected for use automatically and causing failures in tests.
|
36
|
+
* Fix creating database servers from snapshots by adding the `snapshot_id`
|
37
|
+
attribute ensuring the value is not filtered when using the model.
|
38
|
+
|
39
|
+
### 1.0.0 / 2018-10-05
|
2
40
|
|
3
41
|
Major Changes:
|
4
42
|
|
@@ -10,6 +48,15 @@ Major Changes:
|
|
10
48
|
did not require identifiers and were treated as the authenticated user.
|
11
49
|
* Remove deprecated `Compute#request` multiple argument version.
|
12
50
|
* Remove deprecated `#destroy_(resource)` requests.
|
51
|
+
* Fix `#destroy_(resource)` references in models.
|
52
|
+
|
53
|
+
### 0.16.1 / 2018-09-07
|
54
|
+
|
55
|
+
Bug fixes:
|
56
|
+
|
57
|
+
* Fix ordering issue between declaration of fog services and `autoload` modules.
|
58
|
+
Changes in `fog-core` would reference modules before available in autoload so
|
59
|
+
caused a name error.
|
13
60
|
|
14
61
|
### 0.16.0 / 2018-09-04
|
15
62
|
|
data/README.md
CHANGED
@@ -39,11 +39,10 @@ and its modules:
|
|
39
39
|
* http://fog.io/
|
40
40
|
* http://rubydoc.info/gems/fog/
|
41
41
|
|
42
|
-
### Ruby
|
42
|
+
### Ruby version support
|
43
43
|
|
44
|
-
|
45
|
-
|
46
|
-
specify in your application's `Gemfile`
|
44
|
+
As required by the main `fog-core` library, support for Ruby 1.9 was dropped in
|
45
|
+
`v1.0.0` of this gem.
|
47
46
|
|
48
47
|
## Contributing
|
49
48
|
|
data/fog-brightbox.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.required_ruby_version = "
|
22
|
+
spec.required_ruby_version = ">= 2.0"
|
23
23
|
|
24
24
|
spec.add_dependency "fog-core", ">= 1.45", "< 3.0"
|
25
25
|
spec.add_dependency "fog-json"
|
@@ -28,6 +28,7 @@ module Fog
|
|
28
28
|
def latest_ubuntu
|
29
29
|
@images.select do |img|
|
30
30
|
img["official"] == true &&
|
31
|
+
img["status"] == "available" &&
|
31
32
|
img["arch"] == "i686" &&
|
32
33
|
img["name"] =~ /ubuntu/i
|
33
34
|
end.sort do |a, b|
|
@@ -46,7 +47,8 @@ module Fog
|
|
46
47
|
def official_minimal
|
47
48
|
@images.select do |img|
|
48
49
|
img["official"] == true &&
|
49
|
-
|
50
|
+
img["status"] == "available" &&
|
51
|
+
img["virtual_size"] != 0
|
50
52
|
end.sort_by do |img|
|
51
53
|
img["disk_size"]
|
52
54
|
end.first["id"]
|
@@ -34,6 +34,8 @@ module Fog
|
|
34
34
|
attribute :flavor_id, "alias" => "database_server_type", :squash => "id"
|
35
35
|
attribute :zone_id, "alias" => "zone", :squash => "id"
|
36
36
|
|
37
|
+
attribute :snapshot_id
|
38
|
+
|
37
39
|
attribute :cloud_ips
|
38
40
|
|
39
41
|
def save
|
@@ -54,6 +56,7 @@ module Fog
|
|
54
56
|
options[:version] = database_version if database_version
|
55
57
|
options[:database_type] = flavor_id if flavor_id
|
56
58
|
options[:zone] = zone_id if zone_id
|
59
|
+
options[:snapshot] = snapshot_id if snapshot_id
|
57
60
|
|
58
61
|
data = create_database_server(options)
|
59
62
|
end
|
@@ -81,7 +84,7 @@ module Fog
|
|
81
84
|
|
82
85
|
def destroy
|
83
86
|
requires :identity
|
84
|
-
merge_attributes(service.
|
87
|
+
merge_attributes(service.delete_database_server(identity))
|
85
88
|
true
|
86
89
|
end
|
87
90
|
|
@@ -18,6 +18,8 @@ module Fog
|
|
18
18
|
attribute :healthcheck
|
19
19
|
attribute :listeners
|
20
20
|
|
21
|
+
attribute :ssl_minimum_version
|
22
|
+
|
21
23
|
# These SSL attributes act only as setters. You can not read certs or keys via the API
|
22
24
|
attribute :certificate_pem
|
23
25
|
attribute :certificate_private_key
|
@@ -58,6 +60,7 @@ module Fog
|
|
58
60
|
:buffer_size => buffer_size,
|
59
61
|
:certificate_pem => certificate_pem,
|
60
62
|
:certificate_private_key => certificate_private_key,
|
63
|
+
:ssl_minimum_version => ssl_minimum_version,
|
61
64
|
:sslv3 => ssl3?
|
62
65
|
}.delete_if { |_k, v| v.nil? || v == "" }
|
63
66
|
data = service.create_load_balancer(options)
|
@@ -67,7 +70,7 @@ module Fog
|
|
67
70
|
|
68
71
|
def destroy
|
69
72
|
requires :identity
|
70
|
-
service.
|
73
|
+
service.delete_load_balancer(identity)
|
71
74
|
true
|
72
75
|
end
|
73
76
|
|
@@ -21,6 +21,8 @@ module Fog
|
|
21
21
|
attribute :fqdn
|
22
22
|
attribute :console_token
|
23
23
|
|
24
|
+
attribute :disk_encrypted
|
25
|
+
|
24
26
|
# Times
|
25
27
|
attribute :created_at, :type => :time
|
26
28
|
attribute :started_at, :type => :time
|
@@ -127,7 +129,7 @@ module Fog
|
|
127
129
|
|
128
130
|
def destroy
|
129
131
|
requires :identity
|
130
|
-
service.
|
132
|
+
service.delete_server(identity)
|
131
133
|
true
|
132
134
|
end
|
133
135
|
|
@@ -188,6 +190,7 @@ module Fog
|
|
188
190
|
|
189
191
|
options.merge!(:server_type => flavor_id) unless flavor_id.nil? || flavor_id == ""
|
190
192
|
options.merge!(:cloud_ip => cloud_ip) unless cloud_ip.nil? || cloud_ip == ""
|
193
|
+
options.merge!(:disk_encrypted => disk_encrypted) if disk_encrypted
|
191
194
|
|
192
195
|
data = service.create_server(options)
|
193
196
|
merge_attributes(data)
|
@@ -220,7 +220,7 @@ describe Fog::Brightbox::Config do
|
|
220
220
|
@options = {
|
221
221
|
:brightbox_client_id => "app-12345",
|
222
222
|
:brightbox_secret => "12345",
|
223
|
-
:brightbox_username => "user@example.
|
223
|
+
:brightbox_username => "user@example.test",
|
224
224
|
:brightbox_password => "12345"
|
225
225
|
}
|
226
226
|
@config = Fog::Brightbox::Config.new(@options)
|
@@ -241,7 +241,7 @@ describe Fog::Brightbox::Config do
|
|
241
241
|
|
242
242
|
describe "when setting management_url with URI" do
|
243
243
|
it "sets it correctly" do
|
244
|
-
uri = URI.parse("https://example.
|
244
|
+
uri = URI.parse("https://example.test")
|
245
245
|
@config = Fog::Brightbox::Config.new
|
246
246
|
@config.storage_management_url = uri
|
247
247
|
assert_equal @config.storage_management_url, uri
|
@@ -250,7 +250,7 @@ describe Fog::Brightbox::Config do
|
|
250
250
|
|
251
251
|
describe "when setting management_url with String" do
|
252
252
|
it "raises ArgumentError" do
|
253
|
-
uri = "http://example.
|
253
|
+
uri = "http://example.test/wrong"
|
254
254
|
assert_raises(ArgumentError) { Fog::Brightbox::Config.new.storage_management_url = uri }
|
255
255
|
end
|
256
256
|
end
|
@@ -3,7 +3,7 @@ require "spec_helper"
|
|
3
3
|
describe Fog::Brightbox::LinkHelper do
|
4
4
|
describe "when initialized with an RFC5988 value" do
|
5
5
|
before do
|
6
|
-
@header = "<https://www.example.
|
6
|
+
@header = "<https://www.example.test/1.0/images/img-12345>; rel=snapshot"
|
7
7
|
@helper = Fog::Brightbox::LinkHelper.new(@header)
|
8
8
|
end
|
9
9
|
|
@@ -47,7 +47,7 @@ describe Fog::Brightbox::Storage::AuthenticationRequest do
|
|
47
47
|
stub_request(:get, "https://orbit.brightbox.com/v1").
|
48
48
|
with(:headers => {
|
49
49
|
"Host" => "orbit.brightbox.com:443",
|
50
|
-
"X-Auth-User" => "user@example.
|
50
|
+
"X-Auth-User" => "user@example.test",
|
51
51
|
"X-Auth-Key" => "abcde"
|
52
52
|
}).to_return(authorized_response)
|
53
53
|
end
|
@@ -56,7 +56,7 @@ describe Fog::Brightbox::Storage::AuthenticationRequest do
|
|
56
56
|
settings = {
|
57
57
|
:brightbox_client_id => "app-12345",
|
58
58
|
:brightbox_secret => "12345",
|
59
|
-
:brightbox_username => "user@example.
|
59
|
+
:brightbox_username => "user@example.test",
|
60
60
|
:brightbox_password => "abcde"
|
61
61
|
}
|
62
62
|
@config = Fog::Brightbox::Config.new(settings)
|
@@ -70,7 +70,7 @@ describe Fog::Brightbox::Storage::AuthenticationRequest do
|
|
70
70
|
stub_request(:get, "https://orbit.brightbox.com/v1").
|
71
71
|
with(:headers => {
|
72
72
|
"Host" => "orbit.brightbox.com:443",
|
73
|
-
"X-Auth-User" => "user@example.
|
73
|
+
"X-Auth-User" => "user@example.test",
|
74
74
|
"X-Auth-Key" => "abcde"
|
75
75
|
}).to_return(unauthorized_response)
|
76
76
|
end
|
@@ -79,7 +79,7 @@ describe Fog::Brightbox::Storage::AuthenticationRequest do
|
|
79
79
|
settings = {
|
80
80
|
:brightbox_client_id => "app-12345",
|
81
81
|
:brightbox_secret => "12345",
|
82
|
-
:brightbox_username => "user@example.
|
82
|
+
:brightbox_username => "user@example.test",
|
83
83
|
:brightbox_password => "abcde"
|
84
84
|
}
|
85
85
|
@config = Fog::Brightbox::Config.new(settings)
|
@@ -19,7 +19,7 @@ describe Fog::Brightbox::Compute::DatabaseServer do
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
describe "when snapshotting
|
22
|
+
describe "when snapshotting with no options" do
|
23
23
|
it "returns the database server" do
|
24
24
|
stub_request(:post, "http://localhost/1.0/database_servers/dbs-12345/snapshot").
|
25
25
|
with(:query => hash_including(:account_id),
|
@@ -47,4 +47,19 @@ describe Fog::Brightbox::Compute::DatabaseServer do
|
|
47
47
|
assert_kind_of Fog::Brightbox::Compute::DatabaseSnapshot, @database_server.snapshot(true)
|
48
48
|
end
|
49
49
|
end
|
50
|
+
|
51
|
+
describe "when building from a snapshot" do
|
52
|
+
it "returns the new SQL instance" do
|
53
|
+
stub_request(:post, "http://localhost/1.0/database_servers").
|
54
|
+
with(:query => hash_including(:account_id),
|
55
|
+
:headers => { "Authorization" => "Bearer FAKECACHEDTOKEN" },
|
56
|
+
:body => hash_including(:snapshot => "dbi-lv426")).
|
57
|
+
to_return(:status => 202, :body => %q({"id": "dbs-12345"}))
|
58
|
+
|
59
|
+
@database_server = Fog::Brightbox::Compute::DatabaseServer.new(:service => service, :snapshot_id => "dbi-lv426")
|
60
|
+
@database_server.save
|
61
|
+
assert_kind_of Fog::Brightbox::Compute::DatabaseServer, @database_server
|
62
|
+
assert_equal "dbs-12345", @database_server.id
|
63
|
+
end
|
64
|
+
end
|
50
65
|
end
|
@@ -18,4 +18,28 @@ describe Fog::Brightbox::Compute::LoadBalancer do
|
|
18
18
|
assert_equal "load_balancer", subject.resource_name
|
19
19
|
end
|
20
20
|
end
|
21
|
+
|
22
|
+
describe "when creating" do
|
23
|
+
it "send correct JSON" do
|
24
|
+
options = {
|
25
|
+
healthcheck: {},
|
26
|
+
listeners: [
|
27
|
+
{
|
28
|
+
protocol: "http",
|
29
|
+
in: 80,
|
30
|
+
out: 80
|
31
|
+
}
|
32
|
+
],
|
33
|
+
nodes: []
|
34
|
+
}
|
35
|
+
|
36
|
+
stub_request(:post, "http://localhost/1.0/load_balancers").
|
37
|
+
with(:query => hash_including(:account_id),
|
38
|
+
:headers => { "Authorization" => "Bearer FAKECACHEDTOKEN" }).
|
39
|
+
to_return(:status => 202, :body => %q({"id": "lba-12345"}), :headers => {})
|
40
|
+
|
41
|
+
@load_balancer = Fog::Brightbox::Compute::LoadBalancer.new({ :service => service }.merge(options))
|
42
|
+
assert @load_balancer.save
|
43
|
+
end
|
44
|
+
end
|
21
45
|
end
|
@@ -19,7 +19,49 @@ describe Fog::Brightbox::Compute::Server do
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
describe "when
|
22
|
+
describe "when creating" do
|
23
|
+
describe "with required image_id" do
|
24
|
+
it "sends correct JSON" do
|
25
|
+
options = {
|
26
|
+
image_id: "img-12345"
|
27
|
+
}
|
28
|
+
|
29
|
+
stub_request(:post, "http://localhost/1.0/servers").
|
30
|
+
with(:query => hash_including(:account_id),
|
31
|
+
:headers => { "Authorization" => "Bearer FAKECACHEDTOKEN",
|
32
|
+
"Content-Type" => "application/json" },
|
33
|
+
:body => hash_including(:image => "img-12345")).
|
34
|
+
to_return(:status => 202, :body => %q({"id":"srv-12345"}), :headers => {})
|
35
|
+
|
36
|
+
@server = Fog::Brightbox::Compute::Server.new({ :service => service }.merge(options))
|
37
|
+
assert @server.save
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe "with additional disk_encrypted" do
|
42
|
+
it "sends correct JSON" do
|
43
|
+
options = {
|
44
|
+
image_id: "img-12345",
|
45
|
+
disk_encrypted: true
|
46
|
+
}
|
47
|
+
|
48
|
+
stub_request(:post, "http://localhost/1.0/servers").
|
49
|
+
with(:query => hash_including(:account_id),
|
50
|
+
:headers => { "Authorization" => "Bearer FAKECACHEDTOKEN",
|
51
|
+
"Content-Type" => "application/json" },
|
52
|
+
:body => hash_including(:disk_encrypted => true)).
|
53
|
+
to_return(:status => 202,
|
54
|
+
:body => %q({"id":"srv-12345","disk_encrypted":true}),
|
55
|
+
:headers => {})
|
56
|
+
|
57
|
+
@server = Fog::Brightbox::Compute::Server.new({ :service => service }.merge(options))
|
58
|
+
assert @server.save
|
59
|
+
assert @server.disk_encrypted
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
describe "when snapshotting with no options" do
|
23
65
|
it "returns the server" do
|
24
66
|
stub_request(:post, "http://localhost/1.0/servers/srv-12345/snapshot").
|
25
67
|
with(:query => hash_including(:account_id),
|
@@ -89,7 +89,7 @@ describe Fog::Brightbox::Storage do
|
|
89
89
|
{
|
90
90
|
:brightbox_client_id => "app-12345",
|
91
91
|
:brightbox_secret => "12345",
|
92
|
-
:brightbox_username => "user@example.
|
92
|
+
:brightbox_username => "user@example.test",
|
93
93
|
:brightbox_password => "abcde",
|
94
94
|
:brightbox_account => "acc-abcde"
|
95
95
|
}
|
@@ -111,7 +111,7 @@ describe Fog::Brightbox::Storage do
|
|
111
111
|
{
|
112
112
|
:brightbox_client_id => "app-12345",
|
113
113
|
:brightbox_secret => "12345",
|
114
|
-
:brightbox_username => "user@example.
|
114
|
+
:brightbox_username => "user@example.test",
|
115
115
|
:brightbox_password => "abcde"
|
116
116
|
}
|
117
117
|
end
|
@@ -204,7 +204,7 @@ describe Fog::Brightbox::Storage do
|
|
204
204
|
{
|
205
205
|
:brightbox_client_id => "app-12345",
|
206
206
|
:brightbox_secret => "12345",
|
207
|
-
:brightbox_username => "user@example.
|
207
|
+
:brightbox_username => "user@example.test",
|
208
208
|
:brightbox_password => "12345",
|
209
209
|
:brightbox_access_token => "1234567890abcdefghijklmnopqrstuvwxyz",
|
210
210
|
:brightbox_refresh_token => "1234567890abcdefghijklmnopqrstuvwxyz",
|
@@ -221,7 +221,7 @@ describe Fog::Brightbox::Storage do
|
|
221
221
|
|
222
222
|
# The reauthentication
|
223
223
|
stub_request(:get, "https://files.gb2.brightbox.com/v1").
|
224
|
-
with(:headers => { "X-Auth-User" => "user@example.
|
224
|
+
with(:headers => { "X-Auth-User" => "user@example.test", "X-Auth-Key" => "12345" }).
|
225
225
|
to_return(authorized_response)
|
226
226
|
|
227
227
|
# Repeated request
|
@@ -9,8 +9,8 @@ end
|
|
9
9
|
Shindo.tests("Fog::Compute.new", ["brightbox"]) do
|
10
10
|
tests("service options") do
|
11
11
|
{
|
12
|
-
:brightbox_api_url => "https://example.
|
13
|
-
:brightbox_auth_url => "https://example.
|
12
|
+
:brightbox_api_url => "https://example.test",
|
13
|
+
:brightbox_auth_url => "https://example.test",
|
14
14
|
:brightbox_client_id => "app-12345",
|
15
15
|
:brightbox_secret => "12345abdef6789",
|
16
16
|
:brightbox_username => "user-12345",
|
@@ -38,9 +38,9 @@ Shindo.tests("Fog::Compute[:brightbox] | api client requests", ["brightbox"]) do
|
|
38
38
|
test("new secret is visible") { !result["secret"].nil? }
|
39
39
|
end
|
40
40
|
|
41
|
-
tests("#
|
41
|
+
tests("#delete_api_client('#{@api_client_id}')") do
|
42
42
|
pending if Fog.mocking?
|
43
|
-
result = Fog::Compute[:brightbox].
|
43
|
+
result = Fog::Compute[:brightbox].delete_api_client(@api_client_id)
|
44
44
|
data_matches_schema(Brightbox::Compute::Formats::Full::API_CLIENT, :allow_extra_keys => true) { result }
|
45
45
|
end
|
46
46
|
end
|
@@ -37,9 +37,9 @@ Shindo.tests("Fog::Compute[:brightbox] | api client requests", ["brightbox"]) do
|
|
37
37
|
test("new secret is visible") { !result["secret"].nil? }
|
38
38
|
end
|
39
39
|
|
40
|
-
tests("#
|
40
|
+
tests("#delete_application('#{@application_id}')") do
|
41
41
|
pending if Fog.mocking?
|
42
|
-
result = Fog::Compute[:brightbox].
|
42
|
+
result = Fog::Compute[:brightbox].delete_application(@application_id)
|
43
43
|
data_matches_schema(Brightbox::Compute::Formats::Full::APPLICATION, :allow_extra_keys => true) { result }
|
44
44
|
end
|
45
45
|
end
|
@@ -54,9 +54,9 @@ Shindo.tests("Fog::Compute[:brightbox] | cloud ip requests", ["brightbox"]) do
|
|
54
54
|
result = Fog::Compute[:brightbox].update_cloud_ip(@cloud_ip_id, :reverse_dns => "")
|
55
55
|
end
|
56
56
|
|
57
|
-
tests("#
|
57
|
+
tests("#delete_cloud_ip('#{@cloud_ip_id}')") do
|
58
58
|
pending if Fog.mocking?
|
59
|
-
result = Fog::Compute[:brightbox].
|
59
|
+
result = Fog::Compute[:brightbox].delete_cloud_ip(@cloud_ip_id)
|
60
60
|
data_matches_schema(Brightbox::Compute::Formats::Full::CLOUD_IP, :allow_extra_keys => true) { result }
|
61
61
|
end
|
62
62
|
|
@@ -1,8 +1,11 @@
|
|
1
1
|
Shindo.tests("Fog::Compute[:brightbox] | collaboration requests", ["brightbox"]) do
|
2
2
|
tests("success") do
|
3
|
+
@test_collaborator_email = ENV["FOG_TEST_COLLABORATOR_EMAIL"]
|
4
|
+
pending unless @test_collaborator_email
|
5
|
+
|
3
6
|
tests("#create_collaboration") do
|
4
7
|
pending if Fog.mocking?
|
5
|
-
collaboration = Fog::Compute[:brightbox].create_collaboration(:email =>
|
8
|
+
collaboration = Fog::Compute[:brightbox].create_collaboration(:email => @test_collaborator_email, :role => "admin")
|
6
9
|
@collaboration_id = collaboration["id"]
|
7
10
|
formats(Brightbox::Compute::Formats::Full::COLLABORATION, false) { collaboration }
|
8
11
|
end
|
@@ -20,9 +23,9 @@ Shindo.tests("Fog::Compute[:brightbox] | collaboration requests", ["brightbox"])
|
|
20
23
|
formats(Brightbox::Compute::Formats::Full::COLLABORATION, false) { result }
|
21
24
|
end
|
22
25
|
|
23
|
-
tests("#
|
26
|
+
tests("#delete_collaboration") do
|
24
27
|
pending if Fog.mocking?
|
25
|
-
result = Fog::Compute[:brightbox].
|
28
|
+
result = Fog::Compute[:brightbox].delete_collaboration(@collaboration_id)
|
26
29
|
formats(Brightbox::Compute::Formats::Full::COLLABORATION, false) { result }
|
27
30
|
end
|
28
31
|
end
|
@@ -35,8 +35,8 @@ Shindo.tests("Fog::Compute[:brightbox] | database server requests", ["brightbox"
|
|
35
35
|
test("new password is visible") { !result["admin_password"].nil? }
|
36
36
|
end
|
37
37
|
|
38
|
-
tests("#
|
39
|
-
result = Fog::Compute[:brightbox].
|
38
|
+
tests("#delete_database_server('#{@database_server_id}')") do
|
39
|
+
result = Fog::Compute[:brightbox].delete_database_server(@database_server_id)
|
40
40
|
data_matches_schema(Brightbox::Compute::Formats::Full::DATABASE_SERVER, :allow_extra_keys => true) { result }
|
41
41
|
end
|
42
42
|
end
|
@@ -32,8 +32,8 @@ Shindo.tests("Fog::Compute[:brightbox] | database snapshot requests", ["brightbo
|
|
32
32
|
data_matches_schema(Brightbox::Compute::Formats::Full::DATABASE_SNAPSHOT, :allow_extra_keys => true) { result }
|
33
33
|
end
|
34
34
|
|
35
|
-
tests("#
|
36
|
-
result = service.
|
35
|
+
tests("#delete_database_snapshot('#{@database_snapshot_id}')") do
|
36
|
+
result = service.delete_database_snapshot(@database_snapshot_id)
|
37
37
|
data_matches_schema(Brightbox::Compute::Formats::Full::DATABASE_SNAPSHOT, :allow_extra_keys => true) { result }
|
38
38
|
end
|
39
39
|
end
|
@@ -31,8 +31,8 @@ Shindo.tests("Fog::Compute[:brightbox] | firewall policy requests", ["brightbox"
|
|
31
31
|
returns("Fog test policy B") { result["name"] }
|
32
32
|
end
|
33
33
|
|
34
|
-
tests("#
|
35
|
-
result = Fog::Compute[:brightbox].
|
34
|
+
tests("#delete_firewall_policy('#{@firewall_policy_id}')") do
|
35
|
+
result = Fog::Compute[:brightbox].delete_firewall_policy(@firewall_policy_id)
|
36
36
|
data_matches_schema(Brightbox::Compute::Formats::Full::FIREWALL_POLICY, :allow_extra_keys => true) { result }
|
37
37
|
end
|
38
38
|
end
|
@@ -30,8 +30,8 @@ Shindo.tests("Fog::Compute[:brightbox] | firewall rule requests", ["brightbox"])
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
tests("#
|
34
|
-
result = Fog::Compute[:brightbox].
|
33
|
+
tests("#delete_firewall_rule('#{@firewall_rule_id}')") do
|
34
|
+
result = Fog::Compute[:brightbox].delete_firewall_rule(@firewall_rule_id)
|
35
35
|
data_matches_schema(Brightbox::Compute::Formats::Full::FIREWALL_RULE, :allow_extra_keys => true) { result }
|
36
36
|
end
|
37
37
|
|
@@ -34,8 +34,8 @@ Shindo.tests("Fog::Compute[:brightbox] | image requests", ["brightbox"]) do
|
|
34
34
|
# end
|
35
35
|
|
36
36
|
## Same as other tests - can't be deleting them unless part of the test run
|
37
|
-
# tests("#
|
38
|
-
# result = Fog::Compute[:brightbox].
|
37
|
+
# tests("#delete_image('#{@image_id}')") do
|
38
|
+
# result = Fog::Compute[:brightbox].delete_image(@image_id)
|
39
39
|
# formats(Brightbox::Compute::Formats::Full::IMAGE) { result }
|
40
40
|
# end
|
41
41
|
end
|
@@ -85,9 +85,9 @@ Shindo.tests("Fog::Compute[:brightbox] | load balancer requests", ["brightbox"])
|
|
85
85
|
data_matches_schema(Brightbox::Compute::Formats::Full::LOAD_BALANCER, :allow_extra_keys => true) { result }
|
86
86
|
end
|
87
87
|
|
88
|
-
tests("#
|
88
|
+
tests("#delete_load_balancer('#{@load_balancer_id}')") do
|
89
89
|
pending if Fog.mocking?
|
90
|
-
result = Fog::Compute[:brightbox].
|
90
|
+
result = Fog::Compute[:brightbox].delete_load_balancer(@load_balancer_id)
|
91
91
|
data_matches_schema(Brightbox::Compute::Formats::Full::LOAD_BALANCER, :allow_extra_keys => true) { result }
|
92
92
|
end
|
93
93
|
|
@@ -61,9 +61,9 @@ Shindo.tests("Fog::Compute[:brightbox] | server group requests", ["brightbox"])
|
|
61
61
|
test("group is emptied") { result["servers"].empty? }
|
62
62
|
end
|
63
63
|
|
64
|
-
tests("#
|
64
|
+
tests("#delete_server_group('#{@server_group_id}')") do
|
65
65
|
pending if Fog.mocking?
|
66
|
-
result = Fog::Compute[:brightbox].
|
66
|
+
result = Fog::Compute[:brightbox].delete_server_group(@server_group_id)
|
67
67
|
data_matches_schema(Brightbox::Compute::Formats::Full::SERVER_GROUP, :allow_extra_keys => true) { result }
|
68
68
|
end
|
69
69
|
|
@@ -76,9 +76,9 @@ Shindo.tests("Fog::Compute[:brightbox] | server requests", ["brightbox"]) do
|
|
76
76
|
@snapshot.destroy
|
77
77
|
end
|
78
78
|
|
79
|
-
tests("#
|
79
|
+
tests("#delete_server('#{server_id}')") do
|
80
80
|
pending if Fog.mocking?
|
81
|
-
result = Fog::Compute[:brightbox].
|
81
|
+
result = Fog::Compute[:brightbox].delete_server(server_id)
|
82
82
|
data_matches_schema(Brightbox::Compute::Formats::Full::SERVER, :allow_extra_keys => true) { result }
|
83
83
|
end
|
84
84
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-brightbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Thornthwaite
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 1970-01-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-core
|
@@ -456,17 +456,16 @@ require_paths:
|
|
456
456
|
- lib
|
457
457
|
required_ruby_version: !ruby/object:Gem::Requirement
|
458
458
|
requirements:
|
459
|
-
- - "
|
459
|
+
- - ">="
|
460
460
|
- !ruby/object:Gem::Version
|
461
461
|
version: '2.0'
|
462
462
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
463
463
|
requirements:
|
464
|
-
- - "
|
464
|
+
- - ">="
|
465
465
|
- !ruby/object:Gem::Version
|
466
|
-
version:
|
466
|
+
version: '0'
|
467
467
|
requirements: []
|
468
|
-
|
469
|
-
rubygems_version: 2.7.6
|
468
|
+
rubygems_version: 3.0.6
|
470
469
|
signing_key:
|
471
470
|
specification_version: 4
|
472
471
|
summary: This library can be used as a module for `fog` or as standalone provider
|