Issue 787:clojure terminated? predicate should return true if the node is null

This commit is contained in:
Adrian Cole 2011-12-18 15:19:26 -08:00
parent 57c3c81139
commit aa00e28d73
2 changed files with 6 additions and 2 deletions

View File

@ -308,7 +308,9 @@ See http://code.google.com/p/jclouds for details."
(defn terminated? (defn terminated?
"Predicate for the node being halted." "Predicate for the node being halted."
[#^NodeMetadata node] [#^NodeMetadata node]
(state-predicate node TERMINATED)) (or
(= node nil)
(state-predicate node TERMINATED)))
(defn suspended? (defn suspended?
"Predicate for the node being suspended." "Predicate for the node being suspended."

View File

@ -258,7 +258,9 @@ Here's an example of creating and running a small linux node in the group webser
(defn terminated? (defn terminated?
"Predicate for the node being halted." "Predicate for the node being halted."
[#^NodeMetadata node] [#^NodeMetadata node]
(state-predicate node TERMINATED)) (or
(= node nil)
(state-predicate node TERMINATED)))
(defn suspended? (defn suspended?
"Predicate for the node being suspended." "Predicate for the node being suspended."