qontract-reconcile 0.10.2.dev504__py3-none-any.whl → 0.10.2.dev506__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.10.2.dev504.dist-info → qontract_reconcile-0.10.2.dev506.dist-info}/METADATA +1 -4
- {qontract_reconcile-0.10.2.dev504.dist-info → qontract_reconcile-0.10.2.dev506.dist-info}/RECORD +11 -29
- reconcile/cli.py +0 -108
- reconcile/gql_definitions/integrations/integrations.py +1 -31
- reconcile/gql_definitions/introspection.json +530 -2107
- reconcile/integrations_manager.py +0 -2
- reconcile/utils/external_resource_spec.py +1 -2
- reconcile/utils/runtime/sharding.py +0 -80
- tools/cli_commands/systems_and_tools.py +0 -23
- reconcile/gql_definitions/terraform_cloudflare_dns/__init__.py +0 -0
- reconcile/gql_definitions/terraform_cloudflare_dns/app_interface_cloudflare_dns_settings.py +0 -62
- reconcile/gql_definitions/terraform_cloudflare_dns/terraform_cloudflare_zones.py +0 -193
- reconcile/gql_definitions/terraform_cloudflare_resources/__init__.py +0 -0
- reconcile/gql_definitions/terraform_cloudflare_resources/terraform_cloudflare_accounts.py +0 -127
- reconcile/gql_definitions/terraform_cloudflare_resources/terraform_cloudflare_resources.py +0 -359
- reconcile/gql_definitions/terraform_cloudflare_users/__init__.py +0 -0
- reconcile/gql_definitions/terraform_cloudflare_users/app_interface_setting_cloudflare_and_vault.py +0 -62
- reconcile/gql_definitions/terraform_cloudflare_users/terraform_cloudflare_roles.py +0 -139
- reconcile/terraform_cloudflare_dns.py +0 -379
- reconcile/terraform_cloudflare_resources.py +0 -445
- reconcile/terraform_cloudflare_users.py +0 -374
- reconcile/typed_queries/cloudflare.py +0 -10
- reconcile/utils/terrascript/__init__.py +0 -0
- reconcile/utils/terrascript/cloudflare_client.py +0 -310
- reconcile/utils/terrascript/cloudflare_resources.py +0 -432
- reconcile/utils/terrascript/models.py +0 -26
- reconcile/utils/terrascript/resources.py +0 -43
- {qontract_reconcile-0.10.2.dev504.dist-info → qontract_reconcile-0.10.2.dev506.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.2.dev504.dist-info → qontract_reconcile-0.10.2.dev506.dist-info}/entry_points.txt +0 -0
|
@@ -1,359 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Generated by qenerate plugin=pydantic_v2. DO NOT MODIFY MANUALLY!
|
|
3
|
-
"""
|
|
4
|
-
from collections.abc import Callable # noqa: F401 # pylint: disable=W0611
|
|
5
|
-
from datetime import datetime # noqa: F401 # pylint: disable=W0611
|
|
6
|
-
from enum import Enum # noqa: F401 # pylint: disable=W0611
|
|
7
|
-
from typing import ( # noqa: F401 # pylint: disable=W0611
|
|
8
|
-
Any,
|
|
9
|
-
Optional,
|
|
10
|
-
Union,
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
from pydantic import ( # noqa: F401 # pylint: disable=W0611
|
|
14
|
-
BaseModel,
|
|
15
|
-
ConfigDict,
|
|
16
|
-
Field,
|
|
17
|
-
Json,
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
from reconcile.gql_definitions.fragments.jumphost_common_fields import CommonJumphostFields
|
|
21
|
-
from reconcile.gql_definitions.fragments.vault_secret import VaultSecret
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
DEFINITION = """
|
|
25
|
-
fragment CommonJumphostFields on ClusterJumpHost_v1 {
|
|
26
|
-
hostname
|
|
27
|
-
knownHosts
|
|
28
|
-
user
|
|
29
|
-
port
|
|
30
|
-
remotePort
|
|
31
|
-
identity {
|
|
32
|
-
...VaultSecret
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
fragment VaultSecret on VaultSecret_v1 {
|
|
37
|
-
path
|
|
38
|
-
field
|
|
39
|
-
version
|
|
40
|
-
format
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
query TerraformCloudflareResources {
|
|
44
|
-
namespaces: namespaces_v1 {
|
|
45
|
-
name
|
|
46
|
-
clusterAdmin
|
|
47
|
-
cluster {
|
|
48
|
-
name
|
|
49
|
-
serverUrl
|
|
50
|
-
insecureSkipTLSVerify
|
|
51
|
-
jumpHost {
|
|
52
|
-
...CommonJumphostFields
|
|
53
|
-
}
|
|
54
|
-
automationToken {
|
|
55
|
-
...VaultSecret
|
|
56
|
-
}
|
|
57
|
-
clusterAdminAutomationToken {
|
|
58
|
-
...VaultSecret
|
|
59
|
-
}
|
|
60
|
-
spec {
|
|
61
|
-
region
|
|
62
|
-
}
|
|
63
|
-
internal
|
|
64
|
-
disable {
|
|
65
|
-
integrations
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
managedExternalResources
|
|
69
|
-
externalResources {
|
|
70
|
-
provider
|
|
71
|
-
... on NamespaceTerraformProviderResourceCloudflare_v1 {
|
|
72
|
-
provider
|
|
73
|
-
provisioner {
|
|
74
|
-
name
|
|
75
|
-
}
|
|
76
|
-
resources {
|
|
77
|
-
provider
|
|
78
|
-
... on NamespaceTerraformResourceCloudflareWorkerScript_v1 {
|
|
79
|
-
identifier
|
|
80
|
-
name
|
|
81
|
-
content_from_github {
|
|
82
|
-
repo
|
|
83
|
-
path
|
|
84
|
-
ref
|
|
85
|
-
}
|
|
86
|
-
vars {
|
|
87
|
-
name
|
|
88
|
-
text
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
... on NamespaceTerraformResourceCloudflareZone_v1 {
|
|
92
|
-
identifier
|
|
93
|
-
zone
|
|
94
|
-
plan
|
|
95
|
-
type
|
|
96
|
-
settings
|
|
97
|
-
argo {
|
|
98
|
-
smart_routing
|
|
99
|
-
tiered_caching
|
|
100
|
-
}
|
|
101
|
-
tiered_cache {
|
|
102
|
-
cache_type
|
|
103
|
-
}
|
|
104
|
-
cache_reserve {
|
|
105
|
-
enabled
|
|
106
|
-
}
|
|
107
|
-
records: dns_records {
|
|
108
|
-
identifier
|
|
109
|
-
name
|
|
110
|
-
type
|
|
111
|
-
ttl
|
|
112
|
-
value
|
|
113
|
-
proxied
|
|
114
|
-
}
|
|
115
|
-
workers {
|
|
116
|
-
identifier
|
|
117
|
-
pattern
|
|
118
|
-
script_name
|
|
119
|
-
}
|
|
120
|
-
certificates {
|
|
121
|
-
identifier
|
|
122
|
-
type
|
|
123
|
-
hosts
|
|
124
|
-
validation_method
|
|
125
|
-
validity_days
|
|
126
|
-
certificate_authority
|
|
127
|
-
cloudflare_branding
|
|
128
|
-
wait_for_active_status
|
|
129
|
-
}
|
|
130
|
-
custom_ssl_certificates {
|
|
131
|
-
identifier
|
|
132
|
-
type
|
|
133
|
-
bundle_method
|
|
134
|
-
geo_restrictions
|
|
135
|
-
certificate_secret {
|
|
136
|
-
certificate {
|
|
137
|
-
...VaultSecret
|
|
138
|
-
}
|
|
139
|
-
key {
|
|
140
|
-
...VaultSecret
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
... on NamespaceTerraformResourceLogpushOwnershipChallenge_v1 {
|
|
146
|
-
destination_conf
|
|
147
|
-
zone_name: zone
|
|
148
|
-
identifier
|
|
149
|
-
}
|
|
150
|
-
... on NamespaceTerraformResourceLogpushJob_v1 {
|
|
151
|
-
destination_conf
|
|
152
|
-
zone_name: zone
|
|
153
|
-
identifier
|
|
154
|
-
enabled
|
|
155
|
-
logpull_options
|
|
156
|
-
ownership_challenge
|
|
157
|
-
dataset
|
|
158
|
-
frequency
|
|
159
|
-
job_name: name
|
|
160
|
-
filter
|
|
161
|
-
kind
|
|
162
|
-
}
|
|
163
|
-
... on NamespaceTerraformResourceLogpullRetention_v1 {
|
|
164
|
-
zone
|
|
165
|
-
enabled_flag: enabled
|
|
166
|
-
identifier
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
"""
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
class ConfiguredBaseModel(BaseModel):
|
|
177
|
-
model_config = ConfigDict(
|
|
178
|
-
extra='forbid'
|
|
179
|
-
)
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
class ClusterSpecV1(ConfiguredBaseModel):
|
|
183
|
-
region: str = Field(..., alias="region")
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
class DisableClusterAutomationsV1(ConfiguredBaseModel):
|
|
187
|
-
integrations: Optional[list[str]] = Field(..., alias="integrations")
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
class ClusterV1(ConfiguredBaseModel):
|
|
191
|
-
name: str = Field(..., alias="name")
|
|
192
|
-
server_url: str = Field(..., alias="serverUrl")
|
|
193
|
-
insecure_skip_tls_verify: Optional[bool] = Field(..., alias="insecureSkipTLSVerify")
|
|
194
|
-
jump_host: Optional[CommonJumphostFields] = Field(..., alias="jumpHost")
|
|
195
|
-
automation_token: Optional[VaultSecret] = Field(..., alias="automationToken")
|
|
196
|
-
cluster_admin_automation_token: Optional[VaultSecret] = Field(..., alias="clusterAdminAutomationToken")
|
|
197
|
-
spec: Optional[ClusterSpecV1] = Field(..., alias="spec")
|
|
198
|
-
internal: Optional[bool] = Field(..., alias="internal")
|
|
199
|
-
disable: Optional[DisableClusterAutomationsV1] = Field(..., alias="disable")
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
class NamespaceExternalResourceV1(ConfiguredBaseModel):
|
|
203
|
-
provider: str = Field(..., alias="provider")
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
class CloudflareAccountV1(ConfiguredBaseModel):
|
|
207
|
-
name: str = Field(..., alias="name")
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
class NamespaceTerraformResourceCloudflareV1(ConfiguredBaseModel):
|
|
211
|
-
provider: str = Field(..., alias="provider")
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
class CloudflareZoneWorkerScriptContentFromGithubV1(ConfiguredBaseModel):
|
|
215
|
-
repo: str = Field(..., alias="repo")
|
|
216
|
-
path: str = Field(..., alias="path")
|
|
217
|
-
ref: str = Field(..., alias="ref")
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
class CloudflareZoneWorkerScriptVarsV1(ConfiguredBaseModel):
|
|
221
|
-
name: str = Field(..., alias="name")
|
|
222
|
-
text: str = Field(..., alias="text")
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
class NamespaceTerraformResourceCloudflareWorkerScriptV1(NamespaceTerraformResourceCloudflareV1):
|
|
226
|
-
identifier: str = Field(..., alias="identifier")
|
|
227
|
-
name: str = Field(..., alias="name")
|
|
228
|
-
content_from_github: Optional[CloudflareZoneWorkerScriptContentFromGithubV1] = Field(..., alias="content_from_github")
|
|
229
|
-
vars: Optional[list[CloudflareZoneWorkerScriptVarsV1]] = Field(..., alias="vars")
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
class CloudflareZoneArgoV1(ConfiguredBaseModel):
|
|
233
|
-
smart_routing: Optional[bool] = Field(..., alias="smart_routing")
|
|
234
|
-
tiered_caching: Optional[bool] = Field(..., alias="tiered_caching")
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
class CloudflareZoneTieredCacheV1(ConfiguredBaseModel):
|
|
238
|
-
cache_type: str = Field(..., alias="cache_type")
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
class CloudflareZoneCacheReserveV1(ConfiguredBaseModel):
|
|
242
|
-
enabled: Optional[bool] = Field(..., alias="enabled")
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
class CloudflareDnsRecordV1(ConfiguredBaseModel):
|
|
246
|
-
identifier: str = Field(..., alias="identifier")
|
|
247
|
-
name: str = Field(..., alias="name")
|
|
248
|
-
q_type: str = Field(..., alias="type")
|
|
249
|
-
ttl: int = Field(..., alias="ttl")
|
|
250
|
-
value: Optional[str] = Field(..., alias="value")
|
|
251
|
-
proxied: Optional[bool] = Field(..., alias="proxied")
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
class CloudflareZoneWorkerV1(ConfiguredBaseModel):
|
|
255
|
-
identifier: str = Field(..., alias="identifier")
|
|
256
|
-
pattern: str = Field(..., alias="pattern")
|
|
257
|
-
script_name: str = Field(..., alias="script_name")
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
class CloudflareZoneCertificateV1(ConfiguredBaseModel):
|
|
261
|
-
identifier: str = Field(..., alias="identifier")
|
|
262
|
-
q_type: str = Field(..., alias="type")
|
|
263
|
-
hosts: list[str] = Field(..., alias="hosts")
|
|
264
|
-
validation_method: str = Field(..., alias="validation_method")
|
|
265
|
-
validity_days: int = Field(..., alias="validity_days")
|
|
266
|
-
certificate_authority: str = Field(..., alias="certificate_authority")
|
|
267
|
-
cloudflare_branding: Optional[bool] = Field(..., alias="cloudflare_branding")
|
|
268
|
-
wait_for_active_status: Optional[bool] = Field(..., alias="wait_for_active_status")
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
class CertificateSecretV1(ConfiguredBaseModel):
|
|
272
|
-
certificate: VaultSecret = Field(..., alias="certificate")
|
|
273
|
-
key: VaultSecret = Field(..., alias="key")
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
class CloudflareCustomSSLCertificateV1(ConfiguredBaseModel):
|
|
277
|
-
identifier: str = Field(..., alias="identifier")
|
|
278
|
-
q_type: str = Field(..., alias="type")
|
|
279
|
-
bundle_method: Optional[str] = Field(..., alias="bundle_method")
|
|
280
|
-
geo_restrictions: Optional[str] = Field(..., alias="geo_restrictions")
|
|
281
|
-
certificate_secret: CertificateSecretV1 = Field(..., alias="certificate_secret")
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
class NamespaceTerraformResourceCloudflareZoneV1(NamespaceTerraformResourceCloudflareV1):
|
|
285
|
-
identifier: str = Field(..., alias="identifier")
|
|
286
|
-
zone: str = Field(..., alias="zone")
|
|
287
|
-
plan: Optional[str] = Field(..., alias="plan")
|
|
288
|
-
q_type: Optional[str] = Field(..., alias="type")
|
|
289
|
-
settings: Optional[Json] = Field(..., alias="settings")
|
|
290
|
-
argo: Optional[CloudflareZoneArgoV1] = Field(..., alias="argo")
|
|
291
|
-
tiered_cache: Optional[CloudflareZoneTieredCacheV1] = Field(..., alias="tiered_cache")
|
|
292
|
-
cache_reserve: Optional[CloudflareZoneCacheReserveV1] = Field(..., alias="cache_reserve")
|
|
293
|
-
records: Optional[list[CloudflareDnsRecordV1]] = Field(..., alias="records")
|
|
294
|
-
workers: Optional[list[CloudflareZoneWorkerV1]] = Field(..., alias="workers")
|
|
295
|
-
certificates: Optional[list[CloudflareZoneCertificateV1]] = Field(..., alias="certificates")
|
|
296
|
-
custom_ssl_certificates: Optional[list[CloudflareCustomSSLCertificateV1]] = Field(..., alias="custom_ssl_certificates")
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
class NamespaceTerraformResourceLogpushOwnershipChallengeV1(NamespaceTerraformResourceCloudflareV1):
|
|
300
|
-
destination_conf: str = Field(..., alias="destination_conf")
|
|
301
|
-
zone_name: Optional[str] = Field(..., alias="zone_name")
|
|
302
|
-
identifier: str = Field(..., alias="identifier")
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
class NamespaceTerraformResourceLogpushJobV1(NamespaceTerraformResourceCloudflareV1):
|
|
306
|
-
destination_conf: str = Field(..., alias="destination_conf")
|
|
307
|
-
zone_name: Optional[str] = Field(..., alias="zone_name")
|
|
308
|
-
identifier: str = Field(..., alias="identifier")
|
|
309
|
-
enabled: Optional[bool] = Field(..., alias="enabled")
|
|
310
|
-
logpull_options: Optional[str] = Field(..., alias="logpull_options")
|
|
311
|
-
ownership_challenge: Optional[str] = Field(..., alias="ownership_challenge")
|
|
312
|
-
dataset: Optional[str] = Field(..., alias="dataset")
|
|
313
|
-
frequency: Optional[str] = Field(..., alias="frequency")
|
|
314
|
-
job_name: Optional[str] = Field(..., alias="job_name")
|
|
315
|
-
filter: Optional[str] = Field(..., alias="filter")
|
|
316
|
-
kind: Optional[str] = Field(..., alias="kind")
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
class NamespaceTerraformResourceLogpullRetentionV1(NamespaceTerraformResourceCloudflareV1):
|
|
320
|
-
zone: str = Field(..., alias="zone")
|
|
321
|
-
enabled_flag: bool = Field(..., alias="enabled_flag")
|
|
322
|
-
identifier: str = Field(..., alias="identifier")
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
class NamespaceTerraformProviderResourceCloudflareV1(NamespaceExternalResourceV1):
|
|
326
|
-
provider: str = Field(..., alias="provider")
|
|
327
|
-
provisioner: CloudflareAccountV1 = Field(..., alias="provisioner")
|
|
328
|
-
resources: list[Union[NamespaceTerraformResourceCloudflareZoneV1, NamespaceTerraformResourceLogpushJobV1, NamespaceTerraformResourceCloudflareWorkerScriptV1, NamespaceTerraformResourceLogpushOwnershipChallengeV1, NamespaceTerraformResourceLogpullRetentionV1, NamespaceTerraformResourceCloudflareV1]] = Field(..., alias="resources")
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
class NamespaceV1(ConfiguredBaseModel):
|
|
332
|
-
name: str = Field(..., alias="name")
|
|
333
|
-
cluster_admin: Optional[bool] = Field(..., alias="clusterAdmin")
|
|
334
|
-
cluster: ClusterV1 = Field(..., alias="cluster")
|
|
335
|
-
managed_external_resources: Optional[bool] = Field(..., alias="managedExternalResources")
|
|
336
|
-
external_resources: Optional[list[Union[NamespaceTerraformProviderResourceCloudflareV1, NamespaceExternalResourceV1]]] = Field(..., alias="externalResources")
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
class TerraformCloudflareResourcesQueryData(ConfiguredBaseModel):
|
|
340
|
-
namespaces: Optional[list[NamespaceV1]] = Field(..., alias="namespaces")
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
def query(query_func: Callable, **kwargs: Any) -> TerraformCloudflareResourcesQueryData:
|
|
344
|
-
"""
|
|
345
|
-
This is a convenience function which queries and parses the data into
|
|
346
|
-
concrete types. It should be compatible with most GQL clients.
|
|
347
|
-
You do not have to use it to consume the generated data classes.
|
|
348
|
-
Alternatively, you can also mime and alternate the behavior
|
|
349
|
-
of this function in the caller.
|
|
350
|
-
|
|
351
|
-
Parameters:
|
|
352
|
-
query_func (Callable): Function which queries your GQL Server
|
|
353
|
-
kwargs: optional arguments that will be passed to the query function
|
|
354
|
-
|
|
355
|
-
Returns:
|
|
356
|
-
TerraformCloudflareResourcesQueryData: queried data parsed into generated classes
|
|
357
|
-
"""
|
|
358
|
-
raw_data: dict[Any, Any] = query_func(DEFINITION, **kwargs)
|
|
359
|
-
return TerraformCloudflareResourcesQueryData(**raw_data)
|
|
File without changes
|
reconcile/gql_definitions/terraform_cloudflare_users/app_interface_setting_cloudflare_and_vault.py
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Generated by qenerate plugin=pydantic_v2. DO NOT MODIFY MANUALLY!
|
|
3
|
-
"""
|
|
4
|
-
from collections.abc import Callable # noqa: F401 # pylint: disable=W0611
|
|
5
|
-
from datetime import datetime # noqa: F401 # pylint: disable=W0611
|
|
6
|
-
from enum import Enum # noqa: F401 # pylint: disable=W0611
|
|
7
|
-
from typing import ( # noqa: F401 # pylint: disable=W0611
|
|
8
|
-
Any,
|
|
9
|
-
Optional,
|
|
10
|
-
Union,
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
from pydantic import ( # noqa: F401 # pylint: disable=W0611
|
|
14
|
-
BaseModel,
|
|
15
|
-
ConfigDict,
|
|
16
|
-
Field,
|
|
17
|
-
Json,
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
DEFINITION = """
|
|
22
|
-
query AppInterfaceSettingCloudflareAndVault {
|
|
23
|
-
settings: app_interface_settings_v1 {
|
|
24
|
-
cloudflareEmailDomainAllowList
|
|
25
|
-
vault
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
class ConfiguredBaseModel(BaseModel):
|
|
32
|
-
model_config = ConfigDict(
|
|
33
|
-
extra='forbid'
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
class AppInterfaceSettingsV1(ConfiguredBaseModel):
|
|
38
|
-
cloudflare_email_domain_allow_list: Optional[list[str]] = Field(..., alias="cloudflareEmailDomainAllowList")
|
|
39
|
-
vault: bool = Field(..., alias="vault")
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
class AppInterfaceSettingCloudflareAndVaultQueryData(ConfiguredBaseModel):
|
|
43
|
-
settings: Optional[list[AppInterfaceSettingsV1]] = Field(..., alias="settings")
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
def query(query_func: Callable, **kwargs: Any) -> AppInterfaceSettingCloudflareAndVaultQueryData:
|
|
47
|
-
"""
|
|
48
|
-
This is a convenience function which queries and parses the data into
|
|
49
|
-
concrete types. It should be compatible with most GQL clients.
|
|
50
|
-
You do not have to use it to consume the generated data classes.
|
|
51
|
-
Alternatively, you can also mime and alternate the behavior
|
|
52
|
-
of this function in the caller.
|
|
53
|
-
|
|
54
|
-
Parameters:
|
|
55
|
-
query_func (Callable): Function which queries your GQL Server
|
|
56
|
-
kwargs: optional arguments that will be passed to the query function
|
|
57
|
-
|
|
58
|
-
Returns:
|
|
59
|
-
AppInterfaceSettingCloudflareAndVaultQueryData: queried data parsed into generated classes
|
|
60
|
-
"""
|
|
61
|
-
raw_data: dict[Any, Any] = query_func(DEFINITION, **kwargs)
|
|
62
|
-
return AppInterfaceSettingCloudflareAndVaultQueryData(**raw_data)
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Generated by qenerate plugin=pydantic_v2. DO NOT MODIFY MANUALLY!
|
|
3
|
-
"""
|
|
4
|
-
from collections.abc import Callable # noqa: F401 # pylint: disable=W0611
|
|
5
|
-
from datetime import datetime # noqa: F401 # pylint: disable=W0611
|
|
6
|
-
from enum import Enum # noqa: F401 # pylint: disable=W0611
|
|
7
|
-
from typing import ( # noqa: F401 # pylint: disable=W0611
|
|
8
|
-
Any,
|
|
9
|
-
Optional,
|
|
10
|
-
Union,
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
from pydantic import ( # noqa: F401 # pylint: disable=W0611
|
|
14
|
-
BaseModel,
|
|
15
|
-
ConfigDict,
|
|
16
|
-
Field,
|
|
17
|
-
Json,
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
from reconcile.gql_definitions.fragments.vault_secret import VaultSecret
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
DEFINITION = """
|
|
24
|
-
fragment VaultSecret on VaultSecret_v1 {
|
|
25
|
-
path
|
|
26
|
-
field
|
|
27
|
-
version
|
|
28
|
-
format
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
query CloudflareAccountRole {
|
|
32
|
-
cloudflare_account_roles: cloudflare_account_role_v1 {
|
|
33
|
-
name
|
|
34
|
-
roles
|
|
35
|
-
access_roles {
|
|
36
|
-
users {
|
|
37
|
-
cloudflare_user
|
|
38
|
-
org_username
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
account {
|
|
42
|
-
name
|
|
43
|
-
providerVersion
|
|
44
|
-
apiCredentials {
|
|
45
|
-
...VaultSecret
|
|
46
|
-
}
|
|
47
|
-
terraformStateAccount {
|
|
48
|
-
name
|
|
49
|
-
automationToken {
|
|
50
|
-
...VaultSecret
|
|
51
|
-
}
|
|
52
|
-
terraformState {
|
|
53
|
-
provider
|
|
54
|
-
bucket
|
|
55
|
-
region
|
|
56
|
-
integrations {
|
|
57
|
-
integration
|
|
58
|
-
key
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
enforceTwofactor
|
|
63
|
-
type
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
"""
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
class ConfiguredBaseModel(BaseModel):
|
|
71
|
-
model_config = ConfigDict(
|
|
72
|
-
extra='forbid'
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
class UserV1(ConfiguredBaseModel):
|
|
77
|
-
cloudflare_user: Optional[str] = Field(..., alias="cloudflare_user")
|
|
78
|
-
org_username: str = Field(..., alias="org_username")
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
class RoleV1(ConfiguredBaseModel):
|
|
82
|
-
users: list[UserV1] = Field(..., alias="users")
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
class AWSTerraformStateIntegrationsV1(ConfiguredBaseModel):
|
|
86
|
-
integration: str = Field(..., alias="integration")
|
|
87
|
-
key: str = Field(..., alias="key")
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
class TerraformStateAWSV1(ConfiguredBaseModel):
|
|
91
|
-
provider: str = Field(..., alias="provider")
|
|
92
|
-
bucket: str = Field(..., alias="bucket")
|
|
93
|
-
region: str = Field(..., alias="region")
|
|
94
|
-
integrations: list[AWSTerraformStateIntegrationsV1] = Field(..., alias="integrations")
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
class AWSAccountV1(ConfiguredBaseModel):
|
|
98
|
-
name: str = Field(..., alias="name")
|
|
99
|
-
automation_token: VaultSecret = Field(..., alias="automationToken")
|
|
100
|
-
terraform_state: Optional[TerraformStateAWSV1] = Field(..., alias="terraformState")
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
class CloudflareAccountV1(ConfiguredBaseModel):
|
|
104
|
-
name: str = Field(..., alias="name")
|
|
105
|
-
provider_version: str = Field(..., alias="providerVersion")
|
|
106
|
-
api_credentials: VaultSecret = Field(..., alias="apiCredentials")
|
|
107
|
-
terraform_state_account: AWSAccountV1 = Field(..., alias="terraformStateAccount")
|
|
108
|
-
enforce_twofactor: Optional[bool] = Field(..., alias="enforceTwofactor")
|
|
109
|
-
q_type: Optional[str] = Field(..., alias="type")
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
class CloudflareAccountRoleV1(ConfiguredBaseModel):
|
|
113
|
-
name: str = Field(..., alias="name")
|
|
114
|
-
roles: list[str] = Field(..., alias="roles")
|
|
115
|
-
access_roles: Optional[list[RoleV1]] = Field(..., alias="access_roles")
|
|
116
|
-
account: CloudflareAccountV1 = Field(..., alias="account")
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
class CloudflareAccountRoleQueryData(ConfiguredBaseModel):
|
|
120
|
-
cloudflare_account_roles: Optional[list[CloudflareAccountRoleV1]] = Field(..., alias="cloudflare_account_roles")
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
def query(query_func: Callable, **kwargs: Any) -> CloudflareAccountRoleQueryData:
|
|
124
|
-
"""
|
|
125
|
-
This is a convenience function which queries and parses the data into
|
|
126
|
-
concrete types. It should be compatible with most GQL clients.
|
|
127
|
-
You do not have to use it to consume the generated data classes.
|
|
128
|
-
Alternatively, you can also mime and alternate the behavior
|
|
129
|
-
of this function in the caller.
|
|
130
|
-
|
|
131
|
-
Parameters:
|
|
132
|
-
query_func (Callable): Function which queries your GQL Server
|
|
133
|
-
kwargs: optional arguments that will be passed to the query function
|
|
134
|
-
|
|
135
|
-
Returns:
|
|
136
|
-
CloudflareAccountRoleQueryData: queried data parsed into generated classes
|
|
137
|
-
"""
|
|
138
|
-
raw_data: dict[Any, Any] = query_func(DEFINITION, **kwargs)
|
|
139
|
-
return CloudflareAccountRoleQueryData(**raw_data)
|