lp:~frankban/juju-quickstart/jujuutils

Created by Francesco Banconi and last modified
Get this branch:
bzr branch lp:~frankban/juju-quickstart/jujuutils
Only Francesco Banconi can upload to this branch. If you are Francesco Banconi please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Francesco Banconi
Project:
juju-quickstart
Status:
Merged

Recent revisions

121. By Francesco Banconi

done

120. By Francesco Banconi

done

119. By Francesco Banconi

Avoid requiring sudo privileges on lbox submit.

R=
CC=
https://codereview.appspot.com/199470043

118. By Francesco Banconi

Make ftests fail if Juju env is not ready.

The functional tests are no longer silently skipped
if the default Juju environment cannot be found.

Also fail if the environment is running, as this
would cause it to be destroyed at the end of the
suite.

QA:
- bootstrap your default environment;
- run `make ftest`/`make fcheck` and ensure
  the functional tests fail
  (environment already bootstrapped);
- destroy your environment;
- run `make fcheck` again and ensure all the
  suites complete successfully.

R=jeff.pihach, kadams54
CC=
https://codereview.appspot.com/195690043

117. By Francesco Banconi

Enable tests for trusty and utopic.

Fix the unit test suite so that tests pass
when run in trusty and utopic scenarios.

Also add some simple functional tests. In those
tests, Quickstart is run against a real Juju env.

See the changes in the HACKING file for instructions
about running functional tests.

To QA this, run `make check` and `make fcheck`: the
latter can take some time.

R=bac, jeff.pihach
CC=
https://codereview.appspot.com/197240043

116. By Francesco Banconi

Introduce tox for testing multiple sets of deps.

Quickstart must be run on several platforms/Ubuntu series,
each one with its own versions of the packages that
Quickstart depends on. The tox utility is used for both:
- handling those kind of separate scenarios;
- creating the development virtual environments.
The latter was previously done using virtualenv directly
in the Makefile. The new infrastructure should be
more flexible.

Update the relevant parts of the Makefile, also handling
the automatic installation of system dependencies.

Implement the ability to calculate the requirements
for the PyPI package automatically by parsing the
tox.ini file. I am not really sure about the method I
used (take a look at the setup.py file), but the
alternative is to manually update those and violate DRY.
I think we could give it a try and fall back to the
manual approach if required.

Also implement a correct behavior for
"python setup.py test", which now runs all the tests.

To test and QA this branch, run `make clean` and then
follow what described in the HACKING.rst file, in the
following paragraphs:
- Creating a development environment
- Testing and debugging the application
- Requirements
- Updating application and test dependencies

Thank you!

R=bac, benjamin.saller, jeff.pihach
CC=
https://codereview.appspot.com/189580044

115. By Francesco Banconi

Fix failing test on MacOS.

Also update docs to include vivid.

Tests: `make check`.
No QA required.

R=bac, martin.hilton
CC=
https://codereview.appspot.com/191640043

114. By Francesco Banconi

Use charm store API to retrieve GUI revision.

This branch includes the following small fixes
in preparation for the 1.6 release:

- bump version up to 1.6.0;
- use the charm store API to retrieve the URL
  of the last revision of the juju-gui charm;
- add initial support for vivid: the new series can now
  be selected as default bootstrap node series when
  creating/editing environments.

  Tests: `make check`.

  QA:
  - just run `.venv/bin/python juju-quickstart` as
    usual, locally and on a ec2 environment
    (it would be nice if both precise and trusty
    are used as default series in this QA); check
    that vivid can be added as a default-series
    in the environment edit view; check that
    the last Juju GUI revision is correctly retrieved.

R=martin.hilton, rog
CC=
https://codereview.appspot.com/197740043

113. By Francesco Banconi

Jenv files removal functionality.

Add the ability to remove jenv files
from the Juju home.

Test: `make check`.

QA:
- `juju bootstrap` an environment;
- create a new user for the environment:
  `juju user add myuser --generate -o ~/.juju/environments/myenv`;
- run quickstart in interactive mode:
  `.venv/bin/python juju-quickstart -i`;
- the "myenv" environment should be listed under
  "Other active environments": select it;
- ensure the corresponding environment description in
  the jenv detail view makes sense;
- click to remove the environment, cancel the removal in the
  confirm dialog and ensure the environment is still there;
- click the "remove" button again, confirm the deletion and
  ensure that a message is displayed and the environment
  file has been deleted. Also quickstart redirects to the
  environments index view and "myenv" is no longer there;
- destroy the environment: done, thank you!

R=martin.hilton, bac
CC=
https://codereview.appspot.com/189540043

112. By Francesco Banconi

Reorganize view code.

Replace most of the view closures with external
private functions.
This has several good side effects in my opinion:
- view functions are shorter;
- we know which objects are used for each callback
  function, because we need to explicitly pass them
  as arguments;
- external functions can be reused by multiple views
  if required (and we have the _use example here);
- if an external callback become less straightforward,
  it is now possible to directly unit test it.

Tests: `make check`.

QA:
If unit tests pass we have some confidence that
the interactive session is not broken.
However, some time spent on it would be great,
creating/editing/destroying environments, setting
them as default, canceling the changes, starting
one of them, etc...
Thanks a lot.

R=matthew.scott, bac
CC=
https://codereview.appspot.com/194080043

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:juju-quickstart
This branch contains Public information 
Everyone can see this information.