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

Issue 6213050: environs: simplify EnvironProvider interface.

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 11 months ago by rog
Modified:
11 years, 11 months ago
Reviewers:
mp+106124
Visibility:
Public.

Description

environs: simplify EnvironProvider interface. We make it type safe and avoid the need to expose schema in the interface. https://code.launchpad.net/~rogpeppe/juju/trunk/+merge/106124 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : environs: simplify EnvironProvider interface. #

Total comments: 27

Patch Set 3 : environs: simplify EnvironProvider interface. #

Patch Set 4 : environs: simplify EnvironProvider interface. #

Total comments: 2

Patch Set 5 : environs: simplify EnvironProvider interface. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+137 lines, -168 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M environs/config.go View 1 2 3 4 4 chunks +11 lines, -18 lines 0 comments Download
M environs/config_test.go View 1 chunk +0 lines, -6 lines 0 comments Download
M environs/dummy/environs.go View 1 2 1 chunk +41 lines, -20 lines 0 comments Download
M environs/ec2/config.go View 1 2 2 chunks +62 lines, -57 lines 0 comments Download
M environs/ec2/config_test.go View 1 chunk +1 line, -0 lines 0 comments Download
M environs/ec2/ec2.go View 1 2 1 chunk +3 lines, -5 lines 0 comments Download
M environs/ec2/util.go View 1 chunk +0 lines, -39 lines 0 comments Download
M environs/interface.go View 1 2 3 4 1 chunk +10 lines, -9 lines 0 comments Download
M environs/jujutest/tests.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
M environs/open.go View 1 2 1 chunk +5 lines, -13 lines 0 comments Download
M environs/open_test.go View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 9
rog
Please take a look.
11 years, 11 months ago (2012-05-17 09:05:14 UTC) #1
fwereade
This LGTM but I have a vague rumination: there are a few invariably necessary fields ...
11 years, 11 months ago (2012-05-17 09:56:18 UTC) #2
dave_cheney.net
I like it. This is approaching the designed we discussed at UDS. I like that ...
11 years, 11 months ago (2012-05-18 06:54:30 UTC) #3
dave_cheney.net
https://codereview.appspot.com/6213050/diff/2001/environs/config.go File environs/config.go (left): https://codereview.appspot.com/6213050/diff/2001/environs/config.go#oldcode14 environs/config.go:14: kind string // the type of environment (e.g. ec2). ...
11 years, 11 months ago (2012-05-18 06:54:51 UTC) #4
rog
https://codereview.appspot.com/6213050/diff/2001/environs/config.go File environs/config.go (right): https://codereview.appspot.com/6213050/diff/2001/environs/config.go#newcode79 environs/config.go:79: kind, _ := attrs["type"].(string) On 2012/05/18 06:54:51, dfc wrote: ...
11 years, 11 months ago (2012-05-21 14:11:54 UTC) #5
niemeyer
Very nice indeed. LGTM, assuming you're happy with the following suggestions: https://codereview.appspot.com/6213050/diff/2001/environs/config.go File environs/config.go (right): ...
11 years, 11 months ago (2012-05-21 14:55:51 UTC) #6
rog
Please take a look. https://codereview.appspot.com/6213050/diff/2001/environs/config.go File environs/config.go (right): https://codereview.appspot.com/6213050/diff/2001/environs/config.go#newcode56 environs/config.go:56: Environments map[string]map[string]interface{} "environments" On 2012/05/21 ...
11 years, 11 months ago (2012-05-21 15:46:18 UTC) #7
niemeyer
LGTM with a trivial. I suggest avoiding "giving" and "gives" in comments, by the way. ...
11 years, 11 months ago (2012-05-21 16:14:01 UTC) #8
rog
11 years, 11 months ago (2012-05-21 16:40:35 UTC) #9
*** Submitted:

environs: simplify EnvironProvider interface.

We make it type safe and avoid the need to expose schema
in the interface.

R=fwereade, dfc, niemeyer
CC=
https://codereview.appspot.com/6213050

https://codereview.appspot.com/6213050/diff/2001/environs/config.go
File environs/config.go (right):

https://codereview.appspot.com/6213050/diff/2001/environs/config.go#newcode99
environs/config.go:99: config: cfg,
On 2012/05/21 16:14:02, niemeyer wrote:
> On 2012/05/21 15:46:18, rog wrote:
> > On 2012/05/21 14:55:52, niemeyer wrote:
> > > A single line would work nicely here.
> > 
> > Done.
> 
> Not a big deal, but Not Done.

hah! done but i forgot to write the file...

https://codereview.appspot.com/6213050/diff/13003/environs/interface.go
File environs/interface.go (right):

https://codereview.appspot.com/6213050/diff/13003/environs/interface.go#newco...
environs/interface.go:13: // accept the "name" and "type" keys, giving the name
of the
On 2012/05/21 16:14:02, niemeyer wrote:
> // accept the "name" and "type" attributes with the
> // environment name and provider type, respectively.
> 
> Otherwise, looks good.

using "holding" as discussed on IRC.
Sign in to reply to this message.

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