Merge lp://staging/~frankban/juju-quickstart/version-handling into lp://staging/juju-quickstart

Proposed by Francesco Banconi
Status: Merged
Merged at revision: 56
Proposed branch: lp://staging/~frankban/juju-quickstart/version-handling
Merge into: lp://staging/juju-quickstart
Diff against target: 669 lines (+159/-159)
8 files modified
quickstart/__init__.py (+1/-1)
quickstart/app.py (+35/-39)
quickstart/manage.py (+12/-3)
quickstart/settings.py (+3/-0)
quickstart/tests/test_app.py (+67/-89)
quickstart/tests/test_manage.py (+31/-14)
quickstart/tests/test_utils.py (+6/-9)
quickstart/utils.py (+4/-4)
To merge this branch: bzr merge lp://staging/~frankban/juju-quickstart/version-handling
Reviewer Review Type Date Requested Status
Juju GUI Hackers Pending
Review via email: mp+210395@code.staging.launchpad.net

Description of the change

Improve version handling.

Modify the app.ensure_dependencies function
so that it returns the Juju version tuple.
This way we allow for reusing the version
through the app and we can avoid calling
"juju version" multiple times.

Support local environments by installing
the juju-local meta-package in place of
specific packages (e.g. lxc, mongo).
This way we don't have to update quickstart
if core devs introduce new local env
dependencies.

Fix the destroy-environment message displayed
at the end of the process. The -e flag is
included when an old Juju is used.

Tests: `make check`.

QA: no strictly required.
Use .venv/bin/python juju-quickstart, check everything
works well, check the destroy-environment message
at the end of the process.

https://codereview.appspot.com/74010044/

To post a comment you must log in.
Revision history for this message
Francesco Banconi (frankban) wrote :

Reviewers: mp+210395_code.launchpad.net,

Message:
Please take a look.

Description:
Improve version handling.

Modify the app.ensure_dependencies function
so that it returns the Juju version tuple.
This way we allow for reusing the version
through the app and we can avoid calling
"juju version" multiple times.

Support local environments by installing
the juju-local meta-package in place of
specific packages (e.g. lxc, mongo).
This way we don't have to update quickstart
if core devs introduce new local env
dependencies.

Fix the destroy-environment message displayed
at the end of the process. The -e flag is
included when an old Juju is used.

Tests: `make check`.

QA: no strictly required.
Use .venv/bin/python juju-quickstart, check everything
works well, check the destroy-environment message
at the end of the process.

https://code.launchpad.net/~frankban/juju-quickstart/version-handling/+merge/210395

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/74010044/

Affected files (+161, -159 lines):
   A [revision details]
   M quickstart/__init__.py
   M quickstart/app.py
   M quickstart/manage.py
   M quickstart/settings.py
   M quickstart/tests/test_app.py
   M quickstart/tests/test_manage.py
   M quickstart/tests/test_utils.py
   M quickstart/utils.py

Revision history for this message
Richard Harding (rharding) wrote :

LGTM will qa as well.

https://codereview.appspot.com/74010044/diff/1/quickstart/settings.py
File quickstart/settings.py (right):

https://codereview.appspot.com/74010044/diff/1/quickstart/settings.py#newcode34
quickstart/settings.py:34: # The path to the Juju command.
can/should we get this via `which juju`? I guess it shouldn't change.

https://codereview.appspot.com/74010044/

Revision history for this message
Richard Harding (rharding) wrote :

QA ok doing a local env post 1.17.2 thanks!

https://codereview.appspot.com/74010044/

Revision history for this message
Francesco Banconi (frankban) wrote :

Thank you for the review!

https://codereview.appspot.com/74010044/diff/1/quickstart/settings.py
File quickstart/settings.py (right):

https://codereview.appspot.com/74010044/diff/1/quickstart/settings.py#newcode34
quickstart/settings.py:34: # The path to the Juju command.
On 2014/03/11 13:24:24, rharding wrote:
> can/should we get this via `which juju`? I guess it shouldn't change.

We can but I am not sure we should. We call juju with sudo, and we use
the complete path for that security reason. AFAICT using `which` would
reintroduce the problem ,and at that point it would be easier to just
call `juju`.

https://codereview.appspot.com/74010044/

Revision history for this message
Madison Scott-Clary (makyo) wrote :

LGTM, thanks for the clean-up!

https://codereview.appspot.com/74010044/

Revision history for this message
Francesco Banconi (frankban) wrote :

*** Submitted:

Improve version handling.

Modify the app.ensure_dependencies function
so that it returns the Juju version tuple.
This way we allow for reusing the version
through the app and we can avoid calling
"juju version" multiple times.

Support local environments by installing
the juju-local meta-package in place of
specific packages (e.g. lxc, mongo).
This way we don't have to update quickstart
if core devs introduce new local env
dependencies.

Fix the destroy-environment message displayed
at the end of the process. The -e flag is
included when an old Juju is used.

Tests: `make check`.

QA: no strictly required.
Use .venv/bin/python juju-quickstart, check everything
works well, check the destroy-environment message
at the end of the process.

R=rharding, matthew.scott
CC=
https://codereview.appspot.com/74010044

https://codereview.appspot.com/74010044/

Revision history for this message
Francesco Banconi (frankban) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches