Code review comment for lp:~frankban/juju-quickstart/envs-backup

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

*** Submitted:

Create a backup copy of the envs file.

In a pre-imp call with Gary, we decided the
following strategy: a backup copy of the
environments.yaml file is created once per
quickstart session the first time environments
are changed by the user. This way we prevent the
original backup to be overwritten if the user
makes two subsequent changes to the envs.

Tests: `make check`.

QA:

- Create a backup copy of your environments file:
   `cp ~/.juju/environments.yaml ~/environments.yaml.bak`.

- Run `.venv/bin/python juju-quickstart -i`, select one
   of your environments, exit with ^X without changing anything.
   Check your original file has not been changed.

- Run `.venv/bin/python juju-quickstart -i`, change something
   (e.g. create, remove or change an environment, or just change
   the default one). Change at least two environments.
   Exit with ^X. The envs.yaml file now should be the one
   generated by quickstart and should reflect your changes.
   It also includes the path to the backup copy, which
   should be your original file.

- Restore your original environments file:
   `mv ~/environments.yaml.bak ~/.juju/environments.yaml`.

Done, thank you!

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

https://codereview.appspot.com/51520043/

« Back to merge proposal