diff --git a/compute/src/main/clojure/org/jclouds/compute.clj b/compute/src/main/clojure/org/jclouds/compute.clj index 178a507f51..ba4dbd80c8 100644 --- a/compute/src/main/clojure/org/jclouds/compute.clj +++ b/compute/src/main/clojure/org/jclouds/compute.clj @@ -174,13 +174,13 @@ See http://code.google.com/p/jclouds for details." " ([tag] - (run-nodes tag 1 (default-template *compute*) *compute*)) + (first (run-nodes tag 1 (default-template *compute*) *compute*))) ([tag compute-or-template] (if (compute-service? compute-or-template) - (run-nodes tag 1 (default-template compute-or-template) compute-or-template) - (run-nodes tag 1 compute-or-template *compute*))) + (first (run-nodes tag 1 (default-template compute-or-template) compute-or-template)) + (first (run-nodes tag 1 compute-or-template *compute*)))) ([tag template compute] - (run-nodes tag 1 template compute))) + (first (run-nodes tag 1 template compute)))) (defn #^NodeMetadata node-details "Retrieve the node metadata." @@ -266,6 +266,11 @@ See http://code.google.com/p/jclouds for details." [#^ComputeMetadata node] (.getName node)) +(defn location + "Returns the compute node's location id" + [#^ComputeMetadata node] + (.getLocationId node)) + (define-accessors Template image size location options) (define-accessors Image version os-family os-description architecture) (define-accessors Size cores ram disk)