mirror of https://github.com/apache/jclouds.git
Issue 716: fix :map-ebs-snapshot-to-device-name
This commit is contained in:
parent
0e9d3666ad
commit
fe50ae36bc
|
@ -399,8 +399,8 @@ See http://code.google.com/p/jclouds for details."
|
|||
;; aws ec2 options
|
||||
:map-ephemeral-device-to-device-name])
|
||||
{:map-ebs-snapshot-to-device-name
|
||||
(kw-memfn-apply :map-ebs-snapshot-to-device-name
|
||||
device-name snapshot-id size-in-gib delete-on-termination)
|
||||
(memfn-apply mapEBSSnapshotToDeviceName
|
||||
device-name snapshot-id size-in-gib delete-on-termination)
|
||||
:map-new-volume-to-device-name
|
||||
(kw-memfn-apply :map-new-volume-to-device-name
|
||||
device-name size-in-gib delete-on-termination)}))
|
||||
|
|
|
@ -94,6 +94,12 @@ Ensure the module is on the classpath. You are maybe missing a dependency on
|
|||
[kw]
|
||||
(symbol (camelize-mixed kw)))
|
||||
|
||||
(defmacro memfn-apply
|
||||
"Expands into a function that takes one argument,"
|
||||
[fn-name & args]
|
||||
`(fn [target# [~@args]]
|
||||
((memfn ~fn-name ~@args) target# ~@args)))
|
||||
|
||||
(defmacro kw-memfn
|
||||
"Expands into code that creates a function that expects to be passed an
|
||||
object and any args, and calls the instance method corresponding to
|
||||
|
|
Loading…
Reference in New Issue