API change: juju CLI support for adding/removing multiple service units at once

Clint Byrum clint at ubuntu.com
Wed Nov 16 22:26:37 UTC 2011


Excerpts from Gustavo Niemeyer's message of Wed Nov 16 12:49:13 -0800 2011:
> > https://bugs.launchpad.net/juju/+bug/809599. This branch modifies juju
> > add-unit and juju deploy so that they take a --num-units option (short
> > flag is -n) to specify the desired number of units to add. In addition,
> 
> It certainly sounds tasteful to have an argument on add-unit and
> deploy and also supporting multiple arguments on remove-unit.
> 
> Can we please have just the -n option, though?  The long form isn't
> necessary in this case IMO.
> 

Agreed, if it stands then -n would be a welcome addition.

Crazy idea..Is there any reason this isn't just an optional positional
argument?  With the restrictions on service names and charm names,
we can just say any positive integer given to add-unit or deploy is a
number of units.

juju add-unit 5 wordpress juju deploy hadoop-slave 20

Seems like this would be easy to implement and document, and leaves us
with a much cleaner syntax.. the less --'s and -'s, the more natural
juju feels, which has always been one of the things I've always liked
about the CLI (--repository, for instance, has always felt clunky).

I can't think of anything else that would be implied by numbers passed
to these commands. Thoughts?



More information about the Juju mailing list