On Aug 8, 2014, at 6:55 AM, Dean Troyer <dtro...@gmail.com> wrote: > On Fri, Aug 8, 2014 at 12:36 AM, Ganapathy, Sandhya > <sandhya.ganapa...@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. > > Your option here 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.
We did this for novaclient volume attach and allowed device to be ‘auto' or the argument to be omitted. I don’t see a huge problem turning size into an optional parameter as long as it doesn’t break older scripts. Turning it from an arg into a kwarg would definitely require deprecation. Vish > > FWIW, this is why OSC changed 'volume create' to make --size an option and > make the volume name be the positional argument. > >  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. >  Bad pun alert...or is there such a thing as a bad pun??? > > dt > > -- > > Dean Troyer > dtro...@gmail.com > _______________________________________________ > OpenStack-dev mailing list > OpenStackfirstname.lastname@example.org > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ OpenStack-dev mailing list OpenStackemail@example.com http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev