Wait until the API server is ready.
Retrieve the API address.
Also added --debug support (logging).
Tests: `make check`.
QA: assuming you have a local provider env
named 'local' and an ec2 one named 'ec2'
- run `.venv/bin/python juju-quickstart -e local`
-> error: the local provider is not currently supported;
- run `.venv/bin/python juju-quickstart -e no-such-env`
-> error: environment no-such-env not found in ...;
- run `juju switch ec2`;
- run `.venv/bin/python juju-quickstart --debug`
-> the debug messages are shown, the env is bootstrapped,
the API URL is printed at the end of the process.
- run `.venv/bin/python juju-quickstart`
-? like above but this time no debug messages are shown.
https://codereview.appspot.com/14441074/diff/5001/quickstart/app.py#newcode49
quickstart/app.py:49: retcode, output, error = utils.call('juju',
'status', '-e', env_name)
On 2013/10/16 15:43:40, gary.poster wrote:
> I'm OK with this for expediency, but wouldn't the API (Kapil's
library) be
> better in a revision?
> [later] Oh, it's YAML, yeah? I guess that's OK. I think it would be
nice to
> add a comment to that effect, but others might disagree. Just a
suggestion.
Good suggestion. As discussed, I will explicitly add "--format yaml"
here.
*** Submitted:
Bootstrap the Juju environment.
Wait until the API server is ready.
Retrieve the API address.
Also added --debug support (logging).
Tests: `make check`.
QA: assuming you have a local provider env
named 'local' and an ec2 one named 'ec2'
- run `.venv/bin/python juju-quickstart -e local`
-> error: the local provider is not currently supported;
- run `.venv/bin/python juju-quickstart -e no-such-env`
-> error: environment no-such-env not found in ...;
- run `juju switch ec2`;
- run `.venv/bin/python juju-quickstart --debug`
-> the debug messages are shown, the env is bootstrapped,
the API URL is printed at the end of the process.
- run `.venv/bin/python juju-quickstart`
-? like above but this time no debug messages are shown.
R=bac, gary.poster /codereview. appspot. com/14441074
CC=
https:/
https:/ /codereview. appspot. com/14441074/ diff/5001/ quickstart/ app.py
File quickstart/app.py (right):
https:/ /codereview. appspot. com/14441074/ diff/5001/ quickstart/ app.py# newcode49 app.py: 49: retcode, output, error = utils.call('juju',
quickstart/
'status', '-e', env_name)
On 2013/10/16 15:43:40, gary.poster wrote:
> I'm OK with this for expediency, but wouldn't the API (Kapil's
library) be
> better in a revision?
> [later] Oh, it's YAML, yeah? I guess that's OK. I think it would be
nice to
> add a comment to that effect, but others might disagree. Just a
suggestion.
Good suggestion. As discussed, I will explicitly add "--format yaml"
here.
https:/ /codereview. appspot. com/14441074/