https://codereview.appspot.com/102970043/diff/1/state/api/usermanager/client_test.go#newcode42
> state/api/usermanager/client_test.go:42: err :=
s.APIState.Call("UserManager",
> "", "AddUser", userArgs, results)
> Maybe add a comment here about why s.APIState.Call("UserManager",...)
is used
> here instead of s.usermanager.AddUser()? I understand why but had to
think about
> it for a bit.
https://codereview.appspot.com/102970043/diff/1/state/apiserver/charms_test.go#oldcode39
> state/apiserver/charms_test.go:39: password, err :=
utils.RandomPassword()
> Play devil's advocate: this change means the user has a fixed password
instead
> of a random one. Are you sure that doesn't negatively impact any
existing tests?
> I can't think of why it would but it is a test functionality change.
LGTM. Just one suggestion inline. The bulk of the changes look to be
updating AddUser to take an extra arg. As to schema migration support, I
think adding fields is fine - its when we change or remove them that
things get tricky. It's good to see juju/errors package being used.
At what point will Tag be able to be dropped? Will it be the next
release of Juju that break backwards compatibility or will the API have
its own versioning?
On 2014/06/03 05:17:26, menn0 wrote:
> LGTM - only minor comments and praise added in-line. The user add
tests look
> much better.
> One thing: can this actually land without schema migration support?
> https:/ /codereview. appspot. com/102970043/ diff/1/ cmd/juju/ user_add. go user_add. go (left):
> File cmd/juju/
https:/ /codereview. appspot. com/102970043/ diff/1/ cmd/juju/ user_add. go#oldcode44 user_add. go:44: Args: "<username> <password>",
> cmd/juju/
> Sorry for missing this when I implemented --password
> https:/ /codereview. appspot. com/102970043/ diff/1/ cmd/juju/ user_add. go user_add. go (right):
> File cmd/juju/
https:/ /codereview. appspot. com/102970043/ diff/1/ cmd/juju/ user_add. go#newcode109 user_add. go:109: return err
> cmd/juju/
> errors.Trace() here too?
https:/ /codereview. appspot. com/102970043/ diff/1/ state/api/ usermanager/ client. go usermanager/ client. go (left):
> File state/api/
https:/ /codereview. appspot. com/102970043/ diff/1/ state/api/ usermanager/ client. go#oldcode37 usermanager/ client. go:37: p := EntityPasswords {Changes: EntityPassword{ u}}
> state/api/
params.
> []params.
> These names were terrible! Glad you've fixed it.
https:/ /codereview. appspot. com/102970043/ diff/1/ state/api/ usermanager/ client. go usermanager/ client. go (right):
> File state/api/
https:/ /codereview. appspot. com/102970043/ diff/1/ state/api/ usermanager/ client. go#newcode37 usermanager/ client. go:37: Changes: ModifyUser{ {Username:
> state/api/
[]params.
> username, DisplayName: displayName, Password: password}},
> This is much more readable.
https:/ /codereview. appspot. com/102970043/ diff/1/ state/api/ usermanager/ client_ test.go usermanager/ client_ test.go (right):
> File state/api/
https:/ /codereview. appspot. com/102970043/ diff/1/ state/api/ usermanager/ client_ test.go# newcode42 usermanager/ client_ test.go: 42: err := Call("UserManag er", Call("UserManag er",... ) AddUser( )? I understand why but had to
> state/api/
s.APIState.
> "", "AddUser", userArgs, results)
> Maybe add a comment here about why s.APIState.
is used
> here instead of s.usermanager.
think about
> it for a bit.
https:/ /codereview. appspot. com/102970043/ diff/1/ state/apiserver /charms_ test.go /charms_ test.go (left):
> File state/apiserver
https:/ /codereview. appspot. com/102970043/ diff/1/ state/apiserver /charms_ test.go# oldcode39 /charms_ test.go: 39: password, err := sword()
> state/apiserver
utils.RandomPas
> Play devil's advocate: this change means the user has a fixed password
instead
> of a random one. Are you sure that doesn't negatively impact any
existing tests?
> I can't think of why it would but it is a test functionality change.
> https:/ /codereview. appspot. com/102970043/ diff/1/ state/user_ test.go
> File state/user_test.go (right):
https:/ /codereview. appspot. com/102970043/ diff/1/ state/user_ test.go# newcode45 test.go: 45: func (s *UserSuite) makeUser(c *gc.C)
> state/user_
*state.User {
> addSomeUser might be a better name, indicating that a test/throwaway
user is
> being created. It also hints at the username being used.
LGTM. Just one suggestion inline. The bulk of the changes look to be
updating AddUser to take an extra arg. As to schema migration support, I
think adding fields is fine - its when we change or remove them that
things get tricky. It's good to see juju/errors package being used.
At what point will Tag be able to be dropped? Will it be the next
release of Juju that break backwards compatibility or will the API have
its own versioning?
https:/ /codereview. appspot. com/102970043/