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

Issue 14439060: [maas] Filter out nodes that are not allocated.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by thumper
Modified:
10 years, 5 months ago
Reviewers:
mp+191090, axw
Visibility:
Public.

Description

[maas] Filter out nodes that are not allocated. The maas provider should only return instances that are in the allocated state. https://code.launchpad.net/~thumper/juju-core/maas-allocated/+merge/191090 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 4

Patch Set 2 : [maas] Filter out nodes that are not allocated. #

Total comments: 2

Patch Set 3 : [maas] Filter out nodes that are not allocated. #

Patch Set 4 : [maas] Filter out nodes that are not allocated. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -43 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M provider/maas/environ.go View 1 2 3 3 chunks +27 lines, -10 lines 0 comments Download
M provider/maas/environ_test.go View 1 2 3 5 chunks +42 lines, -33 lines 0 comments Download

Messages

Total messages: 6
thumper
Please take a look.
10 years, 6 months ago (2013-10-15 01:58:40 UTC) #1
axw
https://codereview.appspot.com/14439060/diff/1/provider/maas/environ.go File provider/maas/environ.go (right): https://codereview.appspot.com/14439060/diff/1/provider/maas/environ.go#newcode333 provider/maas/environ.go:333: // Preallocate enough spaces, but don't actually put anything ...
10 years, 6 months ago (2013-10-15 05:48:03 UTC) #2
thumper
Please take a look. https://codereview.appspot.com/14439060/diff/1/provider/maas/environ.go File provider/maas/environ.go (right): https://codereview.appspot.com/14439060/diff/1/provider/maas/environ.go#newcode333 provider/maas/environ.go:333: // Preallocate enough spaces, but ...
10 years, 5 months ago (2013-11-04 01:21:17 UTC) #3
axw
Thanks, LGTM. One possible improvement, but fairly minor. https://codereview.appspot.com/14439060/diff/5001/provider/maas/environ.go File provider/maas/environ.go (right): https://codereview.appspot.com/14439060/diff/5001/provider/maas/environ.go#newcode388 provider/maas/environ.go:388: return ...
10 years, 5 months ago (2013-11-04 01:36:02 UTC) #4
thumper
Please take a look.
10 years, 5 months ago (2013-11-04 02:43:47 UTC) #5
thumper
10 years, 5 months ago (2013-11-04 03:36:40 UTC) #6
Please take a look.

https://codereview.appspot.com/14439060/diff/5001/provider/maas/environ.go
File provider/maas/environ.go (right):

https://codereview.appspot.com/14439060/diff/5001/provider/maas/environ.go#ne...
provider/maas/environ.go:388: return nil, environs.ErrNoInstances
On 2013/11/04 01:36:02, axw wrote:
> This could be made a bit nicer, but it's not that big a deal if you don't do
it:
> 
> if len(instances)==0, return ErrNoInstances (you can check this up front).
> Similarly, if len(instances)<len(ids), then environs.ErrPartialInstances. Then
> you can do away with allNil, and errResult.

good call, making changes
Sign in to reply to this message.

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