Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5539)

Issue 13501051: apiserver/provisioner: Rest of server-side API (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 7 months ago by dimitern
Modified:
10 years, 7 months ago
Reviewers:
mp+186355, fwereade, rog
Visibility:
Public.

Description

apiserver/provisioner: Rest of server-side API This completes the required server-side API calls for the provisioner: Series, Constraints, InstanceId, SetProvisioned, WatchEnvironMachines, Status, EnvironConfig, and WatchForEnvironConfigChanges. A drive-by fix was done to state and apiserver to make handling NotProvisionedErrors from state easiert. https://code.launchpad.net/~dimitern/juju-core/141-apiserver-provisioner-2/+merge/186355 Requires: https://code.launchpad.net/~dimitern/juju-core/140-provisioner-watchforenvironconfigchanges/+merge/186306 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 24

Patch Set 2 : apiserver/provisioner: Rest of server-side API #

Patch Set 3 : apiserver/provisioner: Rest of server-side API #

Unified diffs Side-by-side diffs Delta from patch set Stats (+498 lines, -40 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/jujud/machine_test.go View 1 chunk +1 line, -1 line 0 comments Download
M state/api/params/internal.go View 4 chunks +50 lines, -0 lines 0 comments Download
M state/apiserver/admin.go View 1 chunk +1 line, -1 line 0 comments Download
M state/apiserver/common/errors.go View 3 chunks +2 lines, -2 lines 0 comments Download
M state/apiserver/common/errors_test.go View 1 chunk +1 line, -1 line 0 comments Download
M state/apiserver/provisioner/provisioner.go View 1 2 3 chunks +170 lines, -9 lines 0 comments Download
M state/apiserver/provisioner/provisioner_test.go View 1 4 chunks +239 lines, -9 lines 0 comments Download
M state/apiserver/server_test.go View 4 chunks +9 lines, -3 lines 0 comments Download
M state/apiserver/testing/errors.go View 1 chunk +7 lines, -0 lines 0 comments Download
M state/machine.go View 1 4 chunks +16 lines, -14 lines 0 comments Download

Messages

Total messages: 6
dimitern
Please take a look.
10 years, 7 months ago (2013-09-18 15:08:55 UTC) #1
rog
Looking good. Some comments and suggestions below. https://codereview.appspot.com/13501051/diff/1/state/api/params/internal.go File state/api/params/internal.go (right): https://codereview.appspot.com/13501051/diff/1/state/api/params/internal.go#newcode124 state/api/params/internal.go:124: type Config ...
10 years, 7 months ago (2013-09-19 12:48:06 UTC) #2
fwereade
A few comments further to rog's https://codereview.appspot.com/13501051/diff/1/state/api/params/internal.go File state/api/params/internal.go (right): https://codereview.appspot.com/13501051/diff/1/state/api/params/internal.go#newcode296 state/api/params/internal.go:296: Info string heads ...
10 years, 7 months ago (2013-09-19 13:24:05 UTC) #3
dimitern
Please take a look. https://codereview.appspot.com/13501051/diff/1/state/api/params/internal.go File state/api/params/internal.go (right): https://codereview.appspot.com/13501051/diff/1/state/api/params/internal.go#newcode124 state/api/params/internal.go:124: type Config map[string]interface{} On 2013/09/19 ...
10 years, 7 months ago (2013-09-19 13:58:16 UTC) #4
rog
LGTM with one final suggestion. https://codereview.appspot.com/13501051/diff/1/state/api/params/internal.go File state/api/params/internal.go (right): https://codereview.appspot.com/13501051/diff/1/state/api/params/internal.go#newcode124 state/api/params/internal.go:124: type Config map[string]interface{} On ...
10 years, 7 months ago (2013-09-19 14:22:25 UTC) #5
dimitern
10 years, 7 months ago (2013-09-19 14:26:46 UTC) #6
Please take a look.

https://codereview.appspot.com/13501051/diff/1/state/apiserver/provisioner/pr...
File state/apiserver/provisioner/provisioner.go (right):

https://codereview.appspot.com/13501051/diff/1/state/apiserver/provisioner/pr...
state/apiserver/provisioner/provisioner.go:174: status, info, err =
machine.Status()
On 2013/09/19 14:22:25, rog wrote:
> On 2013/09/19 13:58:16, dimitern wrote:
> > On 2013/09/19 12:48:06, rog wrote:
> > > result.Results[i].Status, result.Results[i].Info, err = machine.Status()
> > > 
> > > ?
> > > 
> > > (it should be fine to rely on the zero values returned by machine.Status
on
> > > error).
> > 
> > I'd prefer not to make the line so long and hard to read. I've defined info
as
> > var string, as fwereade suggested.
> 
> One more suggestion, still 2 lines instead of 7, and
> easy to read I think:
> 
> r := &result.Results[i]
> r.Status, r.Info, err = machine.Status()

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b