kitchen-digitalocean 0.10.5 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/kitchen/driver/digitalocean.rb +32 -38
- data/lib/kitchen/driver/digitalocean_version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9385e2dcac33c049d24246b388455a57505ec0012e2e2f0498546f2d3df5f2f2
|
|
4
|
+
data.tar.gz: 49cfa38d38d2b0947f2ac3f4e416486abf01e2b048f12114f6abf7708c83c14d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9a111b6c63dee8ad2aeff8e2d45a063759813913ef87e5b038ce07ed3535df32597f40d2386e3a47ca014ada395d61d0621faef7b4d4cc1a706e9e9e70916389
|
|
7
|
+
data.tar.gz: 5370fd93696fa9f37b7ecd5ab935a82265306453555d46e185b581ee623330f4d46d0bca5fbe51af11be64863227dcc50224764c9423425ade2601fe5c0aeda0
|
|
@@ -17,12 +17,13 @@
|
|
|
17
17
|
# See the License for the specific language governing permissions and
|
|
18
18
|
# limitations under the License.
|
|
19
19
|
|
|
20
|
-
require 'benchmark'
|
|
21
|
-
require 'droplet_kit'
|
|
20
|
+
require 'benchmark' unless defined?(Benchmark)
|
|
21
|
+
require 'droplet_kit' unless defined?(DropletKit)
|
|
22
22
|
require 'kitchen'
|
|
23
|
-
require 'etc'
|
|
24
|
-
require 'socket'
|
|
25
|
-
require 'json'
|
|
23
|
+
require 'etc' unless defined?(Etc)
|
|
24
|
+
require 'socket' unless defined?(Socket)
|
|
25
|
+
require 'json' unless defined?(JSON)
|
|
26
|
+
autoload :YAML, 'yaml'
|
|
26
27
|
|
|
27
28
|
module Kitchen
|
|
28
29
|
module Driver
|
|
@@ -32,7 +33,7 @@ module Kitchen
|
|
|
32
33
|
class Digitalocean < Kitchen::Driver::SSHBase
|
|
33
34
|
default_config :username, 'root'
|
|
34
35
|
default_config :port, '22'
|
|
35
|
-
default_config :size, '
|
|
36
|
+
default_config :size, '1gb'
|
|
36
37
|
default_config :monitoring, false
|
|
37
38
|
default_config(:image, &:default_image)
|
|
38
39
|
default_config(:server_name, &:default_name)
|
|
@@ -41,6 +42,7 @@ module Kitchen
|
|
|
41
42
|
default_config :user_data, nil
|
|
42
43
|
default_config :tags, nil
|
|
43
44
|
default_config :firewalls, nil
|
|
45
|
+
default_config :vpcs, nil
|
|
44
46
|
|
|
45
47
|
default_config :region do
|
|
46
48
|
ENV['DIGITALOCEAN_REGION'] || 'nyc1'
|
|
@@ -57,6 +59,26 @@ module Kitchen
|
|
|
57
59
|
required_config :digitalocean_access_token
|
|
58
60
|
required_config :ssh_key_ids
|
|
59
61
|
|
|
62
|
+
PLATFORM_SLUG_MAP = {
|
|
63
|
+
'centos-6' => 'centos-6-x64',
|
|
64
|
+
'centos-7' => 'centos-7-x64',
|
|
65
|
+
'centos-8' => 'centos-8-x64',
|
|
66
|
+
'coreos-stable' => 'coreos-stable',
|
|
67
|
+
'coreos-beta' => 'coreos-beta',
|
|
68
|
+
'coreos-alpha' => 'coreos-alpha',
|
|
69
|
+
'debian-9' => 'debian-9-x64',
|
|
70
|
+
'debian-10' => 'debian-10-x64',
|
|
71
|
+
'fedora-30' => 'fedora-30-x64',
|
|
72
|
+
'fedora-31' => 'fedora-31-x64',
|
|
73
|
+
'fedora-32' => 'fedora-32-x64',
|
|
74
|
+
'freebsd-11' => 'freebsd-11-x64-zfs',
|
|
75
|
+
'freebsd-12' => 'freebsd-12-x64-zfs',
|
|
76
|
+
'ubuntu-16' => 'ubuntu-16-04-x64',
|
|
77
|
+
'ubuntu-18' => 'ubuntu-18-04-x64',
|
|
78
|
+
'ubuntu-19' => 'ubuntu-19-10-x64',
|
|
79
|
+
'ubuntu-20' => 'ubuntu-20-04-x64'
|
|
80
|
+
}.freeze
|
|
81
|
+
|
|
60
82
|
def create(state)
|
|
61
83
|
server = create_server
|
|
62
84
|
|
|
@@ -86,7 +108,7 @@ module Kitchen
|
|
|
86
108
|
warn('firewalls attribute is not string/array, ignoring')
|
|
87
109
|
[]
|
|
88
110
|
end
|
|
89
|
-
debug("firewall : #{fw_ids.inspect
|
|
111
|
+
debug("firewall : #{YAML.dump(fw_ids.inspect)}")
|
|
90
112
|
fw_ids.each do |fw_id|
|
|
91
113
|
firewall = client.firewalls.find(id: fw_id)
|
|
92
114
|
if firewall
|
|
@@ -132,8 +154,8 @@ module Kitchen
|
|
|
132
154
|
# platform => slug mappings, and falls back to using just the platform as
|
|
133
155
|
# provided if it can't find a mapping.
|
|
134
156
|
def default_image
|
|
135
|
-
|
|
136
|
-
|
|
157
|
+
PLATFORM_SLUG_MAP.fetch(instance.platform.name,
|
|
158
|
+
instance.platform.name)
|
|
137
159
|
end
|
|
138
160
|
|
|
139
161
|
# Generate what should be a unique server name up to 63 total chars
|
|
@@ -174,6 +196,7 @@ module Kitchen
|
|
|
174
196
|
private_networking: config[:private_networking],
|
|
175
197
|
ipv6: config[:ipv6],
|
|
176
198
|
user_data: config[:user_data],
|
|
199
|
+
vpc_uuid: config[:vpcs],
|
|
177
200
|
tags: if config[:tags].is_a?(String)
|
|
178
201
|
config[:tags].split(/\s+|,\s+|,+/)
|
|
179
202
|
else
|
|
@@ -209,35 +232,6 @@ module Kitchen
|
|
|
209
232
|
def debug_client_config
|
|
210
233
|
debug("digitalocean_api_key #{config[:digitalocean_access_token]}")
|
|
211
234
|
end
|
|
212
|
-
|
|
213
|
-
def platform_to_slug_mapping
|
|
214
|
-
{
|
|
215
|
-
'centos-6' => 'centos-6-x64',
|
|
216
|
-
'centos-7' => 'centos-7-x64',
|
|
217
|
-
'coreos-stable' => 'coreos-stable-x64',
|
|
218
|
-
'coreos-beta' => 'coreos-beta-x64',
|
|
219
|
-
'coreos-alpha' => 'coreos-alpha-x64',
|
|
220
|
-
'debian-7' => 'debian-7-x64',
|
|
221
|
-
'debian-8' => 'debian-8-x64',
|
|
222
|
-
'debian-9' => 'debian-9-x64',
|
|
223
|
-
'debian-10' => 'debian-10-x64',
|
|
224
|
-
'fedora-27' => 'fedora-27-x64',
|
|
225
|
-
'fedora-28' => 'fedora-28-x64',
|
|
226
|
-
'fedora-29' => 'fedora-29-x64',
|
|
227
|
-
'fedora-30' => 'fedora-30-x64',
|
|
228
|
-
'freebsd-12' => 'freebsd-12-x64-zfs',
|
|
229
|
-
'freebsd-11.2' => 'freebsd-11-2-x64-zfs',
|
|
230
|
-
'freebsd-11.1' => 'freebsd-11-1-x64-zfs',
|
|
231
|
-
'freebsd-11.0' => 'freebsd-11-0-x64-zfs',
|
|
232
|
-
'freebsd-10.3' => 'freebsd-10-3-x64-zfs',
|
|
233
|
-
'freebsd-10.4' => 'freebsd-10-4-x64-zfs',
|
|
234
|
-
'ubuntu-14' => 'ubuntu-14-04-x64',
|
|
235
|
-
'ubuntu-16' => 'ubuntu-16-04-x64',
|
|
236
|
-
'ubuntu-17' => 'ubuntu-17-10-x64',
|
|
237
|
-
'ubuntu-18' => 'ubuntu-18-04-x64',
|
|
238
|
-
'ubuntu-19' => 'ubuntu-19-04-x64'
|
|
239
|
-
}
|
|
240
|
-
end
|
|
241
235
|
end
|
|
242
236
|
end
|
|
243
237
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kitchen-digitalocean
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.11.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Greg Fitzgerald
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-09-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: droplet_kit
|
|
@@ -16,7 +16,7 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
19
|
+
version: '3.7'
|
|
20
20
|
- - "<"
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
22
|
version: '4.0'
|
|
@@ -26,7 +26,7 @@ dependencies:
|
|
|
26
26
|
requirements:
|
|
27
27
|
- - ">="
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: '
|
|
29
|
+
version: '3.7'
|
|
30
30
|
- - "<"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
32
|
version: '4.0'
|
|
@@ -140,14 +140,14 @@ dependencies:
|
|
|
140
140
|
requirements:
|
|
141
141
|
- - "~>"
|
|
142
142
|
- !ruby/object:Gem::Version
|
|
143
|
-
version: '0.
|
|
143
|
+
version: '0.92'
|
|
144
144
|
type: :development
|
|
145
145
|
prerelease: false
|
|
146
146
|
version_requirements: !ruby/object:Gem::Requirement
|
|
147
147
|
requirements:
|
|
148
148
|
- - "~>"
|
|
149
149
|
- !ruby/object:Gem::Version
|
|
150
|
-
version: '0.
|
|
150
|
+
version: '0.92'
|
|
151
151
|
- !ruby/object:Gem::Dependency
|
|
152
152
|
name: simplecov
|
|
153
153
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -204,7 +204,7 @@ homepage: https://github.com/test-kitchen/kitchen-digitalocean
|
|
|
204
204
|
licenses:
|
|
205
205
|
- Apache-2.0
|
|
206
206
|
metadata: {}
|
|
207
|
-
post_install_message:
|
|
207
|
+
post_install_message:
|
|
208
208
|
rdoc_options: []
|
|
209
209
|
require_paths:
|
|
210
210
|
- lib
|
|
@@ -220,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
220
220
|
version: '0'
|
|
221
221
|
requirements: []
|
|
222
222
|
rubygems_version: 3.0.6
|
|
223
|
-
signing_key:
|
|
223
|
+
signing_key:
|
|
224
224
|
specification_version: 4
|
|
225
225
|
summary: A Test Kitchen Driver for Digital Ocean
|
|
226
226
|
test_files: []
|