kitchen-openstack 3.0.0 → 3.1.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 +15 -1
- data/README.md +12 -0
- data/kitchen-openstack.gemspec +1 -0
- data/lib/kitchen/driver/openstack.rb +13 -3
- data/lib/kitchen/driver/openstack_version.rb +1 -1
- data/spec/kitchen/driver/openstack_spec.rb +62 -3
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b45b8838c9ce9a545a07a8901639a6eb32ddd42
|
4
|
+
data.tar.gz: 7f1064f7e1b13a831174e2b04c8545f4f22eb4ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4668a5ee747b461c5cf2402f136e82fec77b76e7a43836bd8987c0f3b1054caaaf2e860dd4c3c4776f17e85677220a56a9194d3387b800e6a0e866dd71cfea7a
|
7
|
+
data.tar.gz: d680ce65e0b59b420afa1375c8c290d50d6141dfdea5bfee781de7e4cd9c89cf4d8adfbd6a18471cf58f7ce4dda32e641258594a3839e821af6fc140e945bc8a
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,25 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [v3.
|
3
|
+
## [v3.1.0](https://github.com/test-kitchen/kitchen-openstack/tree/v3.1.0)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/test-kitchen/kitchen-openstack/compare/v3.0.0...v3.1.0)
|
6
|
+
|
7
|
+
**Closed issues:**
|
8
|
+
|
9
|
+
- `use\_ipv6` setting not respected when using `openstack\_network\_name` [\#141](https://github.com/test-kitchen/kitchen-openstack/issues/141)
|
4
10
|
|
11
|
+
**Merged pull requests:**
|
12
|
+
|
13
|
+
- Add config drive [\#144](https://github.com/test-kitchen/kitchen-openstack/pull/144) ([bradkwadsworth](https://github.com/bradkwadsworth))
|
14
|
+
- Update to check IP version when using `openstack\_network\_name`. [\#142](https://github.com/test-kitchen/kitchen-openstack/pull/142) ([nmische](https://github.com/nmische))
|
15
|
+
- minor grammar tweak to sleep message [\#140](https://github.com/test-kitchen/kitchen-openstack/pull/140) ([dpetzel](https://github.com/dpetzel))
|
16
|
+
|
17
|
+
## [v3.0.0](https://github.com/test-kitchen/kitchen-openstack/tree/v3.0.0) (2016-02-24)
|
5
18
|
[Full Changelog](https://github.com/test-kitchen/kitchen-openstack/compare/v3.0.0.pre.1...v3.0.0)
|
6
19
|
|
7
20
|
**Merged pull requests:**
|
8
21
|
|
22
|
+
- 3.0.0 prep work [\#139](https://github.com/test-kitchen/kitchen-openstack/pull/139) ([jjasghar](https://github.com/jjasghar))
|
9
23
|
- 3.0.0 Release of kitchen-openstack [\#136](https://github.com/test-kitchen/kitchen-openstack/pull/136) ([jjasghar](https://github.com/jjasghar))
|
10
24
|
|
11
25
|
## [v3.0.0.pre.1](https://github.com/test-kitchen/kitchen-openstack/tree/v3.0.0.pre.1) (2016-02-12)
|
data/README.md
CHANGED
@@ -197,6 +197,14 @@ for example:
|
|
197
197
|
echo "do whatever you want to pre-configure your machine"
|
198
198
|
```
|
199
199
|
|
200
|
+
### config\_drive
|
201
|
+
|
202
|
+
If your vms require config drive.
|
203
|
+
|
204
|
+
```
|
205
|
+
config_drive: true
|
206
|
+
```
|
207
|
+
|
200
208
|
### network\_ref
|
201
209
|
|
202
210
|
**Deprecated** A list of network names or ids to create instances with.
|
@@ -306,6 +314,10 @@ to use second `10.0.1.1` IP address you need to specify
|
|
306
314
|
```
|
307
315
|
assuming that test network is configured as private.
|
308
316
|
|
317
|
+
### use_ipv6
|
318
|
+
|
319
|
+
If true use IPv6 addresses to for SSH connections. If false, the default, use
|
320
|
+
IPv4 addresses for SSH connections.
|
309
321
|
|
310
322
|
### network\_ref
|
311
323
|
|
data/kitchen-openstack.gemspec
CHANGED
@@ -179,7 +179,8 @@ module Kitchen
|
|
179
179
|
:security_groups,
|
180
180
|
:public_key_path,
|
181
181
|
:key_name,
|
182
|
-
:user_data
|
182
|
+
:user_data,
|
183
|
+
:config_drive
|
183
184
|
].each do |c|
|
184
185
|
server_def[c] = optional_config(c) if config[c]
|
185
186
|
end
|
@@ -324,7 +325,8 @@ module Kitchen
|
|
324
325
|
# should also work for private networks
|
325
326
|
if config[:openstack_network_name]
|
326
327
|
debug "Using configured net: #{config[:openstack_network_name]}"
|
327
|
-
return server.addresses[config[:openstack_network_name]]
|
328
|
+
return filter_ips(server.addresses[config[:openstack_network_name]])
|
329
|
+
.first['addr']
|
328
330
|
end
|
329
331
|
|
330
332
|
pub, priv = get_public_private_ips(server)
|
@@ -335,6 +337,14 @@ module Kitchen
|
|
335
337
|
fail(ActionFailed, 'Could not find an IP') # rubocop:disable Metrics/LineLength, SignalException
|
336
338
|
end
|
337
339
|
|
340
|
+
def filter_ips(addresses)
|
341
|
+
if config[:use_ipv6]
|
342
|
+
return addresses.select { |i| IPAddr.new(i['addr']).ipv6? }
|
343
|
+
else
|
344
|
+
return addresses.select { |i| IPAddr.new(i['addr']).ipv4? }
|
345
|
+
end
|
346
|
+
end
|
347
|
+
|
338
348
|
def parse_ips(pub, priv)
|
339
349
|
pub = Array(pub)
|
340
350
|
priv = Array(priv)
|
@@ -375,7 +385,7 @@ module Kitchen
|
|
375
385
|
|
376
386
|
def wait_for_server(state)
|
377
387
|
if config[:server_wait]
|
378
|
-
info "Sleeping for #{config[:server_wait]} seconds to let your server
|
388
|
+
info "Sleeping for #{config[:server_wait]} seconds to let your server start up..." # rubocop:disable Metrics/LineLength
|
379
389
|
countdown(config[:server_wait])
|
380
390
|
end
|
381
391
|
info 'Waiting for server to be ready...'
|
@@ -713,7 +713,32 @@ describe Kitchen::Driver::Openstack do
|
|
713
713
|
flavor_ref: '1',
|
714
714
|
availability_zone: nil,
|
715
715
|
public_key_path: 'tarpals',
|
716
|
-
user_data: data
|
716
|
+
user_data: data
|
717
|
+
)
|
718
|
+
driver.send(:create_server)
|
719
|
+
end
|
720
|
+
end
|
721
|
+
|
722
|
+
context 'config drive enabled' do
|
723
|
+
let(:config) do
|
724
|
+
{
|
725
|
+
server_name: 'hello',
|
726
|
+
image_ref: '111',
|
727
|
+
flavor_ref: '1',
|
728
|
+
public_key_path: 'tarpals',
|
729
|
+
config_drive: true
|
730
|
+
}
|
731
|
+
end
|
732
|
+
|
733
|
+
it 'enables config drive' do
|
734
|
+
expect(servers).to receive(:create).with(
|
735
|
+
name: 'hello',
|
736
|
+
image_ref: '111',
|
737
|
+
flavor_ref: '1',
|
738
|
+
availability_zone: nil,
|
739
|
+
public_key_path: 'tarpals',
|
740
|
+
config_drive: true
|
741
|
+
)
|
717
742
|
driver.send(:create_server)
|
718
743
|
end
|
719
744
|
end
|
@@ -952,9 +977,11 @@ describe Kitchen::Driver::Openstack do
|
|
952
977
|
context 'an OpenStack deployment without the floating IP extension' do
|
953
978
|
before do
|
954
979
|
allow(server).to receive(:public_ip_addresses).and_raise(
|
955
|
-
Fog::Compute::OpenStack::NotFound
|
980
|
+
Fog::Compute::OpenStack::NotFound
|
981
|
+
)
|
956
982
|
allow(server).to receive(:private_ip_addresses).and_raise(
|
957
|
-
Fog::Compute::OpenStack::NotFound
|
983
|
+
Fog::Compute::OpenStack::NotFound
|
984
|
+
)
|
958
985
|
end
|
959
986
|
|
960
987
|
context 'both public and private IPs in the addresses hash' do
|
@@ -987,6 +1014,38 @@ describe Kitchen::Driver::Openstack do
|
|
987
1014
|
end
|
988
1015
|
end
|
989
1016
|
|
1017
|
+
context 'when openstack_network_name is provided and use_ipv6 is false' do
|
1018
|
+
let(:addresses) do
|
1019
|
+
{
|
1020
|
+
'public' => [{ 'addr' => '4::1' }, { 'addr' => '7.7.7.7' }],
|
1021
|
+
'private' => [{ 'addr' => '5::1' }, { 'addr' => '9.9.9.9' }]
|
1022
|
+
}
|
1023
|
+
end
|
1024
|
+
let(:config) { { openstack_network_name: 'public' } }
|
1025
|
+
|
1026
|
+
it 'should respond with the first IPv4 address from the addresses' do
|
1027
|
+
allow(driver).to receive(:config).and_return(config)
|
1028
|
+
|
1029
|
+
expect(driver.send(:get_ip, server)).to eq('7.7.7.7')
|
1030
|
+
end
|
1031
|
+
end
|
1032
|
+
|
1033
|
+
context 'when openstack_network_name is provided and use_ipv6 is true' do
|
1034
|
+
let(:addresses) do
|
1035
|
+
{
|
1036
|
+
'public' => [{ 'addr' => '4::1' }, { 'addr' => '7.7.7.7' }],
|
1037
|
+
'private' => [{ 'addr' => '5::1' }, { 'addr' => '9.9.9.9' }]
|
1038
|
+
}
|
1039
|
+
end
|
1040
|
+
let(:config) { { openstack_network_name: 'public', use_ipv6: true } }
|
1041
|
+
|
1042
|
+
it 'should respond with the first IPv6 address from the addresses' do
|
1043
|
+
allow(driver).to receive(:config).and_return(config)
|
1044
|
+
|
1045
|
+
expect(driver.send(:get_ip, server)).to eq('4::1')
|
1046
|
+
end
|
1047
|
+
end
|
1048
|
+
|
990
1049
|
context 'only public IPs in the address hash' do
|
991
1050
|
let(:addresses) do
|
992
1051
|
{ 'public' => [{ 'addr' => '6.6.6.6' }, { 'addr' => '7.7.7.7' }] }
|
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: 3.
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Hartman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-02
|
12
|
+
date: 2016-06-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-kitchen
|
@@ -199,6 +199,20 @@ dependencies:
|
|
199
199
|
- - ">="
|
200
200
|
- !ruby/object:Gem::Version
|
201
201
|
version: '0'
|
202
|
+
- !ruby/object:Gem::Dependency
|
203
|
+
name: github_changelog_generator
|
204
|
+
requirement: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
type: :development
|
210
|
+
prerelease: false
|
211
|
+
version_requirements: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
202
216
|
description: A Test Kitchen OpenStack Nova driver
|
203
217
|
email:
|
204
218
|
- j@p4nt5.com
|
@@ -242,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
242
256
|
version: '0'
|
243
257
|
requirements: []
|
244
258
|
rubyforge_project:
|
245
|
-
rubygems_version: 2.
|
259
|
+
rubygems_version: 2.5.1
|
246
260
|
signing_key:
|
247
261
|
specification_version: 4
|
248
262
|
summary: A Test Kitchen OpenStack Nova driver
|