https://codereview.appspot.com/86010044/diff/20001/state/state.go#newcode1062
state/state.go:1062: func (st *State) Network(id string) (*Network,
error) {
I don't think we ever want to identify a network by provider id, do we?
state talks juju language -- we don't ever look up a machine by instance
id, do we?
At least one of us is confused... possibly both. Hopefully these
comments will elucidate where I'm coming from; ping me for a chat if you
need to.
https:/ /codereview. appspot. com/86010044/ diff/20001/ names/network_ test.go test.go (right):
File names/network_
https:/ /codereview. appspot. com/86010044/ diff/20001/ names/network_ test.go# newcode23 test.go: 23: c.Assert( names.IsNetwork ("42"), jc.IsTrue)
names/network_
Let's not let users do this. Same restrictions as service names perhaps?
https:/ /codereview. appspot. com/86010044/ diff/20001/ names/tag_ test.go
File names/tag_test.go (left):
https:/ /codereview. appspot. com/86010044/ diff/20001/ names/tag_ test.go# oldcode130 test.go: 130: // TODO(rog) environment and user, when they have
names/tag_
Tag functions.
Thanks
https:/ /codereview. appspot. com/86010044/ diff/20001/ state/api/ params/ internal. go params/ internal. go (right):
File state/api/
https:/ /codereview. appspot. com/86010044/ diff/20001/ state/api/ params/ internal. go#newcode316 params/ internal. go:316: Tag string
state/api/
Hmm, doesn't this need both the tag and the id?
https:/ /codereview. appspot. com/86010044/ diff/20001/ state/apiserver /client/ client. go /client/ client. go (right):
File state/apiserver
https:/ /codereview. appspot. com/86010044/ diff/20001/ state/apiserver /client/ client. go#newcode295 /client/ client. go:295: includeNetworks, err := s(args. IncludeNetworks )
state/apiserver
networkTagsToId
tags to names, not ids, surely?
I've been thinking of names as juju vocab, ids as provider vocab, and
tags as derived from names. Am I confused?
https:/ /codereview. appspot. com/86010044/ diff/20001/ state/apiserver /provisioner/ provisioner. go /provisioner/ provisioner. go (right):
File state/apiserver
https:/ /codereview. appspot. com/86010044/ diff/20001/ state/apiserver /provisioner/ provisioner. go#newcode464 /provisioner/ provisioner. go:464: // Convert network ids
state/apiserver
to tags before returning.
Doesn't this need to be ids? They're for consumption by the provider,
right? Or will the provisioner be using the tags to look up the networks
and get the ids to pass on to StartInstance?
https:/ /codereview. appspot. com/86010044/ diff/20001/ state/networkin terfaces. go terfaces. go (right):
File state/networkin
https:/ /codereview. appspot. com/86010044/ diff/20001/ state/networkin terfaces. go#newcode23 terfaces. go:23: NetworkId string
state/networkin
This is an internal reference to a juju entity. Shouldn't it be using
the name?
https:/ /codereview. appspot. com/86010044/ diff/20001/ state/networks. go
File state/networks.go (right):
https:/ /codereview. appspot. com/86010044/ diff/20001/ state/networks. go#newcode39 go:39: }
state/networks.
It might make things clearer if we had an explicit Name() func here that
just happened to return the provider id?
Would be clearest of all tbh of we had separate Name and ProviderId
fields...
https:/ /codereview. appspot. com/86010044/ diff/20001/ state/state. go
File state/state.go (right):
https:/ /codereview. appspot. com/86010044/ diff/20001/ state/state. go#newcode1021 go:1021: // TODO(dimitern) Start using sequences for id,
state/state.
like for machines. For
huh? surely names need to be user-specified?
https:/ /codereview. appspot. com/86010044/ diff/20001/ state/state. go#newcode1062 go:1062: func (st *State) Network(id string) (*Network,
state/state.
error) {
I don't think we ever want to identify a network by provider id, do we?
state talks juju language -- we don't ever look up a machine by instance
id, do we?
https:/ /codereview. appspot. com/86010044/