]> git.pld-linux.org Git - packages/python-boto.git/blob - boto-multi-vpc-zone.patch
- added Fedora patches + fixes for collections.abc moves in python 3.10; release 6
[packages/python-boto.git] / boto-multi-vpc-zone.patch
1 Index: boto-2.40.0/boto/route53/connection.py
2 ===================================================================
3 --- boto-2.40.0.orig/boto/route53/connection.py
4 +++ boto-2.40.0/boto/route53/connection.py
5 @@ -152,8 +152,8 @@ class Route53Connection(AWSAuthConnectio
6              raise exception.DNSServerError(response.status,
7                                             response.reason,
8                                             body)
9 -        e = boto.jsonresponse.Element(list_marker='NameServers',
10 -                                      item_marker=('NameServer',))
11 +        e = boto.jsonresponse.Element(list_marker=('NameServers', 'VPCs'),
12 +                                      item_marker=('NameServer', 'VPC'))
13          h = boto.jsonresponse.XmlHandler(e, None)
14          h.parse(body)
15          return e
16 Index: boto-2.40.0/tests/integration/route53/test_zone.py
17 ===================================================================
18 --- boto-2.40.0.orig/tests/integration/route53/test_zone.py
19 +++ boto-2.40.0/tests/integration/route53/test_zone.py
20 @@ -186,6 +186,12 @@ class TestRoute53PrivateZone(unittest.Te
21                                                      vpc_id=self.test_vpc.id,
22                                                      vpc_region='us-east-1')
23  
24 +    def test_get_hosted_zone_for_private_zone(self):
25 +        self.get_hosted_zone = self.route53.get_hosted_zone_by_name(self.base_domain)
26 +        self.assertEquals(len(self.get_hosted_zone['GetHostedZoneResponse']['VPCs']), 1)
27 +        self.assertEquals(self.get_hosted_zone['GetHostedZoneResponse']['VPCs'][0]['VPCRegion'], 'us-east-1')
28 +        self.assertEquals(self.get_hosted_zone['GetHostedZoneResponse']['VPCs'][0]['VPCId'], self.test_vpc.id)
29 +
30      @classmethod
31      def tearDownClass(self):
32          if self.zone is not None:
33 Index: boto-2.40.0/tests/unit/route53/test_connection.py
34 ===================================================================
35 --- boto-2.40.0.orig/tests/unit/route53/test_connection.py
36 +++ boto-2.40.0/tests/unit/route53/test_connection.py
37 @@ -313,6 +313,16 @@ class TestGetHostedZoneRoute53(AWSMockSe
38              <NameServer>ns-1000.awsdns-00.co.uk</NameServer>
39          </NameServers>
40      </DelegationSet>
41 +    <VPCs>
42 +        <VPC>
43 +            <VPCRegion>eu-west-1</VPCRegion>
44 +            <VPCId>vpc-12345</VPCId>
45 +        </VPC>
46 +        <VPC>
47 +            <VPCRegion>us-west-1</VPCRegion>
48 +            <VPCId>vpc-78900</VPCId>
49 +        </VPC>
50 +   </VPCs>
51  </GetHostedZoneResponse>
52  """
53  
54 @@ -330,6 +340,18 @@ class TestGetHostedZoneRoute53(AWSMockSe
55                                   ['DelegationSet']['NameServers'],
56                           ['ns-1000.awsdns-40.org', 'ns-200.awsdns-30.com',
57                            'ns-900.awsdns-50.net', 'ns-1000.awsdns-00.co.uk'])
58 +        self.assertEqual(response['GetHostedZoneResponse']
59 +                                 ['VPCs'][0]['VPCRegion'],
60 +                         'eu-west-1')
61 +        self.assertEqual(response['GetHostedZoneResponse']
62 +                                 ['VPCs'][0]['VPCId'],
63 +                         'vpc-12345')
64 +        self.assertEqual(response['GetHostedZoneResponse']
65 +                                 ['VPCs'][1]['VPCRegion'],
66 +                         'us-west-1')
67 +        self.assertEqual(response['GetHostedZoneResponse']
68 +                                 ['VPCs'][1]['VPCId'],
69 +                         'vpc-78900')
70  
71  
72  @attr(route53=True)
This page took 0.07903 seconds and 3 git commands to generate.