fog-brightbox 0.10.1 → 0.11.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 +0 -2
- data/CHANGELOG.md +16 -0
- data/lib/fog/brightbox/compute/image_selector.rb +17 -3
- data/lib/fog/brightbox/models/compute/database_server.rb +4 -2
- data/lib/fog/brightbox/version.rb +1 -1
- data/spec/fog/brightbox/storage/connection_errors_spec.rb +1 -1
- data/tests/brightbox/requests/compute/helper.rb +2 -12
- data/tests/brightbox/requests/compute/server_tests.rb +4 -0
- metadata +3 -5
- data/gemfiles/Gemfile.1.8.7 +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f78b9cfb19a9695c3f61d48c1531e65fadecd5ba
|
4
|
+
data.tar.gz: c56ae129b326f0b8319346012659e3dba8f4d402
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f74b56fee22796c8cafc290643723c9f7ffbcd41ed6ba3c47f03c5ae104ade57c46cffa5b972407392242fa9d51066aa2c621e9dc54a8f05fa79c544e5b782b
|
7
|
+
data.tar.gz: 1deee7feb6c5fcdfda834c3735d049cc9f3dbeb9d52434ea78fb8ab9ad8c4f4b8135ad475deac6dcba4766e9200ad3a2fcdef084c2eb1ab56463b42e7eb1b2d2
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
### 0.11.0 / 2016-07-05
|
2
|
+
|
3
|
+
Enchancements:
|
4
|
+
|
5
|
+
* Exposed fields on database servers related to automatic scheduled snapshots.
|
6
|
+
|
7
|
+
Bug fixes:
|
8
|
+
|
9
|
+
* Removed an error spec broken by Excon v0.50 undergoing a change of error
|
10
|
+
namespace breaking loading of the specs at present.
|
11
|
+
|
12
|
+
Changes:
|
13
|
+
|
14
|
+
* Stop testing Ruby 1.8.7 due to bitrot, the dependencies are creating more
|
15
|
+
issues than needed.
|
16
|
+
|
1
17
|
### 0.10.1 / 2015-12-01
|
2
18
|
|
3
19
|
Bug fixes:
|
@@ -22,8 +22,6 @@ module Fog
|
|
22
22
|
# * Latest by name (alphanumeric sort)
|
23
23
|
# * Latest by creation date
|
24
24
|
#
|
25
|
-
# @note This performs a live query against the API
|
26
|
-
#
|
27
25
|
# @return [String] if image matches containing the identifier
|
28
26
|
# @return [NilClass] if no image matches
|
29
27
|
#
|
@@ -36,7 +34,23 @@ module Fog
|
|
36
34
|
# Reverse sort so "raring" > "precise" and "13.10" > "13.04"
|
37
35
|
b["name"].downcase <=> a["name"].downcase
|
38
36
|
end.first["id"]
|
39
|
-
rescue
|
37
|
+
rescue StandardError
|
38
|
+
nil
|
39
|
+
end
|
40
|
+
|
41
|
+
# Returns current identifier of the smallest official image
|
42
|
+
#
|
43
|
+
# @return [String] if image matches containing the identifier
|
44
|
+
# @return [NilClass] if no image matches
|
45
|
+
#
|
46
|
+
def official_minimal
|
47
|
+
@images.select do |img|
|
48
|
+
img["official"] == true &&
|
49
|
+
img["virtual_size"] != 0
|
50
|
+
end.sort_by do |img|
|
51
|
+
img["disk_size"]
|
52
|
+
end.first["id"]
|
53
|
+
rescue StandardError
|
40
54
|
nil
|
41
55
|
end
|
42
56
|
end
|
@@ -21,6 +21,10 @@ module Fog
|
|
21
21
|
attribute :maintenance_weekday
|
22
22
|
attribute :maintenance_hour
|
23
23
|
|
24
|
+
# This is a crontab formatted string e.g. "* 5 * * 0"
|
25
|
+
attribute :snapshots_schedule, :type => :string
|
26
|
+
attribute :snapshots_schedule_next_at, :type => :time
|
27
|
+
|
24
28
|
attribute :created_at, :type => :time
|
25
29
|
attribute :updated_at, :type => :time
|
26
30
|
attribute :deleted_at, :type => :time
|
@@ -40,8 +44,6 @@ module Fog
|
|
40
44
|
|
41
45
|
options[:allow_access] = allow_access if allow_access
|
42
46
|
|
43
|
-
# These may be nil which sets them to default values upstream
|
44
|
-
# TODO: Dirty track the values so we don't send them when already nil
|
45
47
|
options[:maintenance_weekday] = maintenance_weekday
|
46
48
|
options[:maintenance_hour] = maintenance_hour
|
47
49
|
|
@@ -37,7 +37,7 @@ describe Fog::Brightbox::Storage::Connection do
|
|
37
37
|
416 => Excon::Errors::RequestedRangeNotSatisfiable,
|
38
38
|
417 => Excon::Errors::ExpectationFailed,
|
39
39
|
422 => Excon::Errors::UnprocessableEntity,
|
40
|
-
500 => Excon::Errors::InternalServerError,
|
40
|
+
# 500 => Excon::Errors::InternalServerError,
|
41
41
|
501 => Excon::Errors::NotImplemented,
|
42
42
|
502 => Excon::Errors::BadGateway,
|
43
43
|
503 => Excon::Errors::ServiceUnavailable,
|
@@ -13,10 +13,8 @@ class Brightbox
|
|
13
13
|
# @return [String,NilClass] the most suitable test image's identifier or nil
|
14
14
|
def self.image_id
|
15
15
|
return @image_id unless @image_id.nil?
|
16
|
-
|
17
|
-
@image_id =
|
18
|
-
rescue
|
19
|
-
@image_id = nil
|
16
|
+
images = Fog::Compute[:brightbox].list_images
|
17
|
+
@image_id = Fog::Brightbox::Compute::ImageSelector.new(images).official_minimal
|
20
18
|
end
|
21
19
|
|
22
20
|
# Prepare a test server, wait for it to be usable but raise if it fails
|
@@ -29,14 +27,6 @@ class Brightbox
|
|
29
27
|
end
|
30
28
|
server
|
31
29
|
end
|
32
|
-
|
33
|
-
private
|
34
|
-
|
35
|
-
def self.select_testing_image_from_api
|
36
|
-
images = Fog::Compute[:brightbox].list_images
|
37
|
-
raise "No available images!" if images.empty?
|
38
|
-
images.select { |img| img["official"] && img["virtual_size"] != 0 }.sort_by { |img| img["disk_size"] }.first || images.first
|
39
|
-
end
|
40
30
|
end
|
41
31
|
end
|
42
32
|
end
|
@@ -55,6 +55,10 @@ Shindo.tests("Fog::Compute[:brightbox] | server requests", ["brightbox"]) do
|
|
55
55
|
data_matches_schema(Brightbox::Compute::Formats::Full::SERVER, :allow_extra_keys => true) { result }
|
56
56
|
end
|
57
57
|
|
58
|
+
unless Fog.mocking?
|
59
|
+
Fog::Compute[:brightbox].servers.get(server_id).wait_for { ready? }
|
60
|
+
end
|
61
|
+
|
58
62
|
tests("#shutdown_server('#{server_id}')") do
|
59
63
|
pending if Fog.mocking?
|
60
64
|
result = Fog::Compute[:brightbox].shutdown_server(server_id)
|
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: 0.
|
4
|
+
version: 0.11.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: 2016-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-core
|
@@ -167,7 +167,6 @@ files:
|
|
167
167
|
- README.md
|
168
168
|
- Rakefile
|
169
169
|
- fog-brightbox.gemspec
|
170
|
-
- gemfiles/Gemfile.1.8.7
|
171
170
|
- gemfiles/Gemfile.1.9.3
|
172
171
|
- lib/fog/brightbox.rb
|
173
172
|
- lib/fog/brightbox/compute.rb
|
@@ -461,7 +460,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
461
460
|
version: '0'
|
462
461
|
requirements: []
|
463
462
|
rubyforge_project:
|
464
|
-
rubygems_version: 2.4.
|
463
|
+
rubygems_version: 2.4.8
|
465
464
|
signing_key:
|
466
465
|
specification_version: 4
|
467
466
|
summary: This library can be used as a module for `fog` or as standalone provider
|
@@ -504,4 +503,3 @@ test_files:
|
|
504
503
|
- spec/spec_helper.rb
|
505
504
|
- spec/stock_storage_responses.rb
|
506
505
|
- spec/supports_resource_locking.rb
|
507
|
-
has_rdoc:
|