Merge lp://staging/~rogpeppe/juju-core/configuration-alternative into lp://staging/~juju/juju-core/trunk

Proposed by Roger Peppe
Status: Work in progress
Proposed branch: lp://staging/~rogpeppe/juju-core/configuration-alternative
Merge into: lp://staging/~juju/juju-core/trunk
Diff against target: 968 lines (+410/-94)
18 files modified
cmd/juju/cmd_test.go (+3/-0)
cmd/juju/deploy_test.go (+1/-0)
cmd/juju/main_test.go (+1/-0)
environs/config/auth.go (+3/-16)
environs/config/auth_test.go (+15/-8)
environs/config/config.go (+122/-0)
environs/config/export_test.go (+5/-0)
environs/config_test.go (+3/-0)
environs/dummy/environs.go (+79/-13)
environs/ec2/config.go (+73/-16)
environs/ec2/config_test.go (+35/-28)
environs/ec2/ec2.go (+8/-4)
environs/ec2/export_test.go (+0/-4)
environs/interface.go (+27/-1)
environs/jujutest/livetests.go (+29/-0)
environs/tools_test.go (+4/-3)
juju/conn_test.go (+1/-0)
state/ssh_test.go (+1/-1)
To merge this branch: bzr merge lp://staging/~rogpeppe/juju-core/configuration-alternative
Reviewer Review Type Date Requested Status
The Go Language Gophers Pending
Review via email: mp+114870@code.staging.launchpad.net

Description of the change

environs: add configuration attributes and access

This is an alternative possibility to https://codereview.appspot.com/6353092/

FOR DISCUSSION ONLY - WORK IN PROGRESS

https://codereview.appspot.com/6343107/

To post a comment you must log in.
301. By Roger Peppe

all tests pass

302. By Roger Peppe

go fmt

Revision history for this message
William Reade (fwereade) wrote :
Download full text (5.1 KiB)

Much nicer approach in general, more than happy to toss mine out; but
definitely needs more tests for config creation and changes involving
irritating details like empty strings (which AFAICT will be the only way
to re-read default key paths and AWS auth), along with the other stuff I
mention below. But, really nice all the same.

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

https://codereview.appspot.com/6343107/diff/1/cmd/juju/cmd_test.go#newcode52
cmd/juju/cmd_test.go:52: authorized-keys: keys
I'd make the dummy provider insert default values for authorized-keys
and default-series, no sense dirtying up the tests except when we care
about those settings.

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

https://codereview.appspot.com/6343107/diff/1/cmd/juju/deploy_test.go#newcode25
cmd/juju/deploy_test.go:25: authorized-keys: "keys"
similarly

https://codereview.appspot.com/6343107/diff/1/environs/config/auth_test.go
File environs/config/auth_test.go (right):

https://codereview.appspot.com/6343107/diff/1/environs/config/auth_test.go#newcode1
environs/config/auth_test.go:1: package config_test
This test was broken, because it wasn't being run, and I don't see the
necessary fixes, so I suspect it's still not being run.

https://codereview.appspot.com/6343107/diff/1/environs/config/config.go
File environs/config/config.go (right):

https://codereview.appspot.com/6343107/diff/1/environs/config/config.go#newcode9
environs/config/config.go:9: authorizedKeys string
needs defaultSeries

https://codereview.appspot.com/6343107/diff/1/environs/config/config.go#newcode22
environs/config/config.go:22: "broken",
don't think this should be here

https://codereview.appspot.com/6343107/diff/1/environs/config/export_test.go
File environs/config/export_test.go (right):

https://codereview.appspot.com/6343107/diff/1/environs/config/export_test.go#newcode3
environs/config/export_test.go:3: func AuthorizedKeys(path string)
(string, error) {
please, ReadAuthorizedKeys

https://codereview.appspot.com/6343107/diff/1/environs/dummy/environs.go
File environs/dummy/environs.go (right):

https://codereview.appspot.com/6343107/diff/1/environs/dummy/environs.go#newcode222
environs/dummy/environs.go:222: "default-series": schema.String(),
default-series is needed by everything; it's required by the deploy
command.

https://codereview.appspot.com/6343107/diff/1/environs/dummy/environs.go#newcode226
environs/dummy/environs.go:226: "default-series",
This feels kinda icky. We *do* require default-series, just not on the
way in. Maybe we could call this inputChecker or something?

https://codereview.appspot.com/6343107/diff/1/environs/ec2/config.go
File environs/ec2/config.go (right):

https://codereview.appspot.com/6343107/diff/1/environs/ec2/config.go#newcode20
environs/ec2/config.go:20: defaultSeries string
should be common, again... getting default-series out, for use by
deploy, is the whole point of all of this :)

https://codereview.appspot.com/6343107/diff/1/environs/interface.go
File environs/interface.go (left):

https://codereview.appspot.com/63431...

Read more...

Revision history for this message
Roger Peppe (rogpeppe) wrote :

Reviewers: mp+114870_code.launchpad.net, fwereade,

Message:
On 2012/07/13 16:08:14, fwereade wrote:
> Much nicer approach in general, more than happy to toss mine out; but
definitely

thanks for the positive review. i will add some tests and address your
comments on monday.

Description:
environs: add configuration attributes and access

This is an alternative possibility to
https://codereview.appspot.com/6353092/

https://code.launchpad.net/~rogpeppe/juju-core/configuration-alternative/+merge/114870

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/6343107/

Affected files:
   A [revision details]
   M cmd/juju/cmd_test.go
   M cmd/juju/deploy_test.go
   M cmd/juju/main_test.go
   M environs/config/auth.go
   M environs/config/auth_test.go
   A environs/config/config.go
   A environs/config/export_test.go
   M environs/config_test.go
   M environs/dummy/environs.go
   M environs/ec2/config.go
   M environs/ec2/config_test.go
   M environs/ec2/ec2.go
   M environs/ec2/export_test.go
   M environs/interface.go
   M environs/jujutest/livetests.go
   M environs/tools_test.go
   M juju/conn_test.go
   M state/ssh_test.go

303. By Roger Peppe

remove quotes in yaml

304. By Roger Peppe

wip

305. By Roger Peppe

environs/config: authorizedKeys -> readAuthorizedKeys

Unmerged revisions

305. By Roger Peppe

environs/config: authorizedKeys -> readAuthorizedKeys

304. By Roger Peppe

wip

303. By Roger Peppe

remove quotes in yaml

302. By Roger Peppe

go fmt

301. By Roger Peppe

all tests pass

300. By Roger Peppe

gofmt

299. By Roger Peppe

add config stuff

298. By Roger Peppe

environs: add methods for opening and closing ports.

Also add a dummy implementation, and clean up dummy op
send semantics slightly.

R=niemeyer
CC=
https://codereview.appspot.com/6349097

297. By Dave Cheney

all: rename service => worker

As discussed in the 03/07/2012 team meeting, among a poor field of
candidates, worker(s) was the prefered name for the code that runs
inside an agent. eg, the Provisioner worker runs inside the
Provisioning agent.

note: also fixed a gofmt issue in state/ which had been bugging me.

R=niemeyer
CC=
https://codereview.appspot.com/6345084

296. By Roger Peppe

charm: avoid crash when reading charms with simple relation strings.

Fixes bug #1015700

R=niemeyer
CC=
https://codereview.appspot.com/6344105

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches