mirror of https://github.com/apache/jclouds.git
adjusted run-node to only return a single node, as its name doesn't imply sequence; added location
This commit is contained in:
parent
69ddfb38ca
commit
d08b359956
|
@ -174,13 +174,13 @@ See http://code.google.com/p/jclouds for details."
|
||||||
|
|
||||||
"
|
"
|
||||||
([tag]
|
([tag]
|
||||||
(run-nodes tag 1 (default-template *compute*) *compute*))
|
(first (run-nodes tag 1 (default-template *compute*) *compute*)))
|
||||||
([tag compute-or-template]
|
([tag compute-or-template]
|
||||||
(if (compute-service? compute-or-template)
|
(if (compute-service? compute-or-template)
|
||||||
(run-nodes tag 1 (default-template compute-or-template) compute-or-template)
|
(first (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 compute-or-template *compute*))))
|
||||||
([tag template compute]
|
([tag template compute]
|
||||||
(run-nodes tag 1 template compute)))
|
(first (run-nodes tag 1 template compute))))
|
||||||
|
|
||||||
(defn #^NodeMetadata node-details
|
(defn #^NodeMetadata node-details
|
||||||
"Retrieve the node metadata."
|
"Retrieve the node metadata."
|
||||||
|
@ -266,6 +266,11 @@ See http://code.google.com/p/jclouds for details."
|
||||||
[#^ComputeMetadata node]
|
[#^ComputeMetadata node]
|
||||||
(.getName 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 Template image size location options)
|
||||||
(define-accessors Image version os-family os-description architecture)
|
(define-accessors Image version os-family os-description architecture)
|
||||||
(define-accessors Size cores ram disk)
|
(define-accessors Size cores ram disk)
|
||||||
|
|
Loading…
Reference in New Issue