You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
3.4 KiB
73 lines
3.4 KiB
Index: boto-2.40.0/boto/route53/connection.py
|
|
===================================================================
|
|
--- boto-2.40.0.orig/boto/route53/connection.py
|
|
+++ boto-2.40.0/boto/route53/connection.py
|
|
@@ -152,8 +152,8 @@ class Route53Connection(AWSAuthConnectio
|
|
raise exception.DNSServerError(response.status,
|
|
response.reason,
|
|
body)
|
|
- e = boto.jsonresponse.Element(list_marker='NameServers',
|
|
- item_marker=('NameServer',))
|
|
+ e = boto.jsonresponse.Element(list_marker=('NameServers', 'VPCs'),
|
|
+ item_marker=('NameServer', 'VPC'))
|
|
h = boto.jsonresponse.XmlHandler(e, None)
|
|
h.parse(body)
|
|
return e
|
|
Index: boto-2.40.0/tests/integration/route53/test_zone.py
|
|
===================================================================
|
|
--- boto-2.40.0.orig/tests/integration/route53/test_zone.py
|
|
+++ boto-2.40.0/tests/integration/route53/test_zone.py
|
|
@@ -186,6 +186,12 @@ class TestRoute53PrivateZone(unittest.Te
|
|
vpc_id=self.test_vpc.id,
|
|
vpc_region='us-east-1')
|
|
|
|
+ def test_get_hosted_zone_for_private_zone(self):
|
|
+ self.get_hosted_zone = self.route53.get_hosted_zone_by_name(self.base_domain)
|
|
+ self.assertEquals(len(self.get_hosted_zone['GetHostedZoneResponse']['VPCs']), 1)
|
|
+ self.assertEquals(self.get_hosted_zone['GetHostedZoneResponse']['VPCs'][0]['VPCRegion'], 'us-east-1')
|
|
+ self.assertEquals(self.get_hosted_zone['GetHostedZoneResponse']['VPCs'][0]['VPCId'], self.test_vpc.id)
|
|
+
|
|
@classmethod
|
|
def tearDownClass(self):
|
|
if self.zone is not None:
|
|
Index: boto-2.40.0/tests/unit/route53/test_connection.py
|
|
===================================================================
|
|
--- boto-2.40.0.orig/tests/unit/route53/test_connection.py
|
|
+++ boto-2.40.0/tests/unit/route53/test_connection.py
|
|
@@ -313,6 +313,16 @@ class TestGetHostedZoneRoute53(AWSMockSe
|
|
<NameServer>ns-1000.awsdns-00.co.uk</NameServer>
|
|
</NameServers>
|
|
</DelegationSet>
|
|
+ <VPCs>
|
|
+ <VPC>
|
|
+ <VPCRegion>eu-west-1</VPCRegion>
|
|
+ <VPCId>vpc-12345</VPCId>
|
|
+ </VPC>
|
|
+ <VPC>
|
|
+ <VPCRegion>us-west-1</VPCRegion>
|
|
+ <VPCId>vpc-78900</VPCId>
|
|
+ </VPC>
|
|
+ </VPCs>
|
|
</GetHostedZoneResponse>
|
|
"""
|
|
|
|
@@ -330,6 +340,18 @@ class TestGetHostedZoneRoute53(AWSMockSe
|
|
['DelegationSet']['NameServers'],
|
|
['ns-1000.awsdns-40.org', 'ns-200.awsdns-30.com',
|
|
'ns-900.awsdns-50.net', 'ns-1000.awsdns-00.co.uk'])
|
|
+ self.assertEqual(response['GetHostedZoneResponse']
|
|
+ ['VPCs'][0]['VPCRegion'],
|
|
+ 'eu-west-1')
|
|
+ self.assertEqual(response['GetHostedZoneResponse']
|
|
+ ['VPCs'][0]['VPCId'],
|
|
+ 'vpc-12345')
|
|
+ self.assertEqual(response['GetHostedZoneResponse']
|
|
+ ['VPCs'][1]['VPCRegion'],
|
|
+ 'us-west-1')
|
|
+ self.assertEqual(response['GetHostedZoneResponse']
|
|
+ ['VPCs'][1]['VPCId'],
|
|
+ 'vpc-78900')
|
|
|
|
|
|
@attr(route53=True)
|