fog-prune 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/lib/fog-prune/prune.rb +19 -1
- data/lib/fog-prune/version.rb +1 -4
- metadata +2 -2
data/CHANGELOG.md
CHANGED
data/lib/fog-prune/prune.rb
CHANGED
@@ -180,7 +180,25 @@ class FogPrune
|
|
180
180
|
end
|
181
181
|
|
182
182
|
def rackspace_check(node)
|
183
|
-
|
183
|
+
rackspace_node = rackspace_nodes.detect do |n|
|
184
|
+
n.name == node.name &&
|
185
|
+
n.ipv4_address == node[:rackspace][:public_ipv4]
|
186
|
+
end
|
187
|
+
unless(rackspace_node)
|
188
|
+
debug "#{node.name} returned nil from rackspace"
|
189
|
+
else
|
190
|
+
debug "#{node.name} state on rackspace: #{rackspace_node.state}"
|
191
|
+
end
|
192
|
+
rackspace_node.nil? || rackspace_node.state == 'DELETED'
|
193
|
+
end
|
194
|
+
|
195
|
+
def rackspace_nodes
|
196
|
+
unless(@rackspace_nodes)
|
197
|
+
@rackspace_nodes = compute(:rackspace).map do |compute_con|
|
198
|
+
compute_con.servers.all
|
199
|
+
end.flatten
|
200
|
+
end
|
201
|
+
@rackspace_nodes
|
184
202
|
end
|
185
203
|
|
186
204
|
def debug(msg)
|
data/lib/fog-prune/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-prune
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-08-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chef
|