Merge lp:~frankban/juju-quickstart/envs-backup into lp:juju-quickstart
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 45 | ||||
Proposed branch: | lp:~frankban/juju-quickstart/envs-backup | ||||
Merge into: | lp:juju-quickstart | ||||
Diff against target: |
244 lines (+114/-9) 6 files modified
quickstart/manage.py (+4/-1) quickstart/models/envs.py (+18/-4) quickstart/tests/models/test_envs.py (+45/-0) quickstart/tests/test_manage.py (+13/-4) quickstart/tests/test_utils.py (+19/-0) quickstart/utils.py (+15/-0) |
||||
To merge this branch: | bzr merge lp:~frankban/juju-quickstart/envs-backup | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju GUI Hackers | Pending | ||
Review via email: mp+201449@code.launchpad.net |
Description of the change
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/
- 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.
Done, thank you!
Reviewers: mp+201449_ code.launchpad. net,
Message:
Please take a look.
Description:
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: environments. yaml ~/environments. yaml.bak` .
`cp ~/.juju/
- 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: yaml.bak ~/.juju/ environments. yaml`.
`mv ~/environments.
Done, thank you!
https:/ /code.launchpad .net/~frankban/ juju-quickstart /envs-backup/ +merge/ 201449
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/51520043/
Affected files (+116, -9 lines): manage. py models/ envs.py tests/models/ test_envs. py tests/test_ manage. py tests/test_ utils.py
A [revision details]
M quickstart/
M quickstart/
M quickstart/
M quickstart/
M quickstart/
M quickstart/utils.py