fixed node.getId() usage in clojure ebs wrapper

This commit is contained in:
Chas Emerick 2010-05-26 00:04:30 -04:00
parent a839369277
commit 667c3ed03e
1 changed files with 3 additions and 3 deletions

View File

@ -58,8 +58,8 @@
(instance? NodeMetadata v) (let [zone (compute/location v)] (instance? NodeMetadata v) (let [zone (compute/location v)]
; no easier way to go from zone -> region? ; no easier way to go from zone -> region?
(if (> (.indexOf zone "-") -1) (if (> (.indexOf zone "-") -1)
(subs zone 0 (-> zone count dec)) (subs zone 0 (-> zone count dec))
zone)) zone))
:else default-region))) :else default-region)))
(defn get-volume-id (defn get-volume-id
@ -186,7 +186,7 @@
(attach-volume some-node-instance :vol-45228a6d \"/dev/sdh\") (attach-volume some-node-instance :vol-45228a6d \"/dev/sdh\")
(attach-volume some-node-instance some-volume-instance \"/dev/sdh\"))" (attach-volume some-node-instance some-volume-instance \"/dev/sdh\"))"
([#^NodeMetadata node volume device] ([#^NodeMetadata node volume device]
(attach-volume node (.getId node) (get-volume-id volume) device)) (attach-volume node (.getProviderId node) (get-volume-id volume) device))
([region instance-id volume-id device] ([region instance-id volume-id device]
(apply #(.attachVolumeInRegion (ebs-service) (apply #(.attachVolumeInRegion (ebs-service)
(get-region region) % %2 %3) (get-region region) % %2 %3)