Descriptionstate/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
- authEnvironManager() returning true if the authenticated user
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.
https://code.launchpad.net/~dimitern/juju-core/040-machine-api-calls-needed-by-machiner/+merge/164920
(do not edit description out of merge proposal)
Patch Set 1 #
Total comments: 48
Patch Set 2 : state/api: Machine API needed by machiner #
Total comments: 6
Patch Set 3 : state/api: Machine API needed by machiner #
MessagesTotal messages: 9
|