|
|
|
namespace can be set via environment variable
This infers default values for scheme, user, series from the an env var for
assembling a charm url based on what's provided on the cli for a charm name.
Based on clint's namespace-from-env branch. Refactored the defaults extraction
to a helper function.
https://code.launchpad.net/~hazmat/juju/ns-from-env/+merge/101381
(do not edit description out of merge proposal)
Patch Set 1 #
Total comments: 1
Total messages: 4
|
hazmat
Please take a look.
|
13 years, 9 months ago (2012年04月10日 14:18:23 UTC) #1 | ||||||||||||||||||||||||||||||||||||||||||||||||||
Please take a look.
https://codereview.appspot.com/5990067/diff/1/juju/charm/tests/test_url.py File juju/charm/tests/test_url.py (right): https://codereview.appspot.com/5990067/diff/1/juju/charm/tests/test_url.py#ne... juju/charm/tests/test_url.py:129: "name", "local", None, "default", "name", None, 'local') As discussed in the thread in the mailing list, can we please support these forms only: 1) scheme: (not "scheme" without colon.. that's potentially ambiguous with series) 2) scheme:series or scheme:series/ (e.g. local:oneiric, or cs:oneiric/) 3) scheme:~user/series, or scheme:~user/series/ (e.g. cs:~spamaps/oneiric/)
On Tue, Apr 10, 2012 at 10:35 AM, <n13m3y3r@gmail.com> wrote: > > https://codereview.appspot.**com/5990067/diff/1/juju/charm/** > tests/test_url.py<https://codereview.appspot.com/5990067/diff/1/juju/charm/tests/test_url.py> > File juju/charm/tests/test_url.py (right): > > https://codereview.appspot.**com/5990067/diff/1/juju/charm/** > tests/test_url.py#newcode129<https://codereview.appspot.com/5990067/diff/1/juju/charm/tests/test_url.py#newcode129> > juju/charm/tests/test_url.py:**129: "name", "local", None, "default", > "name", None, 'local') > As discussed in the thread in the mailing list, can we please support > these forms only: > > 1) scheme: (not "scheme" without colon.. that's potentially ambiguous > with series) > why is scheme without a colon ambigious, scheme is required here, series is optional and must be specified with a preceding scheme: > 2) scheme:series or scheme:series/ (e.g. local:oneiric, or cs:oneiric/) 3) scheme:~user/series, or scheme:~user/series/ (e.g. > cs:~spamaps/oneiric/) > > i'll add the trailing slash support. thanks for the review.
On 2012年04月10日 14:39:13, hazmat wrote: > > 1) scheme: (not "scheme" without colon.. that's potentially ambiguous > > with series) > > why is scheme without a colon ambigious, scheme is required here, series is > optional and must be specified with a preceding scheme: Because people are allowed to provide it in the command line. They type "juju deploy series/foo". It sounds very plausible to do "A=series juju deploy foo" as well, but that's incorrect, and should be flagged as such. Requiring the colon is a cheap way to make that obvious. Btw, if you disagree with the discussed design, would you mind to bring it up so that we have a chance to talk about it? I'm getting a bit concerned that we haven't really been talking about all those features, and I've been catching up disagreements just by chance in notes passing by.