Moved in-group? to compute2.clj from test

This commit is contained in:
Mattias Holmqvist 2011-05-26 23:05:01 +02:00
parent da11370139
commit 94c8f3707f
2 changed files with 5 additions and 2 deletions

View File

@ -278,6 +278,11 @@ Here's an example of creating and running a small linux node in the group webser
[#^NodeMetadata node]
(state-predicate node UNRECOGNIZED))
(defn in-group?
"Returns a predicate fn which returns true if the node is in the given group, false otherwise"
[group]
#(= (.getGroup %) group))
(defn public-ips
"Returns the node's public ips"
[#^NodeMetadata node]

View File

@ -63,8 +63,6 @@ list, Alan Dipert and MeikelBrandmeyer."
(is (compute-service? *compute*))
(is (compute-service? (compute-service (compute-context *compute*)))))
(defn in-group? [group] #(= (.getGroup %) group))
(deftest nodes-test
(is (create-node *compute* "fred" (build-template *compute* {} )))
(is (= 1 (count (nodes-in-group *compute* "fred"))))