fog-brightbox 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/fog/brightbox/models/compute/server.rb +3 -0
- data/lib/fog/brightbox/version.rb +1 -1
- data/spec/fog/compute/brightbox/server_spec.rb +43 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0171cd502b5ab6e6241edc43d35bd7cc5576ec5f8c4fc14076740927ac645ae2
|
4
|
+
data.tar.gz: 3017c31ae0face3f2fa8ae5993143ea5643c98ea58d2ea9adf0c5131d158cdc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd84165e64c458d7c4d266243f057548bc559de6b5cf92979c13a1e70d52101021acea48f9a200b408f38a87ed15961a959acf35a646ea4ec5f700d993014ee7
|
7
|
+
data.tar.gz: 398a1e5d0efee2a0de986ce5e42f938eb86bbbce46bbbd16ce0d807fc9b6b04acc60fd830ee772c249b6a94357e2e6c72616bba44be035d16ad1158bf2bb7cef
|
data/CHANGELOG.md
CHANGED
@@ -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
|
@@ -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)
|
@@ -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),
|