|
map-backed Config type
The bulk of this diff is:
* code moves -- breaking up the morass that is the dummy env, moving
misplaced stuff like authorized-keys handling out of ec2, generally
trying to put stuff in places that make sense
* name changes -- ReadEnvironsBytes->NewConfigSet, etc
* somewhat detailed tests for config handling and updating
...so it's not quite as big as it looks.
But... it would appear that I Just Don't Get It :(. All this mucking around
in maps seems to me to be profoundly ugly and *very* hard to get right
(hence the large amount of seriously pedantic testing).
I was led towards implementing config.ComposeConfig and config.Checker
because of the otherwise *hideous* duplication between the dummy and
ec2 environs; and the fact that *all* the tests in config would have to be
dumped into ec2 and duplicated in all future providers.
If you don't like this, and I wouldn't blame you if you didn't, I'm not
sure what else I can do. I really tried...
(Incidentally... I just don't know whether I'm following sensible practices
here. If I don't tidy code as I go I get nice clean diffs and we end up with
a tangled morass of code after a few weeks (witness state tests, dummy
environs, etc); if I do tidy as I go we get tangled diffs but a chance at
gradually improving code consistency. Anyone?)
https://code.launchpad.net/~fwereade/juju-core/env-config-trainwreck/+merge/114654
(do not edit description out of merge proposal)
Total comments: 30
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1592 lines, -1036 lines) |
Patch |
|
A |
[revision details]
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
cmd/juju/cmd_test.go
|
View
|
|
1 chunk |
+5 lines, -3 lines |
2 comments
|
Download
|
|
A |
environs/config/config.go
|
View
|
|
1 chunk |
+187 lines, -0 lines |
1 comment
|
Download
|
|
M |
environs/config/config_test.go
|
View
|
|
3 chunks |
+280 lines, -16 lines |
2 comments
|
Download
|
|
A |
environs/config/export_test.go
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
A |
environs/configset.go
|
View
|
|
1 chunk |
+87 lines, -0 lines |
0 comments
|
Download
|
|
M |
environs/configset_test.go
|
View
|
|
6 chunks |
+40 lines, -36 lines |
0 comments
|
Download
|
|
M |
environs/dummy/environs.go
|
View
|
|
6 chunks |
+41 lines, -232 lines |
1 comment
|
Download
|
|
M |
environs/dummy/environs_test.go
|
View
|
|
1 chunk |
+5 lines, -6 lines |
0 comments
|
Download
|
|
A |
environs/dummy/provider.go
|
View
|
|
1 chunk |
+230 lines, -0 lines |
4 comments
|
Download
|
|
M |
environs/dummy/storage.go
|
View
|
|
1 chunk |
+7 lines, -6 lines |
0 comments
|
Download
|
|
D |
environs/ec2/auth.go
|
View
|
|
1 chunk |
+0 lines, -75 lines |
0 comments
|
Download
|
|
D |
environs/ec2/config_test.go
|
View
|
|
1 chunk |
+0 lines, -233 lines |
0 comments
|
Download
|
|
M |
environs/ec2/ec2.go
|
View
|
|
6 chunks |
+55 lines, -70 lines |
3 comments
|
Download
|
|
M |
environs/ec2/export_test.go
|
View
|
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
|
M |
environs/ec2/live_test.go
|
View
|
|
2 chunks |
+11 lines, -15 lines |
1 comment
|
Download
|
|
M |
environs/ec2/local_test.go
|
View
|
|
2 chunks |
+16 lines, -17 lines |
0 comments
|
Download
|
|
M |
environs/ec2/provider.go
|
View
|
|
1 chunk |
+82 lines, -68 lines |
1 comment
|
Download
|
|
A |
environs/ec2/provider_test.go
|
View
|
|
1 chunk |
+353 lines, -0 lines |
3 comments
|
Download
|
|
M |
environs/interface.go
|
View
|
|
5 chunks |
+11 lines, -25 lines |
4 comments
|
Download
|
|
M |
environs/jujutest/test.go
|
View
|
|
3 chunks |
+16 lines, -14 lines |
2 comments
|
Download
|
|
D |
environs/open.go
|
View
|
|
1 chunk |
+0 lines, -46 lines |
0 comments
|
Download
|
|
M |
environs/provider.go
|
View
|
|
1 chunk |
+46 lines, -106 lines |
3 comments
|
Download
|
|
M |
environs/provider_test.go
|
View
|
|
1 chunk |
+43 lines, -44 lines |
0 comments
|
Download
|
|
M |
environs/tools_test.go
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
juju/conn.go
|
View
|
|
1 chunk |
+13 lines, -9 lines |
0 comments
|
Download
|
|
M |
schema/schema.go
|
View
|
|
1 chunk |
+14 lines, -2 lines |
2 comments
|
Download
|
|
M |
schema/schema_test.go
|
View
|
|
1 chunk |
+20 lines, -0 lines |
0 comments
|
Download
|
|
M |
service/provisioner/provisioner.go
|
View
|
|
3 chunks |
+17 lines, -5 lines |
1 comment
|
Download
|
|
M |
service/provisioner/provisioner_test.go
|
View
|
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
Total messages: 6
|