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 +4 -4
- data/lib/kitchen/driver/rax.rb +7 -6
- data/lib/kitchen/driver/rax_version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bd51e253828ed6ef3cd525814f8b6ee4af578f9
|
4
|
+
data.tar.gz: 4af08a06a812d6f8caacc355fb674e2a1711f2b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 706d62b30d51af8848aa35a502b2ea5c7135e999a71f95cc81e632908251213cdbe5ffc6ed3e7ae2a45fa3b8a2280a77fd4640654d456a96cf4914800adb08a2
|
7
|
+
data.tar.gz: 017901aa8be09216b13506e1d3736ab1e4c7cc53f2152fc7dbbdee1121fac35e1aec30431bc2972af1021e05ebbd259fb9b1c6f2fefbee8e9cf4a70916dd5168
|
data/lib/kitchen/driver/rax.rb
CHANGED
@@ -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 :
|
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,
|
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
|
-
|
67
|
-
|
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
|
|