kitchen-openstack 3.6.2 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 519dd327c12593636d65d7327c453d1c01701bbe2640ae036ea4c33af17d2547
|
4
|
+
data.tar.gz: 4f5dff6b7474abcfa11fd11c8f74d1009bdde368571c2c78993439b46b161f75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d462a3e8ef1c383c316662f4ec6172a8c414ac21ef92a1065f0861ef58be8a6a4c98f067e58367e580c7040914fb63d8040ed880f7df860d6b5e8ca4eeaa1bfe
|
7
|
+
data.tar.gz: 2cd36d17f97ec4b1294a1bab3b008ab477d233787743917a92264cc23cfc731961bd4dd3b345a1d709e8f69f8a302d69afa94db21fb8c50fb25dcef7d7307b21
|
data/README.md
CHANGED
@@ -11,6 +11,10 @@ This driver uses the [fog gem][fog_web] to provision and destroy nova instances.
|
|
11
11
|
|
12
12
|
Shamelessly copied from [Fletcher Nichol](https://github.com/fnichol)'s awesome work on an [EC2 driver](https://github.com/test-kitchen/kitchen-ec2), and [Adam Leff](https://github.com/adamleff)'s amazing work on an [VRO driver](https://github.com/chef-partners/kitchen-vro).
|
13
13
|
|
14
|
+
## Status
|
15
|
+
|
16
|
+
This software project is no longer under active development as it has no active maintainers. The software may continue to work for some or all use cases, but issues filed in GitHub will most likely not be triaged. If a new maintainer is interested in working on this project please come chat with us in #test-kitchen on Chef Community Slack.
|
17
|
+
|
14
18
|
## Requirements
|
15
19
|
|
16
20
|
There are **no** external system requirements for this driver. However you will need access to an OpenStack cloud.
|
data/kitchen-openstack.gemspec
CHANGED
@@ -13,16 +13,14 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.description = "A Test Kitchen OpenStack Nova driver"
|
14
14
|
spec.summary = spec.description
|
15
15
|
spec.homepage = "https://github.com/test-kitchen/kitchen-openstack"
|
16
|
-
spec.license = "Apache"
|
16
|
+
spec.license = "Apache-2.0"
|
17
17
|
|
18
18
|
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
19
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
20
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
19
|
spec.require_paths = ["lib"]
|
22
20
|
|
23
21
|
spec.required_ruby_version = ">= 2.0.0"
|
24
22
|
|
25
|
-
spec.add_dependency "test-kitchen", "
|
23
|
+
spec.add_dependency "test-kitchen", ">= 1.4.1", "< 3"
|
26
24
|
spec.add_dependency "fog-openstack", "~> 0.1"
|
27
25
|
spec.add_dependency "unf"
|
28
26
|
spec.add_dependency "ohai"
|
@@ -117,8 +117,7 @@ module Kitchen
|
|
117
117
|
pub_ip = pub[config[:public_ip_order].to_i] || nil
|
118
118
|
if pub_ip
|
119
119
|
info "Retrieve the ID of floating IP <#{pub_ip}>"
|
120
|
-
floating_ip_id = network.list_floating_ips(floating_ip_address: pub_ip)
|
121
|
-
.body["floatingips"][0]["id"]
|
120
|
+
floating_ip_id = network.list_floating_ips(floating_ip_address: pub_ip).body["floatingips"][0]["id"]
|
122
121
|
network.delete_floating_ip(floating_ip_id)
|
123
122
|
info "OpenStack Floating IP <#{pub_ip}> released."
|
124
123
|
end
|
@@ -176,6 +175,7 @@ module Kitchen
|
|
176
175
|
def create_server
|
177
176
|
server_def = init_configuration
|
178
177
|
fail(ActionFailed, "Cannot specify both network_ref and network_id") if config[:network_id] && config[:network_ref] # rubocop:disable SignalException
|
178
|
+
|
179
179
|
if config[:network_id]
|
180
180
|
networks = [].concat([config[:network_id]])
|
181
181
|
server_def[:nics] = networks.flatten.map do |net_id|
|
@@ -211,6 +211,7 @@ module Kitchen
|
|
211
211
|
def init_configuration
|
212
212
|
fail(ActionFailed, "Cannot specify both image_ref and image_id") if config[:image_id] && config[:image_ref] # rubocop:disable SignalException
|
213
213
|
fail(ActionFailed, "Cannot specify both flavor_ref and flavor_id") if config[:flavor_id] && config[:flavor_ref] # rubocop:disable SignalException
|
214
|
+
|
214
215
|
{
|
215
216
|
name: config[:server_name],
|
216
217
|
image_ref: config[:image_id] || find_image(config[:image_ref]).id,
|
@@ -233,6 +234,7 @@ module Kitchen
|
|
233
234
|
def find_image(image_ref)
|
234
235
|
image = find_matching(compute.images, image_ref)
|
235
236
|
fail(ActionFailed, "Image not found") unless image # rubocop:disable SignalException
|
237
|
+
|
236
238
|
debug "Selected image: #{image.id} #{image.name}"
|
237
239
|
image
|
238
240
|
end
|
@@ -240,6 +242,7 @@ module Kitchen
|
|
240
242
|
def find_flavor(flavor_ref)
|
241
243
|
flavor = find_matching(compute.flavors, flavor_ref)
|
242
244
|
fail(ActionFailed, "Flavor not found") unless flavor # rubocop:disable SignalException
|
245
|
+
|
243
246
|
debug "Selected flavor: #{flavor.id} #{flavor.name}"
|
244
247
|
flavor
|
245
248
|
end
|
@@ -247,6 +250,7 @@ module Kitchen
|
|
247
250
|
def find_network(network_ref)
|
248
251
|
net = find_matching(network.networks.all, network_ref)
|
249
252
|
fail(ActionFailed, "Network not found") unless net # rubocop:disable SignalException
|
253
|
+
|
250
254
|
debug "Selected net: #{net.id} #{net.name}"
|
251
255
|
net
|
252
256
|
end
|
@@ -298,8 +302,10 @@ module Kitchen
|
|
298
302
|
@@ip_pool_lock.synchronize do
|
299
303
|
info "Attaching floating IP from <#{pool}> pool"
|
300
304
|
if config[:allocate_floating_ip]
|
301
|
-
network_id = network
|
302
|
-
|
305
|
+
network_id = network
|
306
|
+
.list_networks(
|
307
|
+
name: pool
|
308
|
+
).body["networks"][0]["id"]
|
303
309
|
resp = network.create_floating_ip(network_id)
|
304
310
|
ip = resp.body["floatingip"]["floating_ip_address"]
|
305
311
|
info "Created floating IP <#{ip}> from <#{pool}> pool"
|
@@ -311,6 +317,7 @@ module Kitchen
|
|
311
317
|
if free_addrs.empty?
|
312
318
|
fail ActionFailed, "No available IPs in pool <#{pool}>" # rubocop:disable SignalException
|
313
319
|
end
|
320
|
+
|
314
321
|
config[:floating_ip] = free_addrs[0]
|
315
322
|
end
|
316
323
|
attach_ip(server, config[:floating_ip])
|
@@ -353,8 +360,7 @@ module Kitchen
|
|
353
360
|
# should also work for private networks
|
354
361
|
if config[:openstack_network_name]
|
355
362
|
debug "Using configured net: #{config[:openstack_network_name]}"
|
356
|
-
return filter_ips(server.addresses[config[:openstack_network_name]])
|
357
|
-
.first["addr"]
|
363
|
+
return filter_ips(server.addresses[config[:openstack_network_name]]).first["addr"]
|
358
364
|
end
|
359
365
|
|
360
366
|
pub, priv = get_public_private_ips(server)
|
@@ -48,10 +48,13 @@ module Kitchen
|
|
48
48
|
opt[key] = bdm[key]
|
49
49
|
end
|
50
50
|
@logger.info "Creating Volume..."
|
51
|
-
resp = volume(os)
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
resp = volume(os)
|
52
|
+
.create_volume(
|
53
|
+
"#{config[:server_name]}-volume",
|
54
|
+
"#{config[:server_name]} volume",
|
55
|
+
bdm[:volume_size],
|
56
|
+
opt
|
57
|
+
)
|
55
58
|
vol_id = resp[:body]["volume"]["id"]
|
56
59
|
|
57
60
|
# Get Volume Model to make waiting for ready easy
|
@@ -67,6 +70,7 @@ module Kitchen
|
|
67
70
|
vol_model.wait_for(creation_timeout) do
|
68
71
|
sleep(1)
|
69
72
|
raise("Failed to make volume") if status.casecmp("error".downcase) == 0
|
73
|
+
|
70
74
|
ready?
|
71
75
|
end
|
72
76
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-openstack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Hartman
|
@@ -9,28 +9,28 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-08-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-kitchen
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "~>"
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: '1.4'
|
21
18
|
- - ">="
|
22
19
|
- !ruby/object:Gem::Version
|
23
20
|
version: 1.4.1
|
21
|
+
- - "<"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '3'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
|
-
- - "~>"
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
version: '1.4'
|
31
28
|
- - ">="
|
32
29
|
- !ruby/object:Gem::Version
|
33
30
|
version: 1.4.1
|
31
|
+
- - "<"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3'
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: fog-openstack
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
@@ -238,7 +238,7 @@ files:
|
|
238
238
|
- spec/spec_helper.rb
|
239
239
|
homepage: https://github.com/test-kitchen/kitchen-openstack
|
240
240
|
licenses:
|
241
|
-
- Apache
|
241
|
+
- Apache-2.0
|
242
242
|
metadata: {}
|
243
243
|
post_install_message:
|
244
244
|
rdoc_options: []
|
@@ -256,11 +256,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
256
256
|
version: '0'
|
257
257
|
requirements: []
|
258
258
|
rubyforge_project:
|
259
|
-
rubygems_version: 2.
|
259
|
+
rubygems_version: 2.7.6
|
260
260
|
signing_key:
|
261
261
|
specification_version: 4
|
262
262
|
summary: A Test Kitchen OpenStack Nova driver
|
263
|
-
test_files:
|
264
|
-
- spec/kitchen/driver/openstack/volume_spec.rb
|
265
|
-
- spec/kitchen/driver/openstack_spec.rb
|
266
|
-
- spec/spec_helper.rb
|
263
|
+
test_files: []
|