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

Issue 79800043: Add networks params to AddService

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years ago by gz
Modified:
10 years ago
Reviewers:
mp+212635, dimitern
Visibility:
Public.

Description

Add networks params to AddService Append includeNetworks and excludeNetworks to AddService function parameters, and updates callers appropriately. New AddTestingServiceWithNetworks created in a couple of places and used for basic test. https://code.launchpad.net/~gz/juju-core/addservice_using_networks/+merge/212635 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -34 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/status_test.go View 1 chunk +1 line, -1 line 1 comment Download
M environs/jujutest/livetests.go View 1 chunk +1 line, -1 line 1 comment Download
M juju/conn_test.go View 1 chunk +1 line, -1 line 0 comments Download
M juju/deploy.go View 1 chunk +2 lines, -1 line 0 comments Download
M juju/testing/conn.go View 1 chunk +5 lines, -1 line 0 comments Download
M state/apiserver/charmrevisionupdater/testing/suite.go View 3 chunks +5 lines, -5 lines 0 comments Download
M state/apiserver/client/run_test.go View 2 chunks +4 lines, -4 lines 0 comments Download
M state/conn_test.go View 1 chunk +4 lines, -0 lines 0 comments Download
M state/export_test.go View 1 chunk +5 lines, -1 line 0 comments Download
M state/service_test.go View 1 chunk +14 lines, -4 lines 0 comments Download
M state/state.go View 2 chunks +2 lines, -2 lines 0 comments Download
M state/state_test.go View 7 chunks +13 lines, -13 lines 0 comments Download

Messages

Total messages: 2
gz
Please take a look.
10 years ago (2014-03-25 14:55:09 UTC) #1
dimitern
10 years ago (2014-03-25 15:00:42 UTC) #2
LGTM, with one improvement: when no networks are to be given to a service,
passing nil instead of []string{} is better (for both args).

https://codereview.appspot.com/79800043/diff/1/cmd/juju/status_test.go
File cmd/juju/status_test.go (right):

https://codereview.appspot.com/79800043/diff/1/cmd/juju/status_test.go#newcod...
cmd/juju/status_test.go:1629: _, err := ctx.st.AddService(as.name, "user-admin",
ch, []string{}, []string{})
Just passing nil, nil should be enough.

https://codereview.appspot.com/79800043/diff/1/environs/jujutest/livetests.go
File environs/jujutest/livetests.go (right):

https://codereview.appspot.com/79800043/diff/1/environs/jujutest/livetests.go...
environs/jujutest/livetests.go:455: svc, err := conn.State.AddService("dummy",
"user-admin", sch, []string{}, []string{})
ditto (and all other places)
Sign in to reply to this message.

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