Merge lp:~free.ekanayaka/landscape-charm/pause-action into lp:~landscape/landscape-charm/trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Free Ekanayaka | ||||
Approved revision: | 260 | ||||
Merged at revision: | 262 | ||||
Proposed branch: | lp:~free.ekanayaka/landscape-charm/pause-action | ||||
Merge into: | lp:~landscape/landscape-charm/trunk | ||||
Diff against target: |
147 lines (+59/-5) 9 files modified
Makefile (+1/-1) actions.yaml (+4/-0) actions/pause (+9/-0) charm-helpers.yaml (+1/-1) lib/callbacks/scripts.py (+2/-1) lib/paths.py (+1/-0) lib/pause.py (+18/-0) lib/tests/helpers.py (+1/-2) lib/tests/test_pause.py (+22/-0) |
||||
To merge this branch: | bzr merge lp:~free.ekanayaka/landscape-charm/pause-action | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alberto Donato (community) | Approve | ||
Данило Шеган (community) | Approve | ||
🤖 Landscape Builder | test results | Approve | |
Review via email: mp+258475@code.launchpad.net |
Commit message
Add a first simplistic implementation of the pause action.
This branch is little more than wiring code, the full semantics of the pause action will be implemented in follow-up branches (for example changing leadership).
In particular:
- add an actions/ dir containing the action pause script
- move hooks/lib and hooks/charmhelpers to the root charm dir, since this
code is shared between hooks/ and actions/
- add a lib/pause.py file implementing the behavior of the pause action
Description of the change
Add a first simplistic implementation of the pause action.
This branch is little more than wiring code, the full semantics of the pause action will be implemented in follow-up branches (for example changing leadership).
In particular:
- add an actions/ dir containing the action pause script
- move hooks/lib and hooks/charmhelpers to the root charm dir, since this
code is shared between hooks/ and actions/
- add a lib/pause.py file implementing the behavior of the pause action
To test, bootstrap a Juju environment (e.g. with local provider) and then:
make repo-file-trunk
make deploy # Wait
juju action defined landscape-server # See that the pause action is listed
juju action do landscape-server/0 pause # Services will be stopped on the unit
I'm planning to add integration tests too, but in a separate branch since I'd like to move integration tests to use zope test layers first.
Code looks good, I'll be doing a round of testing now.