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

Issue 6305105: environs/dummy: add Instances (Closed)

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

Description

environs/dummy: add Instances * PROPOSAL *: Add the facility for dummy to return the actual environ.Instance objects that were returned. The goal is to be able to identify if dummy started _your_ instance, not just _an_ instance. This could also be accomplished by returned the string of instance.Id(). https://code.launchpad.net/~dave-cheney/juju-core/go-environs-dummy-add-instance-id/+merge/110730 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -10 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/cmd_test.go View 2 chunks +4 lines, -4 lines 0 comments Download
M environs/dummy/environs.go View 3 chunks +9 lines, -6 lines 3 comments Download

Messages

Total messages: 5
dave_cheney.net
Please take a look.
11 years, 10 months ago (2012-06-18 06:19:35 UTC) #1
niemeyer
LGTM with the suggestion, but please wait for rog as he has been following this ...
11 years, 10 months ago (2012-06-19 01:32:32 UTC) #2
rog
LGTM as an interim measure but i think that gustavo's idea is good for moving ...
11 years, 10 months ago (2012-06-19 06:40:32 UTC) #3
dave_cheney.net
As discussed on IRC, i'll do a different proposal using interfaces. On Tue, Jun 19, ...
11 years, 10 months ago (2012-06-19 06:47:59 UTC) #4
dave_cheney.net
11 years, 10 months ago (2012-06-19 21:38:00 UTC) #5
abandoned

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

https://codereview.appspot.com/6305105/diff/1/environs/dummy/environs.go#newc...
environs/dummy/environs.go:60: Instances []environs.Instance
On 2012/06/19 01:32:32, niemeyer wrote:
> The idea of extending the operation with more details of what was actually
done
> sounds reasonable (except for the fact that mocking isn't great, but we're
past
> that point already).
> 
> That said, enriching the Operation type with every single field that may be
used
> by every single operation, and then having to know which operations set which
> fields with which names, sounds a bit like we'll get in a messy situation very
> soon.
> 
> We don't have to refactor it yet onto something more rich (like a type per op,
> for example) but I suggest at least being more specific about what the field
> means. I suggest something like StartedInstances and StoppedInstances for now,
> so there's absolutely no doubts about what they mean and when they are set.
> Then, let's watch to see how the pattern grows.

Yup, it could become a kitchen sink and goes against the idea of dummy being a,
so simple it couldn't possibly go wrong, provider. 

This branch was proposed because I misunderstood your comment about checking the
instance id that the provisioner creates, which has now been addressed, so the
pressure for this feature has been reduced.
Sign in to reply to this message.

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