Commit a151e001 authored by Christos Stavrakakis's avatar Christos Stavrakakis

cyclades: Extra disk params when attaching volumes

When attaching a volume to an instance, use the
'GANETI_DISK_PROVIDER_KWARGS' setting to let the administrator pass
extra parameters to the Ganeti ExtStorage provider (exactly like in
instance creation).
parent dbdf42b3
......@@ -1197,6 +1197,11 @@ def attach_volume(vm, volume, depends=[]):
if volume.origin is not None:
disk["origin"] = volume.origin
extra_disk_params = settings.GANETI_DISK_PROVIDER_KWARGS\
.get(disk_provider)
if extra_disk_params is not None:
disk.update(extra_disk_params)
kwargs = {
"instance": vm.backend_vm_id,
"disks": [("add", "-1", disk)],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment