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

Issue 6209078: environs: implement URL method.

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+106427
Visibility:
Public.

Description

environs: implement URL method. We also have to refactor the dummy provider slightly, because the http server is listening on the environState, not the environ itself, so with the old arrangement, it couldn't know the environ name to send it on the ops channel. I've changed things so that the environState holds the name, and a new environState is created every time an environment with a new name is opened. https://code.launchpad.net/~rogpeppe/juju/go-environs-storage-url/+merge/106427 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : environs: implement URL method. #

Total comments: 6

Patch Set 3 : environs: implement URL method. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+240 lines, -158 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M environs/dummy/environs.go View 1 2 10 chunks +89 lines, -123 lines 0 comments Download
A environs/dummy/storage.go View 1 2 1 chunk +97 lines, -0 lines 0 comments Download
M environs/ec2/storage.go View 1 chunk +4 lines, -0 lines 0 comments Download
M environs/interface.go View 1 chunk +2 lines, -3 lines 0 comments Download
M environs/jujutest/livetests.go View 1 2 2 chunks +10 lines, -10 lines 0 comments Download
M environs/jujutest/tests.go View 1 2 3 chunks +32 lines, -22 lines 0 comments Download
M environs/tools.go View 1 2 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 3
rog
Please take a look.
11 years, 11 months ago (2012-05-18 16:46:23 UTC) #1
niemeyer
Good stuff. LGTM https://codereview.appspot.com/6209078/diff/2001/environs/dummy/environs.go File environs/dummy/environs.go (right): https://codereview.appspot.com/6209078/diff/2001/environs/dummy/environs.go#newcode65 environs/dummy/environs.go:65: // We have one state for ...
11 years, 11 months ago (2012-05-18 17:19:46 UTC) #2
rog
11 years, 11 months ago (2012-05-18 17:36:20 UTC) #3
*** Submitted:

environs: implement URL method.

We also have to refactor the dummy provider slightly, because
the http server is listening on the environState, not the environ
itself, so with the old arrangement, it couldn't know the environ name to
send it on the ops channel. I've changed things so that the
environState holds the name, and a new environState is created
every time an environment with a new name is opened.

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

https://codereview.appspot.com/6209078/diff/2001/environs/dummy/environs.go
File environs/dummy/environs.go (right):

https://codereview.appspot.com/6209078/diff/2001/environs/dummy/environs.go#n...
environs/dummy/environs.go:82: urlBase       string
On 2012/05/18 17:19:46, niemeyer wrote:
> This is used a single time, and its value is entirely based on httpListener.
We
> may as well not have a field for it and just inline it once in the place we
need
> it.

Done.

https://codereview.appspot.com/6209078/diff/2001/environs/jujutest/tests.go
File environs/jujutest/tests.go (right):

https://codereview.appspot.com/6209078/diff/2001/environs/jujutest/tests.go#n...
environs/jujutest/tests.go:139: func checkFileHasContents(c *C, store
environs.StorageReader, name string, contents []byte) {
On 2012/05/18 17:19:46, niemeyer wrote:
> Can we please have s/store/storage/ here too?

Done.
Sign in to reply to this message.

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