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

Issue 54690048: ec2: Add support for VPC subnets (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 2 months ago by dimitern
Modified:
10 years, 2 months ago
Reviewers:
mp+204640, gz, niemeyer, rog
Visibility:
Public.

Description

ec2: Add support for VPC subnets Added the following new API calls: - CreateSubnet - DeleteSubnet - Subnets (and related types/responses) This is the second step on the path to support VPC networking in goamz, next APIs for network interfaces will be added. Tested live on EC2, and extended the ec2test package as needed. Added a deleteVPCs test helpers which waits until a VPC is no longer in use and can be deleted, retrying as needed when running against live EC2 servers. This is needed to ensure live tests do no leave stuff behind (I've run all live tests several times in a row to make sure it works). https://code.launchpad.net/~dimitern/goamz/subnets-api-calls/+merge/204640 Requires: https://code.launchpad.net/~dimitern/goamz/vpc-api-calls/+merge/204514 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : ec2: Add support for VPC subnets #

Patch Set 3 : ec2: Add support for VPC subnets #

Total comments: 8

Patch Set 4 : ec2: Add support for VPC subnets #

Patch Set 5 : ec2: Add support for VPC subnets #

Total comments: 6

Patch Set 6 : ec2: Add support for VPC subnets #

Total comments: 10

Patch Set 7 : ec2: Add support for VPC subnets #

Unified diffs Side-by-side diffs Delta from patch set Stats (+511 lines, -0 lines) Patch
A [revision details] View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M ec2/ec2test/server.go View 1 2 3 4 5 6 6 chunks +105 lines, -0 lines 0 comments Download
M ec2/responses_test.go View 1 2 1 chunk +55 lines, -0 lines 0 comments Download
A ec2/subnets.go View 1 2 3 4 5 6 1 chunk +109 lines, -0 lines 0 comments Download
A ec2/subnets_test.go View 1 2 3 4 5 6 1 chunk +210 lines, -0 lines 0 comments Download
M ec2/vpc_test.go View 1 2 3 4 5 6 1 chunk +30 lines, -0 lines 0 comments Download

Messages

Total messages: 10
dimitern
Please take a look.
10 years, 2 months ago (2014-02-04 11:05:17 UTC) #1
dimitern
Please take a look.
10 years, 2 months ago (2014-02-04 11:08:53 UTC) #2
dimitern
Please take a look.
10 years, 2 months ago (2014-02-05 13:31:00 UTC) #3
rog
LGTM with some suggestions below. https://codereview.appspot.com/54690048/diff/40001/ec2/ec2test/server.go File ec2/ec2test/server.go (right): https://codereview.appspot.com/54690048/diff/40001/ec2/ec2test/server.go#newcode1105 ec2/ec2test/server.go:1105: availIPs := int(math.Exp2(float64(maskBits-maskOnes))) - ...
10 years, 2 months ago (2014-02-05 14:46:52 UTC) #4
dimitern
Please take a look. https://codereview.appspot.com/54690048/diff/40001/ec2/ec2test/server.go File ec2/ec2test/server.go (right): https://codereview.appspot.com/54690048/diff/40001/ec2/ec2test/server.go#newcode1105 ec2/ec2test/server.go:1105: availIPs := int(math.Exp2(float64(maskBits-maskOnes))) - 5 ...
10 years, 2 months ago (2014-02-06 11:37:26 UTC) #5
dimitern
Please take a look.
10 years, 2 months ago (2014-02-06 11:51:59 UTC) #6
gz
LGTM. https://codereview.appspot.com/54690048/diff/80001/ec2/subnets.go File ec2/subnets.go (right): https://codereview.appspot.com/54690048/diff/80001/ec2/subnets.go#newcode8 ec2/subnets.go:8: // Written by Gustavo Niemeyer <gustavo.niemeyer@canonical.com> Er, I'm ...
10 years, 2 months ago (2014-02-06 16:37:42 UTC) #7
dimitern
Please take a look. https://codereview.appspot.com/54690048/diff/80001/ec2/subnets.go File ec2/subnets.go (right): https://codereview.appspot.com/54690048/diff/80001/ec2/subnets.go#newcode8 ec2/subnets.go:8: // Written by Gustavo Niemeyer ...
10 years, 2 months ago (2014-02-07 12:48:20 UTC) #8
niemeyer
LGTM https://codereview.appspot.com/54690048/diff/100001/ec2/subnets.go File ec2/subnets.go (right): https://codereview.appspot.com/54690048/diff/100001/ec2/subnets.go#newcode8 ec2/subnets.go:8: // Written by Gustavo Niemeyer <gustavo.niemeyer@canonical.com> Please drop ...
10 years, 2 months ago (2014-02-12 13:33:50 UTC) #9
dimitern
10 years, 2 months ago (2014-02-12 13:55:00 UTC) #10
*** Submitted:

ec2: Add support for VPC subnets

Added the following new API calls:
- CreateSubnet
- DeleteSubnet
- Subnets
(and related types/responses)

This is the second step on the path to
support VPC networking in goamz, next
APIs for network interfaces will be
added.

Tested live on EC2, and extended the
ec2test package as needed.

Added a deleteVPCs test helpers which
waits until a VPC is no longer in use
and can be deleted, retrying as needed
when running against live EC2 servers.
This is needed to ensure live tests do
no leave stuff behind (I've run all live
tests several times in a row to make sure
it works).

R=rog, gz, niemeyer
CC=
https://codereview.appspot.com/54690048

https://codereview.appspot.com/54690048/diff/100001/ec2/subnets.go
File ec2/subnets.go (right):

https://codereview.appspot.com/54690048/diff/100001/ec2/subnets.go#newcode8
ec2/subnets.go:8: // Written by Gustavo Niemeyer
<gustavo.niemeyer@canonical.com>
On 2014/02/12 13:33:51, niemeyer wrote:
> Please drop this line.

Done.

https://codereview.appspot.com/54690048/diff/100001/ec2/subnets.go#newcode45
ec2/subnets.go:45: // (assuming you want only a single subnet in the VPC), or a
subset of
On 2014/02/12 13:33:51, niemeyer wrote:
> Documentation should be impersonal:
> 
>     "assuming a single subnet is wanted"

Done.

https://codereview.appspot.com/54690048/diff/100001/ec2/subnets.go#newcode51
ec2/subnets.go:51: // availZone may be empty, in which case Amazon EC2 selects
one for
On 2014/02/12 13:33:51, niemeyer wrote:
> // If availZone is empty, an availability zone is automatically
> // selected.

Done.

https://codereview.appspot.com/54690048/diff/100001/ec2/subnets.go#newcode93
ec2/subnets.go:93: // Subnets describes one or more of your subnets. Both
parameters are
On 2014/02/12 13:33:51, niemeyer wrote:
> // Subnets returns one or more subnets. Both ...

Done.

https://codereview.appspot.com/54690048/diff/100001/ec2/subnets_test.go
File ec2/subnets_test.go (right):

https://codereview.appspot.com/54690048/diff/100001/ec2/subnets_test.go#newcode8
ec2/subnets_test.go:8: // Written by Gustavo Niemeyer
<gustavo.niemeyer@canonical.com>
On 2014/02/12 13:33:51, niemeyer wrote:
> Please drop this line.

Done.
Sign in to reply to this message.

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