qontract-reconcile 0.9.1rc174__py3-none-any.whl → 0.9.1rc175__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.
- {qontract_reconcile-0.9.1rc174.dist-info → qontract_reconcile-0.9.1rc175.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.9.1rc174.dist-info → qontract_reconcile-0.9.1rc175.dist-info}/RECORD +6 -6
- reconcile/terraform_cloudflare_dns.py +20 -0
- {qontract_reconcile-0.9.1rc174.dist-info → qontract_reconcile-0.9.1rc175.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.9.1rc174.dist-info → qontract_reconcile-0.9.1rc175.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.9.1rc174.dist-info → qontract_reconcile-0.9.1rc175.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.9.1rc174.dist-info → qontract_reconcile-0.9.1rc175.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.9.
|
3
|
+
Version: 0.9.1rc175
|
4
4
|
Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
|
5
5
|
Home-page: https://github.com/app-sre/qontract-reconcile
|
6
6
|
Author: Red Hat App-SRE Team
|
@@ -125,7 +125,7 @@ reconcile/sql_query.py,sha256=Xbg6iqotgwwFMx5i5-dMX3L8w_HDn2XLWDkvNC1oG_A,22188
|
|
125
125
|
reconcile/status.py,sha256=tRYtzPFsGETOfN57rcsLIJRl7cZVFkfQXNsUtoeJ7ns,545
|
126
126
|
reconcile/template_tester.py,sha256=vZz8GM46waQUGd3OVnhW5OLTqctFMH_Hh1QXxT5hduM,2384
|
127
127
|
reconcile/terraform_aws_route53.py,sha256=fDNLXs8P1RyijqxFORypb1tRwaZYGATfT_Db9_HXXbw,9085
|
128
|
-
reconcile/terraform_cloudflare_dns.py,sha256=
|
128
|
+
reconcile/terraform_cloudflare_dns.py,sha256=1nYuAFAEAFh1k66mpDgjgfSywajTwC01j4noB4SxlYU,12616
|
129
129
|
reconcile/terraform_cloudflare_resources.py,sha256=kLFW7JFRr3_zNtw1kxed8YJFyHojUFQVBL2nEyr5drs,7028
|
130
130
|
reconcile/terraform_cloudflare_users.py,sha256=lTbrxi8OtW9Pfcr7Yp-70ihldMQKx9dJ7ZgbGHey1XE,13627
|
131
131
|
reconcile/terraform_resources.py,sha256=GJtbB37YEUznHJ2ZNVPMVENeyEqIkB57iHUT3P4MxWI,21888
|
@@ -491,8 +491,8 @@ tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y
|
|
491
491
|
tools/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
492
492
|
tools/test/test_qontract_cli.py,sha256=awwTHEc2DWlykuqGIYM0WOBoSL0KRnOraCLk3C7izis,1401
|
493
493
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
494
|
-
qontract_reconcile-0.9.
|
495
|
-
qontract_reconcile-0.9.
|
496
|
-
qontract_reconcile-0.9.
|
497
|
-
qontract_reconcile-0.9.
|
498
|
-
qontract_reconcile-0.9.
|
494
|
+
qontract_reconcile-0.9.1rc175.dist-info/METADATA,sha256=gu4YwVziFqPE3otyqFSQFiqE8fqPuV0fzFWrd9Tgmqs,2241
|
495
|
+
qontract_reconcile-0.9.1rc175.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
496
|
+
qontract_reconcile-0.9.1rc175.dist-info/entry_points.txt,sha256=3BPvsRryM1C4S_mb5kXmP5AVv-wJBzVCrOJyv6qUmc0,195
|
497
|
+
qontract_reconcile-0.9.1rc175.dist-info/top_level.txt,sha256=j0CHPIc8TsVRB50wOz_jhxjjaRyCJB3NOQeXhuHS67c,34
|
498
|
+
qontract_reconcile-0.9.1rc175.dist-info/RECORD,,
|
@@ -92,6 +92,10 @@ class TerraformCloudflareDNSIntegration(
|
|
92
92
|
|
93
93
|
query_zones = self._get_cloudflare_desired_state()
|
94
94
|
|
95
|
+
if are_record_identifiers_duplicated_within_zone(query_zones):
|
96
|
+
logging.error("Duplicate DNS record identifier(s) detected.")
|
97
|
+
sys.exit(ExitCodes.ERROR)
|
98
|
+
|
95
99
|
# Build Cloudflare clients
|
96
100
|
cf_clients = TerraformConfigClientCollection()
|
97
101
|
zone_clients = build_clients(
|
@@ -179,6 +183,22 @@ class TerraformCloudflareDNSIntegration(
|
|
179
183
|
)
|
180
184
|
|
181
185
|
|
186
|
+
def are_record_identifiers_duplicated_within_zone(
|
187
|
+
zone_query_data: CloudflareDnsZoneQueryData,
|
188
|
+
) -> bool:
|
189
|
+
duplicate_exist = False
|
190
|
+
for zone in zone_query_data.zones or []:
|
191
|
+
existing_records = set()
|
192
|
+
for record in zone.records or []:
|
193
|
+
record_id = record.identifier
|
194
|
+
if record_id not in existing_records:
|
195
|
+
existing_records.add(record_id)
|
196
|
+
else:
|
197
|
+
logging.warning(f"{record_id} already exists in zone {zone.identifier}")
|
198
|
+
duplicate_exist = True
|
199
|
+
return duplicate_exist
|
200
|
+
|
201
|
+
|
182
202
|
def get_cloudflare_provider_rps(
|
183
203
|
records: Optional[Sequence[CloudflareDnsRecordV1]],
|
184
204
|
) -> int:
|
File without changes
|
{qontract_reconcile-0.9.1rc174.dist-info → qontract_reconcile-0.9.1rc175.dist-info}/entry_points.txt
RENAMED
File without changes
|
{qontract_reconcile-0.9.1rc174.dist-info → qontract_reconcile-0.9.1rc175.dist-info}/top_level.txt
RENAMED
File without changes
|