kitchen-rackspace 0.18.0 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -3
- data/.travis.yml +5 -1
- data/CHANGELOG.md +8 -0
- data/README.md +2 -0
- data/Rakefile +1 -7
- data/data/images.json +48 -48
- data/kitchen-rackspace.gemspec +0 -1
- data/lib/kitchen/driver/rackspace.rb +14 -4
- data/lib/kitchen/driver/rackspace_version.rb +1 -1
- data/spec/kitchen/driver/rackspace_spec.rb +74 -3
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dacbb23877f1f67c30152a721c63f8521854efe
|
4
|
+
data.tar.gz: ab8811181a0d17553edb3237bd0f4fe3706043f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d822a5e5f0d4c2da1b6c2dab7c0e9f09879cbe09c0737791cef8132367d2d636c785b8fa6a141befa9465eb481c51a3d28bd1fbc0c79219e908c960b0ea4ce1
|
7
|
+
data.tar.gz: 25aeb6db235c06d7dbe92ab1e3669034c8efff3389eaebee15d60093130278ca65036485e2b8e7d2a2eb716b45dd4a13c49b1e59cb1fda9d2100fd2a8e488128
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# 0.19.0 / 2015-10-06
|
2
|
+
|
3
|
+
* PR [#60][] - Update to latest image IDs
|
4
|
+
* PR [#57][] - Add `servicelevel_wait` option; via [@martinb3][]
|
5
|
+
* PR [#56][] - Add `no_passwd_lock` option; via [@martinb3][]
|
6
|
+
|
1
7
|
# 0.18.0 / 2015-08-28
|
2
8
|
|
3
9
|
* PR [#53][] - Update image IDs, update Arch to 2015.7, drop Fedora 20, add
|
@@ -144,6 +150,8 @@ boot times, via [@coderanger][]
|
|
144
150
|
|
145
151
|
* Initial release! Woo!
|
146
152
|
|
153
|
+
[#57]: https://github.com/test-kitchen/kitchen-rackspace/pull/57
|
154
|
+
[#56]: https://github.com/test-kitchen/kitchen-rackspace/pull/56
|
147
155
|
[#53]: https://github.com/test-kitchen/kitchen-rackspace/pull/53
|
148
156
|
[#51]: https://github.com/test-kitchen/kitchen-rackspace/pull/51
|
149
157
|
[#50]: https://github.com/test-kitchen/kitchen-rackspace/pull/50
|
data/README.md
CHANGED
@@ -59,6 +59,8 @@ for your specified platform. Additional, optional overrides can be provided:
|
|
59
59
|
no_ssh_tcp_check_sleep: [NUM OF SECONDS TO SLEEP IF no_ssh_tcp_check IS SET]
|
60
60
|
networks: [LIST OF RACKSPACE NETWORK UUIDS, DEFAULT PUBLICNET AND SERVICE NET]
|
61
61
|
rackconnect_wait: ['true' IF USING RACKCONNECT TO WAIT FOR IT TO COMPLETE]
|
62
|
+
servicelevel_wait: ['true' IF USING MANAGED SERVICE LEVEL AUTOMATION TO WAIT FOR IT TO COMPLETE]
|
63
|
+
no_passwd_lock: ['true' IF FOG LIBRARY SHOULD NOT LOCK ROOT ACCOUNT]
|
62
64
|
servicenet: ['true' IF USING THE SERVICENET IP ADDRESS TO CONNECT]
|
63
65
|
|
64
66
|
You also have the option of providing some configs via environment variables:
|
data/Rakefile
CHANGED
@@ -9,12 +9,6 @@ Cane::RakeTask.new
|
|
9
9
|
|
10
10
|
RuboCop::RakeTask.new
|
11
11
|
|
12
|
-
desc 'Display LOC stats'
|
13
|
-
task :loc do
|
14
|
-
puts "\n## LOC Stats"
|
15
|
-
sh 'countloc -r lib/kitchen'
|
16
|
-
end
|
17
|
-
|
18
12
|
RSpec::Core::RakeTask.new(:spec)
|
19
13
|
|
20
|
-
task default: [:cane, :rubocop, :
|
14
|
+
task default: [:cane, :rubocop, :spec]
|
data/data/images.json
CHANGED
@@ -2,68 +2,68 @@
|
|
2
2
|
"arch": "ade87903-9d82-4584-9cc1-204870011de0",
|
3
3
|
"arch-2015": "ade87903-9d82-4584-9cc1-204870011de0",
|
4
4
|
"arch-2015.7": "ade87903-9d82-4584-9cc1-204870011de0",
|
5
|
-
"centos": "
|
6
|
-
"centos-5": "
|
7
|
-
"centos-5.11": "
|
8
|
-
"centos-6": "
|
9
|
-
"centos-6.
|
10
|
-
"centos-7": "
|
11
|
-
"centos-7.0": "
|
12
|
-
"coreos": "
|
13
|
-
"coreos-0": "
|
14
|
-
"coreos-alpha": "
|
15
|
-
"coreos-beta": "
|
16
|
-
"coreos-stable": "
|
17
|
-
"debian": "
|
18
|
-
"debian-7": "
|
19
|
-
"debian-7.0": "
|
20
|
-
"debian-8": "
|
21
|
-
"debian-8.0": "
|
22
|
-
"debian-testing": "
|
5
|
+
"centos": "6595f1b7-e825-4bd2-addc-c7b1c803a37f",
|
6
|
+
"centos-5": "fdaf64c7-d9f3-446c-bd7c-70349305ae91",
|
7
|
+
"centos-5.11": "fdaf64c7-d9f3-446c-bd7c-70349305ae91",
|
8
|
+
"centos-6": "fabe045f-43f8-4991-9e6c-5cabd617538c",
|
9
|
+
"centos-6.7": "fabe045f-43f8-4991-9e6c-5cabd617538c",
|
10
|
+
"centos-7": "6595f1b7-e825-4bd2-addc-c7b1c803a37f",
|
11
|
+
"centos-7.0": "6595f1b7-e825-4bd2-addc-c7b1c803a37f",
|
12
|
+
"coreos": "415ca2e6-df92-44e6-ba95-8ee36b436b24",
|
13
|
+
"coreos-0": "415ca2e6-df92-44e6-ba95-8ee36b436b24",
|
14
|
+
"coreos-alpha": "2c12f6da-8540-40bc-b974-9a72040173e0",
|
15
|
+
"coreos-beta": "8dc7d5d8-4ad4-41b6-acf1-958dfeadcb17",
|
16
|
+
"coreos-stable": "415ca2e6-df92-44e6-ba95-8ee36b436b24",
|
17
|
+
"debian": "c3aacaf9-8d1e-4d41-bb47-045fbc392a1c",
|
18
|
+
"debian-7": "eaaf94d8-55a6-4bfa-b0a8-473febb012dc",
|
19
|
+
"debian-7.0": "eaaf94d8-55a6-4bfa-b0a8-473febb012dc",
|
20
|
+
"debian-8": "c3aacaf9-8d1e-4d41-bb47-045fbc392a1c",
|
21
|
+
"debian-8.0": "c3aacaf9-8d1e-4d41-bb47-045fbc392a1c",
|
22
|
+
"debian-testing": "081a8b12-515c-41c9-8ce4-13139e1904f7",
|
23
23
|
"debian-unstable": "498c59a0-3c26-4357-92c0-dd938baca3db",
|
24
|
-
"fedora": "
|
25
|
-
"fedora-21": "
|
26
|
-
"fedora-21.0": "
|
27
|
-
"fedora-22": "
|
28
|
-
"fedora-22.0": "
|
24
|
+
"fedora": "0976b31e-f6d7-4d74-81e9-007fca25067e",
|
25
|
+
"fedora-21": "46975098-7799-4e72-8ae0-d6ef9d2d26a1",
|
26
|
+
"fedora-21.0": "46975098-7799-4e72-8ae0-d6ef9d2d26a1",
|
27
|
+
"fedora-22": "0976b31e-f6d7-4d74-81e9-007fca25067e",
|
28
|
+
"fedora-22.0": "0976b31e-f6d7-4d74-81e9-007fca25067e",
|
29
29
|
"freebsd": "7a1cf8de-7721-4d56-900b-1e65def2ada5",
|
30
30
|
"freebsd-10": "7a1cf8de-7721-4d56-900b-1e65def2ada5",
|
31
31
|
"freebsd-10.1": "7a1cf8de-7721-4d56-900b-1e65def2ada5",
|
32
|
-
"gentoo": "
|
33
|
-
"gentoo-15": "
|
34
|
-
"gentoo-15.3": "
|
35
|
-
"opensuse": "
|
36
|
-
"opensuse-13": "
|
37
|
-
"opensuse-13.2": "
|
38
|
-
"redhat": "
|
32
|
+
"gentoo": "7451d607-426d-416f-8d29-97e57f6f3ad5",
|
33
|
+
"gentoo-15": "7451d607-426d-416f-8d29-97e57f6f3ad5",
|
34
|
+
"gentoo-15.3": "7451d607-426d-416f-8d29-97e57f6f3ad5",
|
35
|
+
"opensuse": "79436148-753f-41b7-aee9-5acbde16582c",
|
36
|
+
"opensuse-13": "79436148-753f-41b7-aee9-5acbde16582c",
|
37
|
+
"opensuse-13.2": "79436148-753f-41b7-aee9-5acbde16582c",
|
38
|
+
"redhat": "92f8a8b8-6019-4c27-949b-cf9910b84ffb",
|
39
39
|
"redhat-5": "05dd965d-84ce-451b-9ca1-83a134e523c3",
|
40
40
|
"redhat-5.11": "05dd965d-84ce-451b-9ca1-83a134e523c3",
|
41
|
-
"redhat-6": "
|
42
|
-
"redhat-6.7": "
|
43
|
-
"redhat-7": "
|
44
|
-
"redhat-7.0": "
|
45
|
-
"scientific": "
|
41
|
+
"redhat-6": "5176fde9-e9d6-4611-9069-1eecd55df440",
|
42
|
+
"redhat-6.7": "5176fde9-e9d6-4611-9069-1eecd55df440",
|
43
|
+
"redhat-7": "92f8a8b8-6019-4c27-949b-cf9910b84ffb",
|
44
|
+
"redhat-7.0": "92f8a8b8-6019-4c27-949b-cf9910b84ffb",
|
45
|
+
"scientific": "6118e449-3149-475f-bcbb-99d204cedd56",
|
46
46
|
"scientific-6": "36076d08-3e8b-4436-9253-7a8868e4f4d7",
|
47
47
|
"scientific-6.6": "36076d08-3e8b-4436-9253-7a8868e4f4d7",
|
48
|
-
"scientific-7": "
|
49
|
-
"scientific-7.0": "
|
50
|
-
"ubuntu": "
|
48
|
+
"scientific-7": "6118e449-3149-475f-bcbb-99d204cedd56",
|
49
|
+
"scientific-7.0": "6118e449-3149-475f-bcbb-99d204cedd56",
|
50
|
+
"ubuntu": "658a7d3b-4c58-4e29-b339-2509cca0de10",
|
51
51
|
"ubuntu-12": "973775ab-0653-4ef8-a571-7a2777787735",
|
52
52
|
"ubuntu-12.04": "973775ab-0653-4ef8-a571-7a2777787735",
|
53
53
|
"ubuntu-14": "09de0a66-3156-48b4-90a5-1cf25a905207",
|
54
54
|
"ubuntu-14.04": "09de0a66-3156-48b4-90a5-1cf25a905207",
|
55
|
-
"ubuntu-15": "
|
56
|
-
"ubuntu-15.04": "
|
55
|
+
"ubuntu-15": "658a7d3b-4c58-4e29-b339-2509cca0de10",
|
56
|
+
"ubuntu-15.04": "658a7d3b-4c58-4e29-b339-2509cca0de10",
|
57
57
|
"vyatta": "faad95b7-396d-483e-b4ae-77afec7e7097",
|
58
58
|
"vyatta-6": "faad95b7-396d-483e-b4ae-77afec7e7097",
|
59
59
|
"vyatta-6.7": "faad95b7-396d-483e-b4ae-77afec7e7097",
|
60
60
|
"vyatta-6.7R9": "faad95b7-396d-483e-b4ae-77afec7e7097",
|
61
|
-
"windows": "
|
62
|
-
"windows-2008": "
|
63
|
-
"windows-2008.2": "
|
64
|
-
"windows-2008R2": "
|
65
|
-
"windows-2008R2SP1": "
|
66
|
-
"windows-2012": "
|
67
|
-
"windows-2012.2": "
|
68
|
-
"windows-2012R2": "
|
61
|
+
"windows": "444a8d19-c99e-424a-8ffc-0d3d75a2f166",
|
62
|
+
"windows-2008": "ee71e392-12b0-4050-b097-8f75b4071831",
|
63
|
+
"windows-2008.2": "ee71e392-12b0-4050-b097-8f75b4071831",
|
64
|
+
"windows-2008R2": "ee71e392-12b0-4050-b097-8f75b4071831",
|
65
|
+
"windows-2008R2SP1": "ee71e392-12b0-4050-b097-8f75b4071831",
|
66
|
+
"windows-2012": "444a8d19-c99e-424a-8ffc-0d3d75a2f166",
|
67
|
+
"windows-2012.2": "444a8d19-c99e-424a-8ffc-0d3d75a2f166",
|
68
|
+
"windows-2012R2": "444a8d19-c99e-424a-8ffc-0d3d75a2f166"
|
69
69
|
}
|
data/kitchen-rackspace.gemspec
CHANGED
@@ -28,7 +28,6 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_development_dependency 'rake', '~> 10.0'
|
29
29
|
spec.add_development_dependency 'rubocop', '~> 0.29'
|
30
30
|
spec.add_development_dependency 'cane', '~> 2.6'
|
31
|
-
spec.add_development_dependency 'countloc', '~> 0.4'
|
32
31
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
33
32
|
spec.add_development_dependency 'simplecov', '~> 0.9'
|
34
33
|
spec.add_development_dependency 'simplecov-console', '~> 0.2'
|
@@ -37,9 +37,11 @@ module Kitchen
|
|
37
37
|
default_config :no_ssh_tcp_check, false
|
38
38
|
default_config :no_ssh_tcp_check_sleep, 120
|
39
39
|
default_config :rackconnect_wait, false
|
40
|
+
default_config :servicelevel_wait, false
|
41
|
+
default_config :no_passwd_lock, false
|
40
42
|
default_config :servicenet, false
|
41
|
-
default_config(:image_id
|
42
|
-
default_config(:server_name
|
43
|
+
default_config(:image_id, &:default_image)
|
44
|
+
default_config(:server_name, &:default_name)
|
43
45
|
default_config :networks, nil
|
44
46
|
|
45
47
|
default_config :public_key_path do
|
@@ -76,6 +78,7 @@ module Kitchen
|
|
76
78
|
server.wait_for { ready? }
|
77
79
|
puts '(server ready)'
|
78
80
|
rackconnect_check(server) if config[:rackconnect_wait]
|
81
|
+
servicelevel_check(server) if config[:servicelevel_wait]
|
79
82
|
state[:hostname] = hostname(server)
|
80
83
|
tcp_check(state)
|
81
84
|
rescue Fog::Errors::Error, Excon::Errors::Error => ex
|
@@ -127,11 +130,12 @@ module Kitchen
|
|
127
130
|
|
128
131
|
def create_server
|
129
132
|
server_def = { name: config[:server_name], networks: networks }
|
130
|
-
[:image_id, :flavor_id, :public_key_path].each do |opt|
|
133
|
+
[:image_id, :flavor_id, :public_key_path, :no_passwd_lock].each do |opt|
|
131
134
|
server_def[opt] = config[opt]
|
132
135
|
end
|
133
136
|
# see @note on bootstrap def about rackconnect
|
134
|
-
|
137
|
+
no_passwd_lock = config[:rackconnect_wait] || config[:servicelevel_wait]
|
138
|
+
server_def[:no_passwd_lock] = no_passwd_lock if no_passwd_lock
|
135
139
|
compute.servers.bootstrap(server_def)
|
136
140
|
end
|
137
141
|
|
@@ -157,6 +161,12 @@ module Kitchen
|
|
157
161
|
server.update # refresh accessIPv4 with new IP
|
158
162
|
end
|
159
163
|
|
164
|
+
def servicelevel_check(server)
|
165
|
+
server.wait_for \
|
166
|
+
{ metadata.all['rax_service_level_automation'] == 'Complete' }
|
167
|
+
puts '(service level automation complete)'
|
168
|
+
end
|
169
|
+
|
160
170
|
def hostname(server)
|
161
171
|
if config[:servicenet] == false
|
162
172
|
server.public_ip_address
|
@@ -97,17 +97,25 @@ describe Kitchen::Driver::Rackspace do
|
|
97
97
|
expect(driver[:rackconnect_wait]).to eq(false)
|
98
98
|
end
|
99
99
|
|
100
|
+
it 'defaults to not waiting for managed service level' do
|
101
|
+
expect(driver[:servicelevel_wait]).to eq(false)
|
102
|
+
end
|
103
|
+
|
100
104
|
it 'defaults to the public ip address' do
|
101
105
|
expect(driver[:servicenet]).to eq(false)
|
102
106
|
end
|
107
|
+
|
108
|
+
it 'defaults to no_passwd_lock as false' do
|
109
|
+
expect(driver[:no_passwd_lock]).to eq(false)
|
110
|
+
end
|
103
111
|
end
|
104
112
|
|
105
113
|
platforms = {
|
106
114
|
'ubuntu-12.04' => '973775ab-0653-4ef8-a571-7a2777787735',
|
107
115
|
'ubuntu-12' => '973775ab-0653-4ef8-a571-7a2777787735',
|
108
|
-
'ubuntu' => '
|
109
|
-
'centos-5' => '
|
110
|
-
'centos' => '
|
116
|
+
'ubuntu' => '658a7d3b-4c58-4e29-b339-2509cca0de10',
|
117
|
+
'centos-5' => 'fdaf64c7-d9f3-446c-bd7c-70349305ae91',
|
118
|
+
'centos' => '6595f1b7-e825-4bd2-addc-c7b1c803a37f'
|
111
119
|
}
|
112
120
|
platforms.each do |platform, id|
|
113
121
|
context "name is #{platform}" do
|
@@ -130,6 +138,7 @@ describe Kitchen::Driver::Rackspace do
|
|
130
138
|
rackspace_region: 'ord',
|
131
139
|
wait_for: 1200,
|
132
140
|
rackconnect_wait: true,
|
141
|
+
servicelevel_wait: true,
|
133
142
|
use_private_ip_address: true
|
134
143
|
}
|
135
144
|
|
@@ -287,6 +296,67 @@ describe Kitchen::Driver::Rackspace do
|
|
287
296
|
end
|
288
297
|
end
|
289
298
|
|
299
|
+
describe '#create and servicelevel_wait' do
|
300
|
+
let(:server) do
|
301
|
+
double(id: 'test123',
|
302
|
+
wait_for: true,
|
303
|
+
public_ip_address: '1.2.3.4',
|
304
|
+
private_ip_address: '10.9.8.7',
|
305
|
+
update: nil)
|
306
|
+
end
|
307
|
+
|
308
|
+
before(:each) do
|
309
|
+
{
|
310
|
+
default_name: 'a_monkey!',
|
311
|
+
create_server: server,
|
312
|
+
tcp_check: true
|
313
|
+
}.each do |k, v|
|
314
|
+
allow_any_instance_of(described_class).to receive(k).and_return(v)
|
315
|
+
end
|
316
|
+
end
|
317
|
+
|
318
|
+
context 'username and API key only provided' do
|
319
|
+
let(:config) do
|
320
|
+
{
|
321
|
+
rackspace_username: 'hello',
|
322
|
+
rackspace_api_key: 'world',
|
323
|
+
wait_for: 1200,
|
324
|
+
servicelevel_wait: true
|
325
|
+
}
|
326
|
+
end
|
327
|
+
|
328
|
+
it 'generates a server name in the absence of one' do
|
329
|
+
driver.create(state)
|
330
|
+
expect(driver[:server_name]).to eq('a_monkey!')
|
331
|
+
end
|
332
|
+
|
333
|
+
it 'gets a proper server ID' do
|
334
|
+
driver.create(state)
|
335
|
+
expect(state[:server_id]).to eq('test123')
|
336
|
+
end
|
337
|
+
|
338
|
+
it 'gets a proper hostname (IP)' do
|
339
|
+
driver.create(state)
|
340
|
+
expect(state[:hostname]).to eq('1.2.3.4')
|
341
|
+
end
|
342
|
+
|
343
|
+
it 'calls tcp_check' do
|
344
|
+
expect(driver).to receive(:tcp_check)
|
345
|
+
driver.create(state)
|
346
|
+
end
|
347
|
+
|
348
|
+
it 'calls servicelevel_check ' do
|
349
|
+
expect(driver).to receive(:servicelevel_check)
|
350
|
+
driver.create(state)
|
351
|
+
end
|
352
|
+
|
353
|
+
it 'servicelevel_check waits for managed service level automation' do
|
354
|
+
expect(server).to receive(:wait_for)
|
355
|
+
driver.send(:servicelevel_check, server)
|
356
|
+
end
|
357
|
+
end
|
358
|
+
end
|
359
|
+
|
290
360
|
describe '#create and use_private_ip_address' do
|
291
361
|
let(:server) do
|
292
362
|
double(id: 'test123',
|
@@ -429,6 +499,7 @@ describe Kitchen::Driver::Rackspace do
|
|
429
499
|
image_id: 'there',
|
430
500
|
flavor_id: 'captain',
|
431
501
|
public_key_path: 'tarpals',
|
502
|
+
no_passwd_lock: false,
|
432
503
|
networks: default_networks
|
433
504
|
}
|
434
505
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-rackspace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.19.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Hartman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
@@ -94,20 +94,6 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '2.6'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: countloc
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0.4'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0.4'
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
98
|
name: rspec
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -206,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
192
|
version: '0'
|
207
193
|
requirements: []
|
208
194
|
rubyforge_project:
|
209
|
-
rubygems_version: 2.4.
|
195
|
+
rubygems_version: 2.4.5.1
|
210
196
|
signing_key:
|
211
197
|
specification_version: 4
|
212
198
|
summary: A Test Kitchen Rackspace driver built on Fog
|