kitchen-rax 0.6.0 → 0.7.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 -11
- 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: b767c1b95d1a155d839c9fe33db6ad1272a562e2
|
4
|
+
data.tar.gz: 90b3d49c663852757beb77214dd9f4301ad63f35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34ae87dd6ef8d750a9fe411955424442a66ab75315443aecefcaca59abe06f835538ea3c5953e8353d27061da6d415e43a2a1378bf202dfe2751ee643b4c1b3d
|
7
|
+
data.tar.gz: 1cd77efa4eb13c4baae9d0942a8fdc85a9edaad584b50458b5da7d46c0e14c1a5af6ddb6ee5e8987c69a279383ef3bb76ed652fa85cd430d54077a2f2331d532
|
data/lib/kitchen/driver/rax.rb
CHANGED
@@ -15,7 +15,6 @@ module Kitchen
|
|
15
15
|
default_config :rackspace_region, 'lon'
|
16
16
|
default_config :wait_for, 600
|
17
17
|
default_config :image_id
|
18
|
-
default_config(:server_name, &:default_name)
|
19
18
|
default_config :networks, nil
|
20
19
|
|
21
20
|
default_config :rackspace_username do
|
@@ -70,7 +69,13 @@ module Kitchen
|
|
70
69
|
end
|
71
70
|
|
72
71
|
def create_server
|
73
|
-
|
72
|
+
server_name = [
|
73
|
+
instance.name.gsub(/\W/, '')[0..14],
|
74
|
+
(Etc.getlogin || 'nologin').gsub(/\W/, '')[0..14],
|
75
|
+
Socket.gethostname.gsub(/\W/, '')[0..22],
|
76
|
+
Array.new(7) { rand(36).to_s(36) }.join
|
77
|
+
].join('-')
|
78
|
+
server_def = { name: server_name }
|
74
79
|
[:image_id, :flavor_id].each do |opt|
|
75
80
|
server_def[opt] = config[opt]
|
76
81
|
end
|
@@ -79,15 +84,6 @@ module Kitchen
|
|
79
84
|
server.save
|
80
85
|
end
|
81
86
|
|
82
|
-
def self.default_name
|
83
|
-
[
|
84
|
-
instance.name.gsub(/\W/, '')[0..14],
|
85
|
-
(Etc.getlogin || 'nologin').gsub(/\W/, '')[0..14],
|
86
|
-
Socket.gethostname.gsub(/\W/, '')[0..22],
|
87
|
-
Array.new(7) { rand(36).to_s(36) }.join
|
88
|
-
].join('-')
|
89
|
-
end
|
90
|
-
|
91
87
|
def rackconnect_check(server)
|
92
88
|
server.wait_for { metadata.all['rackconnect_automation_status'] == 'DEPLOYED' }
|
93
89
|
puts '(rackconnect automation complete)'
|