GitHub user gregorybishop opened a pull request: https://github.com/apache/libcloud/pull/785
Updated create_volume routine in the cloudstack.py file to support ex_volume_type ## Updated create_volume routine in the cloudstack.py file to support ex_volume_type ### Description As part of the deployment of an internal cloud using CloudStack, we discovered that one cannot use the "DiskOffering" capability of CloudStack to select volumes with specific attributes. When reviewing the OpenStack portion of the library, this is supported using the ex_volume_type variable in the call to create_volume. The CloudStack DiskOffering capability is required for this deployment, so the create_volume routing in cloudstack.py was updated to add this as an option using the same variable name as used for OpenStack. When a DiskOffering is specified, the input size to create_volume is over-riden by the size of the DiskOffering, unless the DiskOffering size is customizable. This was chosen to minimize errors, as if someone calls create_volume with the ex_volume_type option, then it is likely that is what they want, even if the specified size is different from the request. ### Status - done, ready for review ### Checklist (tick everything that applies) - [ ] [Code linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide) (required, can be done after the PR checks) - [ ] Documentation - [ ] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html) - [ ] [ICLA](http://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes) (required for bigger changes) You can merge this pull request into a Git repository by running: $ git pull https://github.com/gregorybishop/libcloud trunk Alternatively you can review and apply these changes as the patch at: https://github.com/apache/libcloud/pull/785.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #785 ---- commit ea7a40c52052b87aacfe8f3d1a98a3095eee4d32 Author: Greg Bishop <greg.bis...@scality.com> Date: 2016-05-11T20:53:05Z Updated create_volume routine in the cloudstack.py file to support "DiskOffering" selection using same variable name as for OpenStack (ex_volume_type). This allows one to specify a specific volume type. When ex_volume_type is specified, the size of the volume is defined by that volume type, unless it is adjustable. Updated tests to validate changes to create_volume. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---