Merge lp://staging/~dimitern/juju-core/041-provisioner-api-calls into lp://staging/~juju/juju-core/trunk

Proposed by Dimiter Naydenov
Status: Rejected
Rejected by: Dimiter Naydenov
Proposed branch: lp://staging/~dimitern/juju-core/041-provisioner-api-calls
Merge into: lp://staging/~juju/juju-core/trunk
Diff against target: 1624 lines (+1084/-133)
4 files modified
state/api/apiclient.go (+309/-47)
state/api/params/params.go (+51/-0)
state/apiserver/api_test.go (+483/-76)
state/apiserver/apiserver.go (+241/-10)
To merge this branch: bzr merge lp://staging/~dimitern/juju-core/041-provisioner-api-calls
Reviewer Review Type Date Requested Status
Juju Engineering Pending
Review via email: mp+165566@code.staging.launchpad.net

Description of the change

state/api: Implement provisioner API calls

This adds more API objects and calls, as needed by
the provisioner:
* LifecycleWatcher
* EnvironConfigWatcher
* All client-side watchers were refactored to reduce
  code duplication and make adding new ones and also
  maintaining them much easier.
* State object at top-level (like Machine, Unit, Client).
* State.AllMachines
* State.WatchMachines - using LifecycleWatcher
* State.WatchEnvironConfig - using EnvironConfigWatcher
* Machine.Series
* Machine.Remove
* Machine.Status
* Machine.SetProvisioned
* Machine.SetMongoPassword
* Machine.Constraints

Calling Machine.EnsureDead now allowed for both owning
agents and the environment manager.

Most restrictive permission checks implemented for
Machine.Constraints, .Status, .SetProvisioned and
.SetMongoPassword (environment manager only allowed).
For some of them we might relax the restriction in
the future, as needed, so the owning agent can also
call them.

https://codereview.appspot.com/9721043/

To post a comment you must log in.
Revision history for this message
Dimiter Naydenov (dimitern) wrote :

Reviewers: mp+165566_code.launchpad.net,

Message:
Please take a look.

Description:
state/api: Implement provisioner API calls

This adds more API objects and calls, as needed by
the provisioner:
* LifecycleWatcher
* EnvironConfigWatcher
* All client-side watchers were refactored to reduce
   code duplication and make adding new ones and also
   maintaining them much easier.
* State object at top-level (like Machine, Unit, Client).
* State.AllMachines
* State.WatchMachines - using LifecycleWatcher
* State.WatchEnvironConfig - using EnvironConfigWatcher
* Machine.Series
* Machine.Remove
* Machine.Status
* Machine.SetProvisioned
* Machine.SetMongoPassword
* Machine.Constraints

Calling Machine.EnsureDead now allowed for both owning
agents and the environment manager.

Most restrictive permission checks implemented for
Machine.Constraints, .Status, .SetProvisioned and
.SetMongoPassword (environment manager only allowed).
For some of them we might relax the restriction in
the future, as needed, so the owning agent can also
call them.

https://code.launchpad.net/~dimitern/juju-core/041-provisioner-api-calls/+merge/165566

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/9721043/

Affected files:
   A [revision details]
   M state/api/apiclient.go
   M state/api/params/params.go
   M state/apiserver/api_test.go
   M state/apiserver/apiserver.go

Revision history for this message
Dimiter Naydenov (dimitern) wrote :

On 2013/05/24 10:15:52, dimitern wrote:
> Please take a look.

I didn't realize the diff is so big. I'll split it in several CLs for
easier reviewing. Please disregard this one.

https://codereview.appspot.com/9721043/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches