Merge lp://staging/~dimitern/juju-core/040-machine-api-calls-needed-by-machiner into lp://staging/~juju/juju-core/trunk
Status: | Merged |
---|---|
Merged at revision: | 1219 |
Proposed branch: | lp://staging/~dimitern/juju-core/040-machine-api-calls-needed-by-machiner |
Merge into: | lp://staging/~juju/juju-core/trunk |
Diff against target: |
881 lines (+432/-99) 11 files modified
state/api/apiclient.go (+49/-0) state/api/error.go (+1/-0) state/api/params/params.go (+23/-1) state/api/params/params_test.go (+1/-1) state/apiserver/api_test.go (+187/-0) state/apiserver/apiserver.go (+156/-90) state/apiserver/error.go (+3/-0) state/machine.go (+5/-0) state/megawatcher.go (+1/-1) state/megawatcher_internal_test.go (+5/-5) state/presence/presence.go (+1/-1) |
To merge this branch: | bzr merge lp://staging/~dimitern/juju-core/040-machine-api-calls-needed-by-machiner |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+164920@code.staging.launchpad.net |
Description of the change
state/api: Machine API needed by machiner
This introduces several new API calls, needed by the
worker/machiner to handle machines through the API:
* Life
* EnsureDead
* SetAgentAlive
* SetStatus
In the course of this some refactoring of the API
server was in order:
* Introduced presence.Pinger support
* Watchers and pingers are now both handled as resources
which have a Stop() method
* Added a couple of root-level permission checking calls:
- authOwner(), taking an entity with a Tag() method and returning
true if the authenticated user's tag matches the entity's tag
- authEnvironMana
matches the environment manager (machine with JobManageEnviron)
Permission checks are performed to ensure only agents (or managers)
can access the new machine API calls.
A few other drive-by changes done as well as suggested.
Reviewers: mp+164920_ code.launchpad. net,
Message:
Please take a look.
Description:
state/api: Machine API needed by machiner
This introduces several new API calls, needed by the
worker/machiner to handle machines through the API:
* Life
* EnsureDead
* SetAgentAlive
* SetStatus
In the course of this some refactoring of the API ger() returning true if the authenticated user
server was in order:
* Introduced presence.Pinger support
* Watchers and pingers are now both handled as resources
which have a Stop() method
* Added a couple of root-level permission checking calls:
- authOwner(), taking an entity with a Tag() method and returning
true if the authenticated user's tag matches the entity's tag
- authEnvironMana
matches the environment manager (machine with JobManageEnviron)
Permission checks are performed to ensure only agents (or managers)
can access the new machine API calls.
https:/ /code.launchpad .net/~dimitern/ juju-core/ 040-machine- api-calls- needed- by-machiner/ +merge/ 164920
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/9614043/
Affected files: apiclient. go params/ params. go /api_test. go /apiserver. go /error. go
A [revision details]
M state/api/
M state/api/
M state/apiserver
M state/apiserver
M state/apiserver