kitchen-rax 0.19.0 → 0.20.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/cloud.rb +8 -0
- data/lib/kitchen/driver/rax.rb +1 -4
- data/lib/kitchen/driver/rax_version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eccdacb9a52621a3c7ec5acbc0e47b58152eab03
|
4
|
+
data.tar.gz: 1b3d4ca9d81b4d1ab4c67e3e0937d3f20ad48f3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a55d60a13cc81b40c4d1524885c3612f74c0f20a15444c5bdd17bfb056f643e0cdf629abdf96f4fd3239ecf4ab2883dec2ee04163c37fd603872666c44c34d9
|
7
|
+
data.tar.gz: 27fcf3bd489fa59e545c8be07681ec5df99493ec9f7b9a4bc05527a2de6ad25d9588cc9388924e30a1068b3adebaa66d883f704c839f3a113920c2e88b5521c7
|
data/lib/kitchen/driver/cloud.rb
CHANGED
@@ -13,6 +13,14 @@ module Kitchen
|
|
13
13
|
Fog::Compute.new(server_def)
|
14
14
|
end
|
15
15
|
|
16
|
+
def self.delete_server(instance, config, state)
|
17
|
+
server = compute(config).servers.get(state[:server_id])
|
18
|
+
server.destroy unless server.nil?
|
19
|
+
state.delete(:server_id)
|
20
|
+
state.delete(:hostname)
|
21
|
+
state
|
22
|
+
end
|
23
|
+
|
16
24
|
def self.create_server(instance, config)
|
17
25
|
server_def = {
|
18
26
|
name: generate_name(instance),
|
data/lib/kitchen/driver/rax.rb
CHANGED
@@ -48,11 +48,8 @@ module Kitchen
|
|
48
48
|
|
49
49
|
def destroy(state)
|
50
50
|
return if state[:server_id].nil?
|
51
|
-
|
52
|
-
server.destroy unless server.nil?
|
51
|
+
state = Kitchen::Driver::Cloud.delete_server(instance, config, state)
|
53
52
|
info("Rackspace instance <#{state[:server_id]}> destroyed.")
|
54
|
-
state.delete(:server_id)
|
55
|
-
state.delete(:hostname)
|
56
53
|
end
|
57
54
|
|
58
55
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-rax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.20.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Olivier Kouame
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|