cloudbau/vagrant-openstack-plugin — pull request #84 by cbaenziger (2014-09-15 00:02:31+00:00)
Title: Add support for creating OpenStack Volumes

This PR introduces the ability to create (and automatically destroy attached) volumes with a VM.

The Vagrant file takes a new optional parameter `disks` which expects an array of hashes. Each hash is expected to have keys `name`, `description` and `size` which are passed into Fog as appropriate.

The provider will attach disks which already exist in the OpenStack tenancy and are unattached, if all three parameters match those provided. Similarly, the provider will work if multiple identical volume definitions are provided (e.g. `name`, `description` and `size` are the same for multiple hashes in the array); it will create multiple volumes and attach each one.

The server clean-up code has been ammended to wait for the server to truely go away as we can not begin destroying volumes until the server is gone (and the volumes are thus not attached).

There is rudimentary data type verification provided in `lib/vagrant-openstack-plugin/config.rb` as well as stubs in `spec/vagrant-openstack-plugin/config_spec.rb`.

I have tested these changes against OpenStack clusters setup by the [chef-bcpc](http://github.com/bloomberg/chef-bcpc) Chef recipes running OpenStack Havana.