qontract-reconcile 0.9.1rc207__py3-none-any.whl → 0.9.1rc208__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qontract-reconcile
3
- Version: 0.9.1rc207
3
+ Version: 0.9.1rc208
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
@@ -235,7 +235,7 @@ reconcile/gql_definitions/terraform_cloudflare_dns/__init__.py,sha256=47DEQpj8HB
235
235
  reconcile/gql_definitions/terraform_cloudflare_dns/terraform_cloudflare_zones.py,sha256=RH92JBJB4HpAv2TzEzy_RVvv2yAEqTSjxa8lju_Rlso,5655
236
236
  reconcile/gql_definitions/terraform_cloudflare_resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
237
237
  reconcile/gql_definitions/terraform_cloudflare_resources/terraform_cloudflare_accounts.py,sha256=LDiLFs6ShmooOOXllNbFr-dN81zC8BOo_LBj4p-g_Dw,3673
238
- reconcile/gql_definitions/terraform_cloudflare_resources/terraform_cloudflare_resources.py,sha256=Q3DV3Xa54nw3Q-U_JKHAko6quFCT-NX1mZ5qdL_nQQs,11379
238
+ reconcile/gql_definitions/terraform_cloudflare_resources/terraform_cloudflare_resources.py,sha256=nCktp5K26yn8rl0Dywfxhhn0oiitLY3O6C4YID8w62c,11607
239
239
  reconcile/gql_definitions/terraform_cloudflare_users/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
240
240
  reconcile/gql_definitions/terraform_cloudflare_users/app_interface_setting_cloudflare_and_vault.py,sha256=OHfIzX9qAePtRwARYNERuvafwVv0Zy0YUbT83Frt3eA,1984
241
241
  reconcile/gql_definitions/terraform_cloudflare_users/terraform_cloudflare_roles.py,sha256=CopEDfqnz6M-rW4kwkbFK_5FvAj7t8NzzffGZUhCTuo,4059
@@ -368,7 +368,7 @@ reconcile/test/test_utils_terraform.py,sha256=ER02AnPHwoV8Ry0sSe1HXvOxFv0cxcblf3
368
368
  reconcile/test/test_utils_terraform_client.py,sha256=kKVtMerDRx9Ienw5gQt-t2UZOBefnu7VW7xuGGX0nZM,13578
369
369
  reconcile/test/test_utils_terraform_config_client.py,sha256=DhONtE58zrzwcvxEKS0rv1_wN996DYcut_Yk7Y-ptaw,8298
370
370
  reconcile/test/test_utils_terrascript_aws_client.py,sha256=uwfY0xQu4WHFjjVgVR4o1xOLB63NO8ZyCo1S6ma30DE,8272
371
- reconcile/test/test_utils_terrascript_cloudflare_client.py,sha256=bZGkVkzh3Gdl823bZUNDCP40aRKkd0_BxDBn6I5DRKE,19531
371
+ reconcile/test/test_utils_terrascript_cloudflare_client.py,sha256=tmb-wdm9gi8Q8i-OptatfhRhhphpIUb1vA_lwP9C0iU,19855
372
372
  reconcile/test/test_utils_terrascript_cloudflare_resources.py,sha256=h1wKs6XIGIjyBa8etuovOkQ_66DBDVUqHLOKpBfWNGQ,754
373
373
  reconcile/test/test_vault_replication.py,sha256=BKDuwy9C0dsb4n8KRwfZDGlEyXCKAZMMKOU-pS4ZWu8,16865
374
374
  reconcile/test/test_vault_utils.py,sha256=vbJnc89XAuE07qbTuWxHM5o9F6R9SO5aHXA38fwxT7A,1122
@@ -497,7 +497,7 @@ reconcile/utils/terraform/config.py,sha256=5UVrd563TMcvi4ooa5JvWVDW1I3bIWg484u79
497
497
  reconcile/utils/terraform/config_client.py,sha256=t4novdX7GeYPMYms97C_BBtLmt0M8CJCmCT7QHENwxg,4687
498
498
  reconcile/utils/terrascript/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
499
499
  reconcile/utils/terrascript/cloudflare_client.py,sha256=ip8UAM7Kq25sB3WWtw3aplJAHqLhNFjFsFArYT6YrSQ,9568
500
- reconcile/utils/terrascript/cloudflare_resources.py,sha256=XVMm7PGRMdb6vvyPQw-VXDmL_18AW5Zkd-ir2DX77Q0,14866
500
+ reconcile/utils/terrascript/cloudflare_resources.py,sha256=GM8nHTbqUej3mjVGrv34l9GY3cXU3fDGFN3QU9LWm7Q,13896
501
501
  reconcile/utils/terrascript/models.py,sha256=x9HReI0k71MHBpRTvvmPlE0G6rri5GTzPXM9cqyTWm0,475
502
502
  reconcile/utils/terrascript/resources.py,sha256=bQzglnO41KZZEIeXYgi-qlup1p8R03Qyx_V944LRPsc,1391
503
503
  release/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -513,8 +513,8 @@ tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y
513
513
  tools/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
514
514
  tools/test/test_qontract_cli.py,sha256=awwTHEc2DWlykuqGIYM0WOBoSL0KRnOraCLk3C7izis,1401
515
515
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
516
- qontract_reconcile-0.9.1rc207.dist-info/METADATA,sha256=7EMqV24ipSP5LGMSwCidhovKO2HWoLFbWHPGXG15X9s,2248
517
- qontract_reconcile-0.9.1rc207.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
518
- qontract_reconcile-0.9.1rc207.dist-info/entry_points.txt,sha256=3BPvsRryM1C4S_mb5kXmP5AVv-wJBzVCrOJyv6qUmc0,195
519
- qontract_reconcile-0.9.1rc207.dist-info/top_level.txt,sha256=j0CHPIc8TsVRB50wOz_jhxjjaRyCJB3NOQeXhuHS67c,34
520
- qontract_reconcile-0.9.1rc207.dist-info/RECORD,,
516
+ qontract_reconcile-0.9.1rc208.dist-info/METADATA,sha256=a9IgT3fr73kk3vGi-rWRl2nJpI0bhIHCKxfcRqCkeGY,2248
517
+ qontract_reconcile-0.9.1rc208.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
518
+ qontract_reconcile-0.9.1rc208.dist-info/entry_points.txt,sha256=3BPvsRryM1C4S_mb5kXmP5AVv-wJBzVCrOJyv6qUmc0,195
519
+ qontract_reconcile-0.9.1rc208.dist-info/top_level.txt,sha256=j0CHPIc8TsVRB50wOz_jhxjjaRyCJB3NOQeXhuHS67c,34
520
+ qontract_reconcile-0.9.1rc208.dist-info/RECORD,,
@@ -148,6 +148,9 @@ query TerraformCloudflareResources {
148
148
  ownership_challenge
149
149
  dataset
150
150
  frequency
151
+ job_name: name
152
+ filter
153
+ kind
151
154
  }
152
155
  ... on NamespaceTerraformResourceLogpullRetention_v1
153
156
  {
@@ -304,6 +307,9 @@ class NamespaceTerraformResourceLogpushJobV1(NamespaceTerraformResourceCloudflar
304
307
  ownership_challenge: Optional[str] = Field(..., alias="ownership_challenge")
305
308
  dataset: Optional[str] = Field(..., alias="dataset")
306
309
  frequency: Optional[str] = Field(..., alias="frequency")
310
+ job_name: Optional[str] = Field(..., alias="job_name")
311
+ filter: Optional[str] = Field(..., alias="filter")
312
+ kind: Optional[str] = Field(..., alias="kind")
307
313
 
308
314
 
309
315
  class NamespaceTerraformResourceLogpullRetentionV1(
@@ -168,6 +168,7 @@ def test_create_cloudflare_resources_terraform_json(account_config, backend_conf
168
168
  "ownership_challenge": "some-challenge",
169
169
  "dataset": "http_requests",
170
170
  "frequency": "high",
171
+ "kind": "edge",
171
172
  },
172
173
  {},
173
174
  )
@@ -183,6 +184,8 @@ def test_create_cloudflare_resources_terraform_json(account_config, backend_conf
183
184
  "ownership_challenge": "some-challenge",
184
185
  "dataset": "http_requests",
185
186
  "frequency": "high",
187
+ "job_name": "Logpush job for account",
188
+ "filter": '{"key":"BotScore","operator":"lt","value":"30"}',
186
189
  },
187
190
  {},
188
191
  )
@@ -322,6 +325,7 @@ def test_create_cloudflare_resources_terraform_json(account_config, backend_conf
322
325
  "frequency": "high",
323
326
  "logpull_options": "fields=RayID,ClientIP,EdgeStartTimestamp&timestamps=rfc3339",
324
327
  "ownership_challenge": "some-challenge",
328
+ "kind": "edge",
325
329
  },
326
330
  "logpush_job_account": {
327
331
  "account_id": "${var.account_id}",
@@ -331,6 +335,8 @@ def test_create_cloudflare_resources_terraform_json(account_config, backend_conf
331
335
  "frequency": "high",
332
336
  "logpull_options": "fields=RayID,ClientIP,EdgeStartTimestamp&timestamps=rfc3339",
333
337
  "ownership_challenge": "some-challenge",
338
+ "name": "Logpush job for account",
339
+ "filter": '{"key":"BotScore","operator":"lt","value":"30"}',
334
340
  },
335
341
  },
336
342
  "cloudflare_logpull_retention": {
@@ -302,44 +302,21 @@ class CloudflareLogpushJob(TerrascriptResource):
302
302
  def populate(self) -> list[Union[Resource, Output, Data]]:
303
303
  resources = []
304
304
  values = ResourceValueResolver(self._spec).resolve()
305
- destination_conf = values.get("destination_conf")
306
- zone = values.get("zone_name")
307
- enabled = values.get("enabled")
308
- logpull_options = values.get("logpull_options")
309
- dataset = values.get("dataset")
310
- frequency = values.get("frequency")
311
- ownership_challenge = values.get("ownership_challenge")
305
+ zone = values.pop("zone_name", None)
306
+ name = values.pop("job_name", None)
307
+
308
+ if name:
309
+ values["name"] = name
312
310
 
313
311
  if zone:
314
312
  resources.append(
315
313
  self.cloudflare_zone(zone, name=zone, account_id="${var.account_id}")
316
314
  )
317
- resources.append(
318
- cloudflare_logpush_job(
319
- self._spec.identifier,
320
- enabled=enabled,
321
- logpull_options=logpull_options,
322
- ownership_challenge=ownership_challenge,
323
- dataset=dataset,
324
- frequency=frequency,
325
- destination_conf=destination_conf,
326
- zone_id=f"${{data.cloudflare_zone.{zone}.id}}",
327
- )
328
- )
315
+ values["zone_id"] = f"${{data.cloudflare_zone.{zone}.id}}"
329
316
  else:
330
- resources.append(
331
- cloudflare_logpush_job(
332
- self._spec.identifier,
333
- enabled=enabled,
334
- logpull_options=logpull_options,
335
- ownership_challenge=ownership_challenge,
336
- dataset=dataset,
337
- frequency=frequency,
338
- destination_conf=destination_conf,
339
- account_id="${var.account_id}",
340
- )
341
- )
317
+ values["account_id"] = "${var.account_id}"
342
318
 
319
+ resources.append(cloudflare_logpush_job(self._spec.identifier, **values))
343
320
  return resources
344
321
 
345
322