mirror of https://github.com/apache/jclouds.git
fixed node.getId() usage in clojure ebs wrapper
This commit is contained in:
parent
a839369277
commit
61f36b7731
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue