gds-operations/vcloud-core — pull request #130 by mikepea (2014-09-26 12:29:08+00:00)
Title: Independent Disk management

Independent Disks are their own vCloud Entity, unrelated to the 'local' disks
that can currently be added to VMs via the Vm#add_extra_disks method.

Instead, independent disks are created as their own entity, and attached
to a VM. This can be done when the VM is stopped or running. When the VM is destroyed, any attached Independent Disks will be detached, but not destroyed. They can subsequently be re-attached to another (usually recreated) Vm.

They are conceptually similar to AWS Elastic Block Store volumes.

This PR adds a new class, Vcloud::Core::IndependentDisk, which handles creation and discovery of Independent Disks. It also adds a Vm#attach_independent_disks method, to attach disks to an existing Vm.

I have also had to add a 'Vapp.get_by_child_vm' discovery method to find the parent Vapp of a VM. This is due to the requirement to dependency inject the parent vApp object when constructing a Vm object - arguably this could be changed, as VM's are aware of their parent via the API. For discussion, essentially!

NB: This is a rework of https://github.com/gds-operations/vcloud-core/pull/128 -- Github seems to have lost the connection after the rebase.