https://codereview.appspot.com/11342043/diff/1/state/api/deployer/deployer_test.go#newcode53
state/api/deployer/deployer_test.go:53: s.stateAPI = s.OpenAPIAs(c,
s.machine.Tag(), "test-password")
On 2013/07/16 12:20:37, mue wrote:
> Stumbled upon this for the first time. You call it "login" in the
comment. So
> maybe LoginAsToAPI() would be better. But that's only an idea.
The idea AFAIU is that you always need to login when you open a
connection the the API server, hence the name of the function.
Please take a look.
https:/ /codereview. appspot. com/11342043/ diff/1/ state/api/ deployer/ deployer_ test.go deployer/ deployer_ test.go (right):
File state/api/
https:/ /codereview. appspot. com/11342043/ diff/1/ state/api/ deployer/ deployer_ test.go# newcode53 deployer/ deployer_ test.go: 53: s.stateAPI = s.OpenAPIAs(c,
state/api/
s.machine.Tag(), "test-password")
On 2013/07/16 12:20:37, mue wrote:
> Stumbled upon this for the first time. You call it "login" in the
comment. So
> maybe LoginAsToAPI() would be better. But that's only an idea.
The idea AFAIU is that you always need to login when you open a
connection the the API server, hence the name of the function.
https:/ /codereview. appspot. com/11342043/ diff/1/ state/api/ deployer/ deployer_ test.go# newcode135 deployer/ deployer_ test.go: 135: c.Assert(err, gc.IsNil)
state/api/
On 2013/07/16 13:00:06, fwereade wrote:
> Removal shouldn't be necessary to see the change, fwiw.
Good point, will leave only the EnsureDead call.
https:/ /codereview. appspot. com/11342043/ diff/1/ state/api/ watcher/ watcher. go watcher/ watcher. go (right):
File state/api/
https:/ /codereview. appspot. com/11342043/ diff/1/ state/api/ watcher/ watcher. go#newcode179 watcher/ watcher. go:179: stringWatcherId string
state/api/
On 2013/07/16 12:20:37, mue wrote:
> It's StringsWatcher and StringsWatchId, so plural strings. Would name
the field
> here stringsWatcherId too.
Done.
https:/ /codereview. appspot. com/11342043/ diff/1/ state/apiserver /root.go /root.go (right):
File state/apiserver
https:/ /codereview. appspot. com/11342043/ diff/1/ state/apiserver /root.go# newcode89 /root.go: 89: // TODO: There is no direct test for this
state/apiserver
On 2013/07/16 12:20:37, mue wrote:
> // TODO(dimitern) ...
Done.
https:/ /codereview. appspot. com/11342043/ diff/1/ state/machine. go
File state/machine.go (right):
https:/ /codereview. appspot. com/11342043/ diff/1/ state/machine. go#newcode163 go:163: if !strings. HasPrefix( tag, machineTagPrefix) {
state/machine.
On 2013/07/16 12:20:37, mue wrote:
> How does code calling this function react when "" is returned? Maybe
it's better
> to return an error too.
> MachineIdFromTa g(tag string) (string, error)
I didn't want to change the signature, but I added a test for that. I'll
add a TODO for your suggestion as a possible future improvement.
https:/ /codereview. appspot. com/11342043/ diff/1/ state/unit. go
File state/unit.go (right):
https:/ /codereview. appspot. com/11342043/ diff/1/ state/unit. go#newcode635 HasPrefix( tag, unitTagPrefix) {
state/unit.go:635: if !strings.
On 2013/07/16 12:20:37, mue wrote:
> Same as said for machine here.
Same answer :)
https:/ /codereview. appspot. com/11342043/