moto 5.0.2.dev7__py2.py3-none-any.whl → 5.0.2.dev8__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- moto/__init__.py +1 -1
- moto/route53/models.py +11 -10
- moto/route53/responses.py +20 -6
- moto/route53/utils.py +6 -0
- {moto-5.0.2.dev7.dist-info → moto-5.0.2.dev8.dist-info}/METADATA +1 -1
- {moto-5.0.2.dev7.dist-info → moto-5.0.2.dev8.dist-info}/RECORD +11 -11
- {moto-5.0.2.dev7.dist-info → moto-5.0.2.dev8.dist-info}/AUTHORS.md +0 -0
- {moto-5.0.2.dev7.dist-info → moto-5.0.2.dev8.dist-info}/LICENSE +0 -0
- {moto-5.0.2.dev7.dist-info → moto-5.0.2.dev8.dist-info}/WHEEL +0 -0
- {moto-5.0.2.dev7.dist-info → moto-5.0.2.dev8.dist-info}/entry_points.txt +0 -0
- {moto-5.0.2.dev7.dist-info → moto-5.0.2.dev8.dist-info}/top_level.txt +0 -0
moto/__init__.py
CHANGED
moto/route53/models.py
CHANGED
|
@@ -723,7 +723,11 @@ class Route53Backend(BaseBackend):
|
|
|
723
723
|
the_zone.delete_rrset(record_set)
|
|
724
724
|
the_zone.rr_changes.append(original_change)
|
|
725
725
|
|
|
726
|
+
@paginate(pagination_model=PAGINATION_MODEL) # type: ignore[misc]
|
|
726
727
|
def list_hosted_zones(self) -> List[FakeZone]:
|
|
728
|
+
"""
|
|
729
|
+
The parameters DelegationSetId and HostedZoneType are not yet implemented
|
|
730
|
+
"""
|
|
727
731
|
return list(self.zones.values())
|
|
728
732
|
|
|
729
733
|
def list_hosted_zones_by_name(
|
|
@@ -733,7 +737,7 @@ class Route53Backend(BaseBackend):
|
|
|
733
737
|
dnsname = dnsnames[0]
|
|
734
738
|
if dnsname[-1] != ".":
|
|
735
739
|
dnsname += "."
|
|
736
|
-
zones = [zone for zone in self.
|
|
740
|
+
zones = [zone for zone in self.zones.values() if zone.name == dnsname]
|
|
737
741
|
else:
|
|
738
742
|
dnsname = None
|
|
739
743
|
# sort by names, but with domain components reversed
|
|
@@ -745,8 +749,7 @@ class Route53Backend(BaseBackend):
|
|
|
745
749
|
domains = domains[-1:] + domains[:-1]
|
|
746
750
|
return ".".join(reversed(domains))
|
|
747
751
|
|
|
748
|
-
zones = self.
|
|
749
|
-
zones = sorted(zones, key=sort_key)
|
|
752
|
+
zones = sorted(self.zones.values(), key=sort_key)
|
|
750
753
|
return dnsname, zones
|
|
751
754
|
|
|
752
755
|
def list_hosted_zones_by_vpc(self, vpc_id: str) -> List[Dict[str, Any]]:
|
|
@@ -754,7 +757,7 @@ class Route53Backend(BaseBackend):
|
|
|
754
757
|
Pagination is not yet implemented
|
|
755
758
|
"""
|
|
756
759
|
zone_list = []
|
|
757
|
-
for zone in self.
|
|
760
|
+
for zone in self.zones.values():
|
|
758
761
|
if zone.private_zone is True:
|
|
759
762
|
this_zone = self.get_hosted_zone(zone.id)
|
|
760
763
|
for vpc in this_zone.vpcs:
|
|
@@ -776,10 +779,10 @@ class Route53Backend(BaseBackend):
|
|
|
776
779
|
return the_zone
|
|
777
780
|
|
|
778
781
|
def get_hosted_zone_count(self) -> int:
|
|
779
|
-
return len(self.
|
|
782
|
+
return len(self.zones.values())
|
|
780
783
|
|
|
781
784
|
def get_hosted_zone_by_name(self, name: str) -> Optional[FakeZone]:
|
|
782
|
-
for zone in self.
|
|
785
|
+
for zone in self.zones.values():
|
|
783
786
|
if zone.name == name:
|
|
784
787
|
return zone
|
|
785
788
|
return None
|
|
@@ -875,8 +878,7 @@ class Route53Backend(BaseBackend):
|
|
|
875
878
|
) -> QueryLoggingConfig:
|
|
876
879
|
"""Process the create_query_logging_config request."""
|
|
877
880
|
# Does the hosted_zone_id exist?
|
|
878
|
-
|
|
879
|
-
zones = list(response) if response else []
|
|
881
|
+
zones = list(self.zones.values())
|
|
880
882
|
for zone in zones:
|
|
881
883
|
if zone.id == hosted_zone_id:
|
|
882
884
|
break
|
|
@@ -940,8 +942,7 @@ class Route53Backend(BaseBackend):
|
|
|
940
942
|
"""Return a list of query logging configs."""
|
|
941
943
|
if hosted_zone_id:
|
|
942
944
|
# Does the hosted_zone_id exist?
|
|
943
|
-
|
|
944
|
-
zones = list(response) if response else []
|
|
945
|
+
zones = list(self.zones.values())
|
|
945
946
|
for zone in zones:
|
|
946
947
|
if zone.id == hosted_zone_id:
|
|
947
948
|
break
|
moto/route53/responses.py
CHANGED
|
@@ -81,16 +81,27 @@ class Route53(BaseResponse):
|
|
|
81
81
|
vpcregion=vpcregion,
|
|
82
82
|
delegation_set_id=delegation_set_id,
|
|
83
83
|
)
|
|
84
|
-
template = Template(CREATE_HOSTED_ZONE_RESPONSE)
|
|
84
|
+
template = Template(CREATE_HOSTED_ZONE_RESPONSE).render(zone=new_zone)
|
|
85
85
|
headers = {
|
|
86
86
|
"Location": f"https://route53.amazonaws.com/2013-04-01/hostedzone/{new_zone.id}"
|
|
87
87
|
}
|
|
88
|
-
return 201, headers, template
|
|
88
|
+
return 201, headers, template
|
|
89
89
|
|
|
90
90
|
elif request.method == "GET":
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
max_size = self.querystring.get("maxitems", [None])[0]
|
|
92
|
+
if max_size:
|
|
93
|
+
max_size = int(max_size)
|
|
94
|
+
marker = self.querystring.get("marker", [None])[0]
|
|
95
|
+
zone_page, next_marker = self.backend.list_hosted_zones(
|
|
96
|
+
marker=marker, max_size=max_size
|
|
97
|
+
)
|
|
98
|
+
template = Template(LIST_HOSTED_ZONES_RESPONSE).render(
|
|
99
|
+
zones=zone_page,
|
|
100
|
+
marker=marker,
|
|
101
|
+
next_marker=next_marker,
|
|
102
|
+
max_items=max_size,
|
|
103
|
+
)
|
|
104
|
+
return 200, headers, template
|
|
94
105
|
|
|
95
106
|
def list_hosted_zones_by_name_response(
|
|
96
107
|
self, request: Any, full_url: str, headers: Any
|
|
@@ -704,7 +715,10 @@ LIST_HOSTED_ZONES_RESPONSE = """<ListHostedZonesResponse xmlns="https://route53.
|
|
|
704
715
|
</HostedZone>
|
|
705
716
|
{% endfor %}
|
|
706
717
|
</HostedZones>
|
|
707
|
-
<
|
|
718
|
+
{% if marker %}<Marker>{{ marker }}</Marker>{% endif %}
|
|
719
|
+
{%if next_marker %}<NextMarker>{{ next_marker }}</NextMarker>{% endif %}
|
|
720
|
+
{%if max_items %}<MaxItems>{{ max_items }}</MaxItems>{% endif %}
|
|
721
|
+
<IsTruncated>{{ 'true' if next_marker else 'false'}}</IsTruncated>
|
|
708
722
|
</ListHostedZonesResponse>"""
|
|
709
723
|
|
|
710
724
|
LIST_HOSTED_ZONES_BY_NAME_RESPONSE = """<ListHostedZonesByNameResponse xmlns="{{ xmlns }}">
|
moto/route53/utils.py
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
from .exceptions import InvalidPaginationToken
|
|
3
3
|
|
|
4
4
|
PAGINATION_MODEL = {
|
|
5
|
+
"list_hosted_zones": {
|
|
6
|
+
"input_token": "marker",
|
|
7
|
+
"limit_key": "max_size",
|
|
8
|
+
"limit_default": 100,
|
|
9
|
+
"unique_attribute": "id",
|
|
10
|
+
},
|
|
5
11
|
"list_query_logging_configs": {
|
|
6
12
|
"input_token": "next_token",
|
|
7
13
|
"limit_key": "max_results",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
moto/__init__.py,sha256=
|
|
1
|
+
moto/__init__.py,sha256=ZAdhYHCx1nkqNM8hGEMnPEloN1H6PPqFgJatAp_jAf0,100
|
|
2
2
|
moto/backend_index.py,sha256=0ZXW2MoTfOl-F3w0DiRCg4XefVIWvLgAmZW-3Pcx7f4,10951
|
|
3
3
|
moto/backends.py,sha256=uM9-6lJ6cqPJuKKFymnhidN1iqslTmOUfnYDT3mvOPI,24575
|
|
4
4
|
moto/proxy.py,sha256=5oz1ZGQP4SoWDYycZApQSRmOv9M-TpjeJpJY9fG3oxY,3113
|
|
@@ -830,10 +830,10 @@ moto/robomaker/responses.py,sha256=l8X_yzTCihrGItZSZJEHfSIKvWCrPUSVRnIZ2QdjYVA,1
|
|
|
830
830
|
moto/robomaker/urls.py,sha256=bWI4R347OSGc1HtvRTvzOftRq9BDk38e-6Xot56RkiU,375
|
|
831
831
|
moto/route53/__init__.py,sha256=-cqzuaCnL6aA7UWUlsCYQ_VUYNtk9yNyIgilOCBzVio,51
|
|
832
832
|
moto/route53/exceptions.py,sha256=Bbqg11F-Uyi7sb7MAaJ5LOglXcWPp5doGp1unb9H9fs,6014
|
|
833
|
-
moto/route53/models.py,sha256=
|
|
834
|
-
moto/route53/responses.py,sha256=
|
|
833
|
+
moto/route53/models.py,sha256=TizwR15LaDOCsnqeqC2TPAjim7dTbKSst-7mgzO6LEg,39407
|
|
834
|
+
moto/route53/responses.py,sha256=p14FuZNz5hvFcXgPN0gIXwBMDlyEpf_FHpGsC_rVd90,37581
|
|
835
835
|
moto/route53/urls.py,sha256=zuweZkUMC3o3eO2rzNpJr4WvFrH_zaxs8DMJHc1majU,3607
|
|
836
|
-
moto/route53/utils.py,sha256=
|
|
836
|
+
moto/route53/utils.py,sha256=ta6hnmgk99aGBqBoDIyi-4hnyPK4aarTxjQz2E0IDVo,528
|
|
837
837
|
moto/route53resolver/__init__.py,sha256=w6Cj-tmD7kIFT3kthNprVBlEXdiWWS9aqNm--Wifp_A,59
|
|
838
838
|
moto/route53resolver/exceptions.py,sha256=ZhUYGsBUXN6D2BLvtCTHkdScCkatsUMmZZwYLYaKVAM,2367
|
|
839
839
|
moto/route53resolver/models.py,sha256=RaEuOsZiwFpF2VhlmL0b6Q9TB_mCA2jza-qG1xfcz_U,37414
|
|
@@ -1070,10 +1070,10 @@ moto/xray/mock_client.py,sha256=_hckCof1BgtizZ4u-Da0tpXX9JNGTbVs7AhbkxBnuGU,3811
|
|
|
1070
1070
|
moto/xray/models.py,sha256=NbevJjH4Qly1A6YM0SswSv7gTBc44547Zl5XnRMd84s,11229
|
|
1071
1071
|
moto/xray/responses.py,sha256=StNwTGhzvkqCmghSo2O9tMfTRQSN4BWYzLODyKMUj-s,6316
|
|
1072
1072
|
moto/xray/urls.py,sha256=R6T3gMwobWipukWcC1DQ36CU1Rjt6oqBDoe-7HqaIZU,393
|
|
1073
|
-
moto-5.0.2.
|
|
1074
|
-
moto-5.0.2.
|
|
1075
|
-
moto-5.0.2.
|
|
1076
|
-
moto-5.0.2.
|
|
1077
|
-
moto-5.0.2.
|
|
1078
|
-
moto-5.0.2.
|
|
1079
|
-
moto-5.0.2.
|
|
1073
|
+
moto-5.0.2.dev8.dist-info/AUTHORS.md,sha256=dDUhasV8HGSkzb7zj7a0b3alnqY0P1LPOyOUNoo8Mpo,2976
|
|
1074
|
+
moto-5.0.2.dev8.dist-info/LICENSE,sha256=8S75_TlqE-kIeGMLG0-rRxxu2ct6SM8quyUWKBYyIY4,10834
|
|
1075
|
+
moto-5.0.2.dev8.dist-info/METADATA,sha256=MW2spcLk2oOBTl-lRny74V3eXwNGDICER0jXxDKewYU,12754
|
|
1076
|
+
moto-5.0.2.dev8.dist-info/WHEEL,sha256=-G_t0oGuE7UD0DrSpVZnq1hHMBV9DD2XkS5v7XpmTnk,110
|
|
1077
|
+
moto-5.0.2.dev8.dist-info/entry_points.txt,sha256=QWCojULQb54Hi_2KamEEYHA6Cwek_vN685aS8DbI9rU,78
|
|
1078
|
+
moto-5.0.2.dev8.dist-info/top_level.txt,sha256=TETRKAPcAAvoZDkSkwQiZtTSr-1gzaEAXVm9FmZKj8s,5
|
|
1079
|
+
moto-5.0.2.dev8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|