Merge lp:~free.ekanayaka/landscape-client-charm/workload-status into lp:landscape-client-charm
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 57 | ||||
Proposed branch: | lp:~free.ekanayaka/landscape-client-charm/workload-status | ||||
Merge into: | lp:landscape-client-charm | ||||
Diff against target: |
120 lines (+58/-5) 2 files modified
hooks/common.py (+12/-4) hooks/test_hooks.py (+46/-1) |
||||
To merge this branch: | bzr merge lp:~free.ekanayaka/landscape-client-charm/workload-status | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Adam Collard (community) | Approve | ||
Alberto Donato (community) | Approve | ||
Review via email:
|
Description of the change
This branch adds support for workload status in the client charm. The possible
situations are:
1. No account-name is set. Since this is a required user input, the unit
transitions to "blocked"
2. The juju-info file or computer-title entry are not yet there. Since
these should eventually get written automatically by the charm, the
unit transitions to the "maintenance" state.
3. The registration is successful, the unit transitions to the "active"
state.
There are some situations (e.g. missing registration key) that could
have better messages, but that would require a bit more work. I think
what's in this branch is safe and good enough for a start.
See the "Unit states" section here:
to know more about the semantics of each state.
Note that if you are using juju < 1.24 the status_set function in
charmhelpers will gracefully downgrade to a bare logging of
the message.
Looks good, +1