[openstack-dev] [cinder] Bug#1231298 - size parameter for volume creation
Dean Troyer
dtroyer at gmail.com
Fri Aug 8 13:55:58 UTC 2014
On Fri, Aug 8, 2014 at 12:36 AM, Ganapathy, Sandhya <
sandhya.ganapathy at hp.com> wrote:
> This is to discuss Bug #1231298 –
> https://bugs.launchpad.net/cinder/+bug/1231298
>
...
> Conclusion reached with this bug is that, we need to modify cinder client
> in order to accept optional size parameter (as the cinder’s API allows)
> and calculate the size automatically during volume creation from image.
>
> There is also an opinion that size should not be an optional parameter
> during volume creation – does this mean, Cinder’s API should be changed in
> order to make size a mandatory parameter.
>
In cinderclient I think you're stuck with size as a mandatory argument to
the 'cinder create' command, as you must be backward-compatible for at
least a deprecation period.[0]
Your option here[1] is to use a sentinel value for size that indicates the
actual volume size should be calculated and let the client do the right
thing under the hood to feed the server API. Other project CLIs have used
both 'auto' and '0' in situations like this. I'd suggest '0' as it is
still an integer and doesn't require potentially user-error-prone string
matching to work.
FWIW, this is why OSC changed 'volume create' to make --size an option and
make the volume name be the positional argument.
[0] The deprecation period for clients is ambiguous as the release cycle
isn't timed but we think of deprecations that way. Using integrated
release cycles is handy but less than perfect to correlate to the client's
semver releases.
[1] Bad pun alert...or is there such a thing as a bad pun???
dt
--
Dean Troyer
dtroyer at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140808/7230b38a/attachment.html>
More information about the OpenStack-dev
mailing list