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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1834f62e56f1e1350d57b432a1f71b22c04ff3e9
4
- data.tar.gz: 258c9a36c0ee2ce9ea6cd58d2074ccc70645eb9d
3
+ metadata.gz: eccdacb9a52621a3c7ec5acbc0e47b58152eab03
4
+ data.tar.gz: 1b3d4ca9d81b4d1ab4c67e3e0937d3f20ad48f3c
5
5
  SHA512:
6
- metadata.gz: 41e6beb71a7f6d1ec2d1ae05fb12daf8bb6a76a9e31974f2e78a4ac5a25739fd65c0301789c9531687901d161aeaca7d785c0a7545c14eaef6575d4cc3131915
7
- data.tar.gz: 7d52992e3f8b8e6b01c433de3074f394c38623bb52ea68b24c5be5ea86d0c26c4b04708fb86acd41f68a261b4f0cccb43a10435b7cabc8d9d50ae7833e1682fc
6
+ metadata.gz: 5a55d60a13cc81b40c4d1524885c3612f74c0f20a15444c5bdd17bfb056f643e0cdf629abdf96f4fd3239ecf4ab2883dec2ee04163c37fd603872666c44c34d9
7
+ data.tar.gz: 27fcf3bd489fa59e545c8be07681ec5df99493ec9f7b9a4bc05527a2de6ad25d9588cc9388924e30a1068b3adebaa66d883f704c839f3a113920c2e88b5521c7
@@ -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),
@@ -48,11 +48,8 @@ module Kitchen
48
48
 
49
49
  def destroy(state)
50
50
  return if state[:server_id].nil?
51
- server = compute.servers.get(state[:server_id])
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
@@ -21,6 +21,6 @@ module Kitchen
21
21
  module Driver
22
22
 
23
23
  # Version string for Rax Kitchen driver
24
- RAX_VERSION = "0.19.0"
24
+ RAX_VERSION = "0.20.0"
25
25
  end
26
26
  end
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.19.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-25 00:00:00.000000000 Z
11
+ date: 2017-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen