> Couldn't we have PrivateIPs only and avoid the question
> of what happens when they're both set?
I tried to stay close to the AWS API, which allows both but with some
conditions. Having PrivateIPAddress and setting just that is a shortcut
to setting PrivateIPs: []ec2.PrivateIP{{Address: "..", IsPrimary:
true}}. But perhaps the slightly more verbose syntax will work well to
hide the API complexity.
https://codereview.appspot.com/54570048/diff/20001/ec2/networkinterfaces.go#newcode87
ec2/networkinterfaces.go:87: // SecondaryPrivateIPsCount is the number
of secondary private IP
On 2014/02/05 15:17:35, rog wrote:
> // When SecondaryPrivateIPsCount is non-zero,
> // EC2 allocates that number of
> // IP addresses from within the subnet range.
> // The number of IP addresses you
> // can assign to a network interface varies by instance type.
Please take a look.
https:/ /codereview. appspot. com/54570048/ diff/20001/ ec2/ec2. go
File ec2/ec2.go (right):
https:/ /codereview. appspot. com/54570048/ diff/20001/ ec2/ec2. go#newcode635
ec2/ec2.go:635: // CreateSecurityGroup run a CreateSecurityGroup request
in EC2, with
On 2014/02/05 15:17:35, rog wrote:
> s/run/runs/
Done.
https:/ /codereview. appspot. com/54570048/ diff/20001/ ec2/ec2. go#newcode643 roupVPC creates a security group in
ec2/ec2.go:643: // CreateSecurityG
EC2, associated
On 2014/02/05 15:17:35, rog wrote:
> s/,//
> // If vpcId is empty, this call is equivalent to CreateSecurityG roup.
> ?
Done.
https:/ /codereview. appspot. com/54570048/ diff/20001/ ec2/networkinte rfaces. go rfaces. go (right):
File ec2/networkinte
https:/ /codereview. appspot. com/54570048/ diff/20001/ ec2/networkinte rfaces. go#newcode80 rfaces. go:80: // You can specify a primary private IP
ec2/networkinte
address by setting
On 2014/02/05 15:17:35, rog wrote:
> Why have we got both PrivateIPs and PrivateIPAddress?
> Couldn't we have PrivateIPs only and avoid the question
> of what happens when they're both set?
I tried to stay close to the AWS API, which allows both but with some {{Address: "..", IsPrimary:
conditions. Having PrivateIPAddress and setting just that is a shortcut
to setting PrivateIPs: []ec2.PrivateIP
true}}. But perhaps the slightly more verbose syntax will work well to
hide the API complexity.
https:/ /codereview. appspot. com/54570048/ diff/20001/ ec2/networkinte rfaces. go#newcode84 rfaces. go:84: // If you don't specify a private IP
ec2/networkinte
address, EC2 selects one for you
On 2014/02/05 15:17:35, rog wrote:
> // If a private IP address is not specified, EC2 selects
> // one from the subnet range.
Done slightly differently.
https:/ /codereview. appspot. com/54570048/ diff/20001/ ec2/networkinte rfaces. go#newcode87 rfaces. go:87: // SecondaryPrivat eIPsCount is the number eIPsCount is non-zero,
ec2/networkinte
of secondary private IP
On 2014/02/05 15:17:35, rog wrote:
> // When SecondaryPrivat
> // EC2 allocates that number of
> // IP addresses from within the subnet range.
> // The number of IP addresses you
> // can assign to a network interface varies by instance type.
> ?
Done.
https:/ /codereview. appspot. com/54570048/ diff/20001/ ec2/networkinte rfaces. go#newcode149 rfaces. go:149: // You must detach the network interface terface deletes the specified network interface,
ec2/networkinte
before you can delete it.
On 2014/02/05 15:17:35, rog wrote:
> // DeleteNetworkIn
> // which must have been previously detached.
> ?
Done.
https:/ /codereview. appspot. com/54570048/ diff/20001/ ec2/networkinte rfaces. go#newcode192 rfaces. go:192: // AttachNetworkIn terfaceResp is the
ec2/networkinte
response to a
On 2014/02/05 15:17:35, rog wrote:
> s/ a/ an/
Done.
https:/ /codereview. appspot. com/54570048/