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

Issue 10949046: apiserver: Deployer facade; refactoring (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 10 months ago by dimitern
Modified:
10 years, 9 months ago
Reviewers:
mue, mp+174144, jameinel, fwereade
Visibility:
Public.

Description

apiserver: Deployer facade; refactoring This introduces the server-side Deployer API facade. In addition to being composed by LifeGetter, Remover, and PasswordChanger, it has WatchUnits method. Also extracted the common ErrUnauthorized case into its own common testing package and refactored other facades to use it. Removed assertError and replaced it with DeepEquals, because I think it stands out more and reads better. https://code.launchpad.net/~dimitern/juju-core/069-apiserver-deployer-initial/+merge/174144 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 38

Patch Set 2 : apiserver: Deployer facade; refactoring #

Total comments: 6

Patch Set 3 : apiserver: Deployer facade; refactoring #

Unified diffs Side-by-side diffs Delta from patch set Stats (+566 lines, -99 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M state/api/params/internal.go View 1 chunk +6 lines, -0 lines 0 comments Download
M state/apiserver/common/interfaces.go View 1 chunk +3 lines, -0 lines 0 comments Download
M state/apiserver/common/life_test.go View 1 2 2 chunks +4 lines, -9 lines 0 comments Download
M state/apiserver/common/password_test.go View 1 2 chunks +7 lines, -8 lines 0 comments Download
M state/apiserver/common/remove.go View 1 2 chunks +6 lines, -0 lines 0 comments Download
M state/apiserver/common/remove_test.go View 1 2 5 chunks +20 lines, -16 lines 0 comments Download
A state/apiserver/deployer/deployer.go View 1 1 chunk +105 lines, -0 lines 0 comments Download
A state/apiserver/deployer/deployer_test.go View 1 2 1 chunk +303 lines, -0 lines 0 comments Download
M state/apiserver/machine/agent_test.go View 1 3 chunks +15 lines, -19 lines 0 comments Download
M state/apiserver/machine/common_test.go View 1 3 chunks +3 lines, -3 lines 0 comments Download
M state/apiserver/machine/machiner_test.go View 1 7 chunks +32 lines, -25 lines 0 comments Download
M state/apiserver/root.go View 1 chunk +7 lines, -0 lines 0 comments Download
A state/apiserver/testing/errors.go View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
M state/apiserver/testing/fakeauthorizer.go View 1 chunk +4 lines, -0 lines 0 comments Download
M state/apiserver/upgrader/upgrader.go View 1 chunk +2 lines, -2 lines 0 comments Download
M state/apiserver/upgrader/upgrader_test.go View 1 6 chunks +6 lines, -12 lines 0 comments Download
M state/state.go View 1 2 3 chunks +16 lines, -4 lines 0 comments Download
M state/unit.go View 1 chunk +12 lines, -1 line 0 comments Download

Messages

Total messages: 10
dimitern
Please take a look.
10 years, 10 months ago (2013-07-11 09:49:14 UTC) #1
mue
LGTM, only some questions. https://codereview.appspot.com/10949046/diff/1/state/api/params/internal.go File state/api/params/internal.go (right): https://codereview.appspot.com/10949046/diff/1/state/api/params/internal.go#newcode126 state/api/params/internal.go:126: // StringsWatchResults holds the results ...
10 years, 10 months ago (2013-07-11 10:02:55 UTC) #2
jameinel
If I understand the goal of William's getCanChange work, it is because we expect an ...
10 years, 10 months ago (2013-07-11 10:26:36 UTC) #3
jameinel
I just realized that the permission checks apply to Remove and those apis *not* to ...
10 years, 10 months ago (2013-07-11 10:27:27 UTC) #4
jameinel
Some updates about where I was misunderstanding the code. https://codereview.appspot.com/10949046/diff/1/state/apiserver/deployer/deployer.go File state/apiserver/deployer/deployer.go (right): https://codereview.appspot.com/10949046/diff/1/state/apiserver/deployer/deployer.go#newcode75 state/apiserver/deployer/deployer.go:75: ...
10 years, 10 months ago (2013-07-11 10:31:44 UTC) #5
fwereade
Looking great, only one substantial issue (let's block remove of Alive units) and one that's ...
10 years, 10 months ago (2013-07-11 13:44:59 UTC) #6
dimitern
Please take a look. https://codereview.appspot.com/10949046/diff/1/state/api/params/internal.go File state/api/params/internal.go (right): https://codereview.appspot.com/10949046/diff/1/state/api/params/internal.go#newcode126 state/api/params/internal.go:126: // StringsWatchResults holds the results ...
10 years, 10 months ago (2013-07-11 15:14:16 UTC) #7
jameinel
LGTM https://codereview.appspot.com/10949046/diff/1/state/apiserver/common/life_test.go File state/apiserver/common/life_test.go (right): https://codereview.appspot.com/10949046/diff/1/state/apiserver/common/life_test.go#newcode15 state/apiserver/common/life_test.go:15: apitesting "launchpad.net/juju-core/state/apiserver/testing" On 2013/07/11 15:14:17, dimitern wrote: > ...
10 years, 10 months ago (2013-07-11 15:51:12 UTC) #8
fwereade
LGTM, just trivials. https://codereview.appspot.com/10949046/diff/9001/state/apiserver/deployer/deployer_test.go File state/apiserver/deployer/deployer_test.go (right): https://codereview.appspot.com/10949046/diff/9001/state/apiserver/deployer/deployer_test.go#newcode276 state/apiserver/deployer/deployer_test.go:276: // Not make the subordinate dead ...
10 years, 9 months ago (2013-07-12 14:05:56 UTC) #9
dimitern
10 years, 9 months ago (2013-07-12 14:21:06 UTC) #10
Please take a look.

https://codereview.appspot.com/10949046/diff/9001/state/apiserver/deployer/de...
File state/apiserver/deployer/deployer_test.go (right):

https://codereview.appspot.com/10949046/diff/9001/state/apiserver/deployer/de...
state/apiserver/deployer/deployer_test.go:276: // Not make the subordinate dead
and try again.
On 2013/07/12 14:05:56, fwereade wrote:
> s/Not/Now/

Done.

https://codereview.appspot.com/10949046/diff/9001/state/apiserver/testing/err...
File state/apiserver/testing/errors.go (right):

https://codereview.appspot.com/10949046/diff/9001/state/apiserver/testing/err...
state/apiserver/testing/errors.go:10: var ErrUnauthorized *params.Error =
&params.Error{
On 2013/07/12 14:05:56, fwereade wrote:
> s/*params.Error //

Done.

https://codereview.appspot.com/10949046/diff/9001/state/state.go
File state/state.go (right):

https://codereview.appspot.com/10949046/diff/9001/state/state.go#newcode603
state/state.go:603: return nil, fmt.Errorf("entity %q does not support
removing", tag)
On 2013/07/12 14:05:56, fwereade wrote:
> s/removing/removal/

Done.
Sign in to reply to this message.

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