Merge lp:~gz/goamz/secgroups_on_instance into lp:goamz
Proposed by
Martin Packman
Status: | Merged |
---|---|
Merged at revision: | 41 |
Proposed branch: | lp:~gz/goamz/secgroups_on_instance |
Merge into: | lp:goamz |
Diff against target: |
120 lines (+33/-22) 4 files modified
ec2/ec2.go (+17/-16) ec2/ec2_test.go (+3/-1) ec2/ec2test/server.go (+7/-5) ec2/responses_test.go (+6/-0) |
To merge this branch: | bzr merge lp:~gz/goamz/secgroups_on_instance |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
goamz maintainers | Pending | ||
Review via email: mp+188906@code.launchpad.net |
Description of the change
ec2: Support groups at instance and reservation
Per the 2011-12-15 wsdl description of the EC2 api, the
GroupSetType containing security group details appears
on both ReservationInfoType and RunningInstance
inside it.
This branch updates the code to parse the details at both
levels in a RunInstances or DescribeInstances response,
and updates the mock server to return the same details
at both levels.
Change is required as it seems the reservation group set
is empty, while the instance group set is not in some
circumstances.
To post a comment you must log in.
Reviewers: mp+188906_ code.launchpad. net,
Message:
Please take a look.
Description:
ec2: Support groups at instance and reservation
Per the 2011-12-15 wsdl description of the EC2 api, the sSetType
GroupSetType containing security group details appears
on both ReservationInfoType and RunningInstance
inside it.
This branch updates the code to parse the details at both
levels in a RunInstances or DescribeInstances response,
and updates the mock server to return the same details
at both levels.
Change is required as it seems the reservation group set
is empty, while the instance group set is not in some
circumstances.
https:/ /code.launchpad .net/~gz/ goamz/secgroups _on_instance/ +merge/ 188906
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/14302043/
Affected files (+35, -22 lines): server. go test.go
A [revision details]
M ec2/ec2.go
M ec2/ec2_test.go
M ec2/ec2test/
M ec2/responses_
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>
Index: ec2/ec2.go goo.gl/ OCH8a for more details. ype"` sName"` Address" ` Index"` ationType" ` g>state" ` >availabilityZo ne"` >groupName" ` tate"` ype"` sName"` Address" ` Index"` ationType" ` g>state" ` >availabilityZo ne"`
=== modified file 'ec2/ec2.go'
--- ec2/ec2.go 2013-08-15 15:39:51 +0000
+++ ec2/ec2.go 2013-10-02 19:10:36 +0000
@@ -226,22 +226,23 @@
//
// See http://
type Instance struct {
- InstanceId string `xml:"instanceId"`
- InstanceType string `xml:"instanceT
- ImageId string `xml:"imageId"`
- PrivateDNSName string `xml:"privateDn
- DNSName string `xml:"dnsName"`
- IPAddress string `xml:"ipAddress"`
- PrivateIPAddress string `xml:"privateIp
- KeyName string `xml:"keyName"`
- AMILaunchIndex int `xml:"amiLaunch
- Hypervisor string `xml:"hypervisor"`
- VirtType string `xml:"virtualiz
- Monitoring string `xml:"monitorin
- AvailZone string `xml:"placement
- PlacementGroupName string `xml:"placement
- State InstanceState `xml:"instanceS
- Tags []Tag `xml:"tagSet>item"`
+ InstanceId string `xml:"instanceId"`
+ InstanceType string `xml:"instanceT
+ ImageId string `xml:"imageId"`
+ PrivateDNSName string `xml:"privateDn
+ DNSName string `xml:"dnsName"`
+ IPAddress string `xml:"ipAddress"`
+ PrivateIPAddress string `xml:"privateIp
+ KeyName string `xml:"keyName"`
+ AMILaunchIndex int `xml:"amiLaunch
+ Hypervisor string `xml:"hypervisor"`
+ VirtType string `xml:"virtualiz
+ Monitoring string `xml:"monitorin
+ AvailZone string `xml:"placement
...