kitchen-rax 0.17.0 → 0.18.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: 16486e1384479db84c4a503da6780aa372950f19
4
- data.tar.gz: b300f45738bb78ee08e5701f96f52cd206ccf684
3
+ metadata.gz: 4bd51e253828ed6ef3cd525814f8b6ee4af578f9
4
+ data.tar.gz: 4af08a06a812d6f8caacc355fb674e2a1711f2b6
5
5
  SHA512:
6
- metadata.gz: 490dced6daa48ac1a5d1e28f47caee0fbe44f6f35a2a7fd1a96938a99b9623f67cbfac7d34a9becdbf3d056c61b5846cc209e6eee711f723ac02f6782fc217c6
7
- data.tar.gz: e95d9bb1b54382f8a66a279e5fa9e0266d30b3f1e7d4fc54c58f91d504f82f14d01e7d19bcebcaf9304a82c6fd7025378e8f02f8b62a2de3758a7491ed6dc07e
6
+ metadata.gz: 706d62b30d51af8848aa35a502b2ea5c7135e999a71f95cc81e632908251213cdbe5ffc6ed3e7ae2a45fa3b8a2280a77fd4640654d456a96cf4914800adb08a2
7
+ data.tar.gz: 017901aa8be09216b13506e1d3736ab1e4c7cc53f2152fc7dbbdee1121fac35e1aec30431bc2972af1021e05ebbd259fb9b1c6f2fefbee8e9cf4a70916dd5168
@@ -18,7 +18,7 @@ module Kitchen
18
18
  default_config :wait_for, 600
19
19
  default_config :image_id
20
20
  default_config :user_data
21
- default_config :networks, nil
21
+ default_config :network, 'public'
22
22
 
23
23
  default_config :rackspace_username do
24
24
  ENV['RACKSPACE_USERNAME']
@@ -40,8 +40,8 @@ module Kitchen
40
40
  def create(state)
41
41
  info("Creating a new Rackspace instance.")
42
42
  server = Kitchen::Driver::Cloud.create_server(instance, config)
43
- wait_for_build_completion(server, state)
44
- check_winrm_connectivity(instance, server.public_ip_address, server.password)
43
+ wait_for_build_completion(server, state, config)
44
+ check_winrm_connectivity(instance, state[:hostname], state[:password])
45
45
  rescue Fog::Errors::Error, Excon::Errors::Error => ex
46
46
  raise ActionFailed, ex.message
47
47
  end
@@ -57,14 +57,15 @@ module Kitchen
57
57
 
58
58
  private
59
59
 
60
- def wait_for_build_completion(server, state)
60
+ def wait_for_build_completion(server, state, config)
61
61
  state[:server_id] = server.id
62
62
  info("Rackspace instance <#{state[:server_id]}> created.")
63
63
  server.wait_for { ready? }
64
64
  info("The instance has finished building.")
65
65
  rackconnect_check(server)
66
- info("The instance is ready to accept connections on IP #{server.public_ip_address} with password #{server.password}.")
67
- state[:hostname] = server.public_ip_address
66
+ ip = find_accessible_ip(server)
67
+ info("The instance is ready to accept connections on IP #{ip} with password #{server.password}.")
68
+ state[:hostname] = config[:network] == "private" ? server.private_ip_address : server.public_ip_address
68
69
  state[:password] = server.password
69
70
  end
70
71
 
@@ -21,6 +21,6 @@ module Kitchen
21
21
  module Driver
22
22
 
23
23
  # Version string for Rax Kitchen driver
24
- RAX_VERSION = "0.17.0"
24
+ RAX_VERSION = "0.18.0"
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-rax
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Kouame