gds-operations/vcloud-core — pull request #128 by mikepea (2014-09-22 13:57:56+00:00)
Title: Create and Attach Independent Disks

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. They are conceptually
similar to AWS Elastic Block Store volumes.

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.

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!