kitchen-rackspace 0.7.0 → 0.8.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
2
  SHA1:
3
- metadata.gz: e320297bfe8e683d298155da6bf1864c420b3691
4
- data.tar.gz: 633656517754c67fc5aa1f466f0e6a4430552d37
3
+ metadata.gz: 11a49b0402d17f4783bbf041eb46e947b1fb902c
4
+ data.tar.gz: ea67a1d6080f34eeee786a2734d9a236b24fdb8a
5
5
  SHA512:
6
- metadata.gz: 14d8e600b6b7eff9799fc3e084552528688cbe88d8033b5e4e2e518b8049b3e95866e93cfd4898475ad9cbb31f3f5173109113b8e090e8f63b9c2a9873ce051d
7
- data.tar.gz: a6c176366ffea6994bd71d252d5deb92743e711a3e64135867b5fde52734e67b670b4c13d92a15fe1074babf9be50f8df65d6d49ac2355d923fa6cd527f36f51
6
+ metadata.gz: 6b1b47b640bb72f6752eddc927188a6134261c4d5b5a70b6dc0bccbb42220f12edb84c695ed5c2cda2a93b41f6f721ad0b9b923c38a32726e9de7f46df70998e
7
+ data.tar.gz: 434f78dfe311b93a13f75e2b6e04a3ab295e7cc45e1bb65fae7abb12f20d9c7a75bef65044b8252d2bf4e453fd78bf028864a55966e6fbca57dba24cab3d8afc
data/.rubocop.yml ADDED
@@ -0,0 +1,5 @@
1
+ # Allow additional lines until main driver class can be split
2
+ # into smaller classes.
3
+
4
+ Style/ClassLength:
5
+ Max: 120
data/.travis.yml CHANGED
@@ -4,7 +4,6 @@ gemfile:
4
4
  - Gemfile
5
5
 
6
6
  rvm:
7
- - 1.9.2
8
7
  - 1.9.3
9
8
  - 2.0.0
10
9
  - 2.1.1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.8.0 / 2014-08-20
2
+
3
+ ### New Features
4
+
5
+ * PR [#35][] - Add option to wait on RackConnect, via [@martinb3][]
6
+
1
7
  # 0.7.0 / 2014-07-09
2
8
 
3
9
  ### New Features
@@ -70,6 +76,7 @@ boot times, via [@coderanger][]
70
76
 
71
77
  * Initial release! Woo!
72
78
 
79
+ [#35]: https://github.com/test-kitchen/kitchen-rackspace/pull/35
73
80
  [#31]: https://github.com/test-kitchen/kitchen-rackspace/pull/31
74
81
  [#29]: https://github.com/test-kitchen/kitchen-rackspace/pull/29
75
82
  [#26]: https://github.com/test-kitchen/kitchen-rackspace/pull/26
data/README.md CHANGED
@@ -49,6 +49,7 @@ for your specified platform. Additional, optional overrides can be provided:
49
49
  no_ssh_tcp_check: [DEFAULTS TO false, SKIPS TCP CHECK WHEN true]
50
50
  no_ssh_tcp_check_sleep: [NUM OF SECONDS TO SLEEP IF no_ssh_tcp_check IS SET]
51
51
  networks: [LIST OF RACKSPACE NETWORK UUIDS, DEFAULT PUBLICNET AND SERVICE NET]
52
+ rackconnect_wait: ['true' IF USING RACKCONNECT TO WAIT FOR IT TO COMPLETE]
52
53
 
53
54
  You also have the option of providing some configs via environment variables:
54
55
 
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ['lib']
21
21
 
22
- spec.required_ruby_version = '>= 1.9.0'
22
+ spec.required_ruby_version = '>= 1.9.3'
23
23
 
24
24
  spec.add_dependency 'test-kitchen', '~> 1.1'
25
25
  spec.add_dependency 'fog', '~> 1.18'
@@ -36,6 +36,7 @@ module Kitchen
36
36
  default_config :wait_for, 600
37
37
  default_config :no_ssh_tcp_check, false
38
38
  default_config :no_ssh_tcp_check_sleep, 120
39
+ default_config :rackconnect_wait, false
39
40
  default_config(:image_id) { |driver| driver.default_image }
40
41
  default_config(:server_name) { |driver| driver.default_name }
41
42
  default_config :networks, nil
@@ -73,6 +74,7 @@ module Kitchen
73
74
  info("Rackspace instance <#{state[:server_id]}> created.")
74
75
  server.wait_for { ready? }
75
76
  puts '(server ready)'
77
+ rackconnect_check(server) if config[:rackconnect_wait]
76
78
  state[:hostname] = server.public_ip_address
77
79
  tcp_check(state)
78
80
  rescue Fog::Errors::Error, Excon::Errors::Error => ex
@@ -116,6 +118,8 @@ module Kitchen
116
118
  [:image_id, :flavor_id, :public_key_path].each do |opt|
117
119
  server_def[opt] = config[opt]
118
120
  end
121
+ # see @note on bootstrap def about rackconnect
122
+ server_def[:no_passwd_lock] = true if config[:rackconnect_wait]
119
123
  compute.servers.bootstrap(server_def)
120
124
  end
121
125
 
@@ -134,6 +138,13 @@ module Kitchen
134
138
  puts '(ssh ready)'
135
139
  end
136
140
 
141
+ def rackconnect_check(server)
142
+ server.wait_for \
143
+ { metadata.all['rackconnect_automation_status'] == 'DEPLOYED' }
144
+ puts '(rackconnect automation complete)'
145
+ server.update # refresh accessIPv4 with new IP
146
+ end
147
+
137
148
  def networks
138
149
  base_nets = %w(
139
150
  00000000-0000-0000-0000-000000000000
@@ -21,6 +21,6 @@ module Kitchen
21
21
  #
22
22
  # @author Jonathan Hartman <j@p4nt5.com>
23
23
  module Driver
24
- RACKSPACE_VERSION = '0.7.0'
24
+ RACKSPACE_VERSION = '0.8.0'
25
25
  end
26
26
  end
@@ -108,6 +108,10 @@ describe Kitchen::Driver::Rackspace do
108
108
  it 'defaults to the standard Rackspace networks' do
109
109
  expect(driver[:networks]).to eq(default_networks)
110
110
  end
111
+
112
+ it 'defaults to not waiting for rackconnect' do
113
+ expect(driver[:rackconnect_wait]).to eq(false)
114
+ end
111
115
  end
112
116
 
113
117
  platforms = {
@@ -137,7 +141,8 @@ describe Kitchen::Driver::Rackspace do
137
141
  port: '2222',
138
142
  server_name: 'puppy',
139
143
  rackspace_region: 'ord',
140
- wait_for: 1200
144
+ wait_for: 1200,
145
+ rackconnect_wait: true
141
146
  }
142
147
 
143
148
  let(:config) { config }
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.7.0
4
+ version: 0.8.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: 2014-07-09 00:00:00.000000000 Z
11
+ date: 2014-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen
@@ -186,6 +186,7 @@ extensions: []
186
186
  extra_rdoc_files: []
187
187
  files:
188
188
  - ".gitignore"
189
+ - ".rubocop.yml"
189
190
  - ".travis.yml"
190
191
  - CHANGELOG.md
191
192
  - Gemfile
@@ -210,7 +211,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
210
211
  requirements:
211
212
  - - ">="
212
213
  - !ruby/object:Gem::Version
213
- version: 1.9.0
214
+ version: 1.9.3
214
215
  required_rubygems_version: !ruby/object:Gem::Requirement
215
216
  requirements:
216
217
  - - ">="
@@ -218,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
219
  version: '0'
219
220
  requirements: []
220
221
  rubyforge_project:
221
- rubygems_version: 2.2.2
222
+ rubygems_version: 2.4.1
222
223
  signing_key:
223
224
  specification_version: 4
224
225
  summary: A Test Kitchen Rackspace driver