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

Issue 7014047: Amazon Elastic Load Balancing support

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by flaviamissi
Modified:
11 years, 1 month ago
Reviewers:
mp+141371, niemeyer
Visibility:
Public.

Description

Amazon Elastic Load Balancing support This change adds support for basic operations for Amazon's Elastic Load Balancing service https://code.launchpad.net/~flaviamissi/goamz/goamz/+merge/141371 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Amazon Elastic Load Balancing support #

Patch Set 3 : Amazon Elastic Load Balancing support #

Patch Set 4 : Amazon Elastic Load Balancing support #

Total comments: 42

Patch Set 5 : Amazon Elastic Load Balancing support #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2115 lines, -30 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M aws/aws.go View 9 chunks +9 lines, -0 lines 0 comments Download
M ec2/ec2.go View 7 chunks +17 lines, -17 lines 0 comments Download
M ec2/ec2test/filter.go View 1 chunk +2 lines, -2 lines 0 comments Download
M ec2/ec2test/server.go View 1 chunk +1 line, -1 line 0 comments Download
M ec2/sign.go View 1 chunk +2 lines, -2 lines 0 comments Download
A elb/elb.go View 1 2 3 4 1 chunk +384 lines, -0 lines 0 comments Download
A elb/elb_test.go View 1 2 3 4 1 chunk +317 lines, -0 lines 0 comments Download
A elb/elbi_test.go View 1 2 3 4 1 chunk +300 lines, -0 lines 0 comments Download
A elb/elbt_test.go View 1 2 3 4 1 chunk +185 lines, -0 lines 0 comments Download
A elb/elbtest/server.go View 1 2 3 4 1 chunk +455 lines, -0 lines 0 comments Download
A elb/export_test.go View 1 chunk +9 lines, -0 lines 0 comments Download
A elb/response_test.go View 1 2 3 4 1 chunk +205 lines, -0 lines 0 comments Download
A elb/sign.go View 1 chunk +35 lines, -0 lines 0 comments Download
A elb/sign_test.go View 1 chunk +66 lines, -0 lines 0 comments Download
A elb/suite_test.go View 1 chunk +118 lines, -0 lines 0 comments Download
M exp/mturk/mturk.go View 4 chunks +5 lines, -5 lines 0 comments Download
M exp/sdb/sdb.go View 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 5
flaviamissi
Please take a look.
11 years, 3 months ago (2012-12-27 16:40:14 UTC) #1
flaviamissi
Please take a look.
11 years, 3 months ago (2013-01-07 12:24:41 UTC) #2
flaviamissi
Please take a look.
11 years, 3 months ago (2013-01-07 18:37:06 UTC) #3
niemeyer
Great work, Flavia. A few initial comments: https://codereview.appspot.com/7014047/diff/6019/elb/elb.go File elb/elb.go (right): https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode24 elb/elb.go:24: // The ...
11 years, 1 month ago (2013-02-28 21:39:19 UTC) #4
flaviamissi
11 years, 1 month ago (2013-03-08 19:04:18 UTC) #5
Please take a look.

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go
File elb/elb.go (right):

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode24
elb/elb.go:24: // The creation of a Load Balancer may differ inside EC2 and VPC.
On 2013/02/28 21:39:19, niemeyer wrote:
> It's not clear what this means.

Done.

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode27
elb/elb.go:27: type CreateLoadBalancer struct {
On 2013/02/28 21:39:19, niemeyer wrote:
> I think we can short names in this package. This is the elb package, meaning
> Elastic Load Balancer. Everything here is about load balancers.
> 
> I suggest s/CreateLoadBalancer/Create/ here. Will provide further suggestions
on
> this line below.

Done.

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode36
elb/elb.go:36: // Listener to configure in Load Balancer.
On 2013/02/28 21:39:19, niemeyer wrote:
> // A Listener represents a process that listens for client connection
> // requests, and maps a port and protocol in the load balancer,
> // to a port and protocol on the backend instances.

Done.

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode47
elb/elb.go:47: // Response to a CreateLoadBalance request.
On 2013/02/28 21:39:19, niemeyer wrote:
> // CreateResp represents a response to a Create request.

Done.

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode50
elb/elb.go:50: type CreateLoadBalancerResp struct {
On 2013/02/28 21:39:19, niemeyer wrote:
> s/CreateLoadBalancerResp/CreateResp/

Done.

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode58
elb/elb.go:58: // Creates a Load Balancer in Amazon.
On 2013/02/28 21:39:19, niemeyer wrote:
> // Create creates a new load balancer.
> 
> It creates in Amazon or whoever else the endpoint represents. We have other
docs
> like this, but we should fix them over time.

Done.

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode61
elb/elb.go:61: func (elb *ELB) CreateLoadBalancer(options *CreateLoadBalancer)
(resp *CreateLoadBalancerResp, err error) {
On 2013/02/28 21:39:19, niemeyer wrote:
> s/CreateLoadBalancer/Create/g

Done.

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode70
elb/elb.go:70: // Deletes a Load Balancer.
On 2013/02/28 21:39:19, niemeyer wrote:
> // Delete deletes the load balancer with name.

Done.

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode84
elb/elb.go:84: 
On 2013/02/28 21:39:19, niemeyer wrote:
> // RegisterInstancesResp represents a response to a RegisterInstances request.
> //
> // See http://goo.gl/x9hru for more details.

Done.

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode86
elb/elb.go:86: InstanceIds []string
`xml:"RegisterInstancesWithLoadBalancerResult>Instances>member>InstanceId"`
On 2013/02/28 21:39:19, niemeyer wrote:
> OMG.. beautiful XML element name.

yeah.. :|

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode89
elb/elb.go:89: // Register N instances with a given Load Balancer.
On 2013/02/28 21:39:19, niemeyer wrote:
> // RegisterInstances registers into the named load balancer all
> // the EC2 instances with the provided instance ids.
> 
> Note how as a convention in Go code, the first word in a method documentation
is
> always the method name itself.

Done.

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode92
elb/elb.go:92: func (elb *ELB) RegisterInstancesWithLoadBalancer(instanceIds
[]string, lbName string) (resp *RegisterInstancesResp, err error) {
On 2013/02/28 21:39:19, niemeyer wrote:
> s/RegisterInstancesWithLoadBalancer/RegisterInstances/
> 
> Also, can we please have the lbName name first in the parameter list?  The
thing
> we're operating on generally comes first, as a common rule of thumb.

Done.

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode109
elb/elb.go:109: // Deregister N instances from a given Load Balancer.
On 2013/02/28 21:39:19, niemeyer wrote:
> // DeregisterInstances drops from the named load balancer all
> // the EC2 instances with the provided instance ids. 

Done.

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode112
elb/elb.go:112: func (elb *ELB) DeregisterInstancesFromLoadBalancer(instanceIds
[]string, lbName string) (resp *SimpleResp, err error) {
On 2013/02/28 21:39:19, niemeyer wrote:
> s/DeregisterInstancesFromLoadBalancer/DeregisterInstances/
> 
> and inverting the parameters as mentioned above.

Done.

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode113
elb/elb.go:113: // TODO: change params order and use ..., e.g (lbName string,
instanceIds ...string)
On 2013/02/28 21:39:19, niemeyer wrote:
> Same as above.

Done.

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode133
elb/elb.go:133: type LoadBalancerDescription struct {
On 2013/02/28 21:39:19, niemeyer wrote:
> It's a bit fuzzy to me if this is a LoadBalancerInfo, or it's in fact the
> LoadBalancer itself. Maybe we should keep LoadBalancer reserved for an object
we
> can use to manipulate things? Not sure.. I'll be thinking about this while
this
> review goes through.
I share that doubt with you, I used LoadBalancerDescription to follow amazon's
api convention, although for me it is ok to use LoadBalancer.

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode185
elb/elb.go:185: type Instance struct {
On 2013/02/28 21:39:19, niemeyer wrote:
> Hmm.. doesn't feel like this is a proper type to have here. This is
> ec2.Instance.

Done.

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode189
elb/elb.go:189: type ListenerDescription struct {
On 2013/02/28 21:39:19, niemeyer wrote:
> Also a bit of a strange type. How is PolicyName part of a listener description
> and not part of a listener? Why do we need both a listener description and a
> listener?
Yeah, it's amazon that makes those distinctions, when you call
DescribeLoadBalancers action, instead of a list of Listeners you'll get a list
of ListenerDescriptions...

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode226
elb/elb.go:226: type InstanceState struct {
On 2013/02/28 21:39:19, niemeyer wrote:
> Same comment as for the Instance type.

The ec2.InstanceState type has different fields, with different xml element
names, so we actually need this type here... :/

https://codereview.appspot.com/7014047/diff/6019/elb/elb.go#newcode236
elb/elb.go:236: func (elb *ELB) DescribeInstanceHealth(lbName string,
instanceIds ...string) (*DescribeInstanceHealthResp, error) {
On 2013/02/28 21:39:19, niemeyer wrote:
> Can you please apply the same comments regarding the documentation as the
others
> above?
> 
> Also, as described above, I think this should take instanceIds []string
instead.
> 
> I'll stop the review here for now, as this is a pretty large branch. I'll come
> back to it once these initial points are addressed/discussed, if that's
alright.

Yeap!
Sign in to reply to this message.

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