qontract-reconcile 0.9.1rc162__py3-none-any.whl → 0.9.1rc164__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.1rc162.dist-info → qontract_reconcile-0.9.1rc164.dist-info}/METADATA +2 -2
- {qontract_reconcile-0.9.1rc162.dist-info → qontract_reconcile-0.9.1rc164.dist-info}/RECORD +21 -30
- reconcile/glitchtip_project_dsn/integration.py +3 -0
- reconcile/jenkins_job_builder.py +2 -5
- reconcile/openshift_base.py +11 -11
- reconcile/openshift_saas_deploy.py +52 -57
- reconcile/openshift_saas_deploy_trigger_base.py +48 -55
- reconcile/openshift_saas_deploy_trigger_cleaner.py +2 -2
- reconcile/openshift_tekton_resources.py +1 -1
- reconcile/saas_file_validator.py +10 -23
- reconcile/slack_base.py +2 -5
- reconcile/test/conftest.py +0 -11
- reconcile/test/test_auto_promoter.py +42 -199
- reconcile/test/test_saasherder.py +463 -398
- reconcile/test/test_saasherder_allowed_secret_paths.py +36 -87
- reconcile/utils/mr/auto_promoter.py +50 -58
- reconcile/utils/mr/base.py +2 -6
- reconcile/utils/{saasherder/saasherder.py → saasherder.py} +736 -656
- reconcile/gql_definitions/common/app_code_component_repos.py +0 -68
- reconcile/gql_definitions/common/saas_files.py +0 -542
- reconcile/gql_definitions/common/saasherder_settings.py +0 -62
- reconcile/gql_definitions/fragments/oc_connection_cluster.py +0 -47
- reconcile/typed_queries/repos.py +0 -17
- reconcile/typed_queries/saas_files.py +0 -61
- reconcile/utils/saasherder/__init__.py +0 -17
- reconcile/utils/saasherder/interfaces.py +0 -404
- reconcile/utils/saasherder/models.py +0 -203
- {qontract_reconcile-0.9.1rc162.dist-info → qontract_reconcile-0.9.1rc164.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.9.1rc162.dist-info → qontract_reconcile-0.9.1rc164.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.9.1rc162.dist-info → qontract_reconcile-0.9.1rc164.dist-info}/top_level.txt +0 -0
@@ -1,68 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Generated by qenerate plugin=pydantic_v1. 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
|
-
Extra,
|
16
|
-
Field,
|
17
|
-
Json,
|
18
|
-
)
|
19
|
-
|
20
|
-
|
21
|
-
DEFINITION = """
|
22
|
-
query AppCodeComponentRepos {
|
23
|
-
apps: apps_v1 {
|
24
|
-
codeComponents {
|
25
|
-
url
|
26
|
-
}
|
27
|
-
}
|
28
|
-
}
|
29
|
-
"""
|
30
|
-
|
31
|
-
|
32
|
-
class ConfiguredBaseModel(BaseModel):
|
33
|
-
class Config:
|
34
|
-
smart_union = True
|
35
|
-
extra = Extra.forbid
|
36
|
-
|
37
|
-
|
38
|
-
class AppCodeComponentsV1(ConfiguredBaseModel):
|
39
|
-
url: str = Field(..., alias="url")
|
40
|
-
|
41
|
-
|
42
|
-
class AppV1(ConfiguredBaseModel):
|
43
|
-
code_components: Optional[list[AppCodeComponentsV1]] = Field(
|
44
|
-
..., alias="codeComponents"
|
45
|
-
)
|
46
|
-
|
47
|
-
|
48
|
-
class AppCodeComponentReposQueryData(ConfiguredBaseModel):
|
49
|
-
apps: Optional[list[AppV1]] = Field(..., alias="apps")
|
50
|
-
|
51
|
-
|
52
|
-
def query(query_func: Callable, **kwargs: Any) -> AppCodeComponentReposQueryData:
|
53
|
-
"""
|
54
|
-
This is a convenience function which queries and parses the data into
|
55
|
-
concrete types. It should be compatible with most GQL clients.
|
56
|
-
You do not have to use it to consume the generated data classes.
|
57
|
-
Alternatively, you can also mime and alternate the behavior
|
58
|
-
of this function in the caller.
|
59
|
-
|
60
|
-
Parameters:
|
61
|
-
query_func (Callable): Function which queries your GQL Server
|
62
|
-
kwargs: optional arguments that will be passed to the query function
|
63
|
-
|
64
|
-
Returns:
|
65
|
-
AppCodeComponentReposQueryData: queried data parsed into generated classes
|
66
|
-
"""
|
67
|
-
raw_data: dict[Any, Any] = query_func(DEFINITION, **kwargs)
|
68
|
-
return AppCodeComponentReposQueryData(**raw_data)
|
@@ -1,542 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Generated by qenerate plugin=pydantic_v1. 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
|
-
Extra,
|
16
|
-
Field,
|
17
|
-
Json,
|
18
|
-
)
|
19
|
-
|
20
|
-
from reconcile.gql_definitions.fragments.oc_connection_cluster import (
|
21
|
-
OcConnectionCluster,
|
22
|
-
)
|
23
|
-
from reconcile.gql_definitions.fragments.vault_secret import VaultSecret
|
24
|
-
|
25
|
-
|
26
|
-
DEFINITION = """
|
27
|
-
fragment CommonJumphostFields on ClusterJumpHost_v1 {
|
28
|
-
hostname
|
29
|
-
knownHosts
|
30
|
-
user
|
31
|
-
port
|
32
|
-
remotePort
|
33
|
-
identity {
|
34
|
-
... VaultSecret
|
35
|
-
}
|
36
|
-
}
|
37
|
-
|
38
|
-
fragment OcConnectionCluster on Cluster_v1 {
|
39
|
-
name
|
40
|
-
serverUrl
|
41
|
-
internal
|
42
|
-
insecureSkipTLSVerify
|
43
|
-
jumpHost {
|
44
|
-
...CommonJumphostFields
|
45
|
-
}
|
46
|
-
automationToken {
|
47
|
-
...VaultSecret
|
48
|
-
}
|
49
|
-
clusterAdminAutomationToken {
|
50
|
-
...VaultSecret
|
51
|
-
}
|
52
|
-
disable {
|
53
|
-
integrations
|
54
|
-
e2eTests
|
55
|
-
}
|
56
|
-
}
|
57
|
-
|
58
|
-
fragment VaultSecret on VaultSecret_v1 {
|
59
|
-
path
|
60
|
-
field
|
61
|
-
version
|
62
|
-
format
|
63
|
-
}
|
64
|
-
|
65
|
-
query SaasFiles {
|
66
|
-
saas_files: saas_files_v2 {
|
67
|
-
path
|
68
|
-
name
|
69
|
-
app {
|
70
|
-
name
|
71
|
-
}
|
72
|
-
pipelinesProvider {
|
73
|
-
name
|
74
|
-
provider
|
75
|
-
... on PipelinesProviderTekton_v1 {
|
76
|
-
namespace {
|
77
|
-
name
|
78
|
-
cluster {
|
79
|
-
...OcConnectionCluster
|
80
|
-
consoleUrl
|
81
|
-
}
|
82
|
-
}
|
83
|
-
defaults {
|
84
|
-
pipelineTemplates {
|
85
|
-
openshiftSaasDeploy {
|
86
|
-
name
|
87
|
-
}
|
88
|
-
}
|
89
|
-
}
|
90
|
-
pipelineTemplates {
|
91
|
-
openshiftSaasDeploy {
|
92
|
-
name
|
93
|
-
}
|
94
|
-
}
|
95
|
-
}
|
96
|
-
}
|
97
|
-
deployResources {
|
98
|
-
requests {
|
99
|
-
cpu
|
100
|
-
memory
|
101
|
-
}
|
102
|
-
limits {
|
103
|
-
cpu
|
104
|
-
memory
|
105
|
-
}
|
106
|
-
}
|
107
|
-
slack {
|
108
|
-
output
|
109
|
-
workspace {
|
110
|
-
name
|
111
|
-
integrations {
|
112
|
-
name
|
113
|
-
token {
|
114
|
-
...VaultSecret
|
115
|
-
}
|
116
|
-
channel
|
117
|
-
icon_emoji
|
118
|
-
username
|
119
|
-
}
|
120
|
-
}
|
121
|
-
channel
|
122
|
-
notifications {
|
123
|
-
start
|
124
|
-
}
|
125
|
-
}
|
126
|
-
managedResourceTypes
|
127
|
-
takeover
|
128
|
-
deprecated
|
129
|
-
compare
|
130
|
-
timeout
|
131
|
-
publishJobLogs
|
132
|
-
clusterAdmin
|
133
|
-
imagePatterns
|
134
|
-
allowedSecretParameterPaths
|
135
|
-
use_channel_in_image_tag
|
136
|
-
authentication {
|
137
|
-
code {
|
138
|
-
...VaultSecret
|
139
|
-
}
|
140
|
-
image {
|
141
|
-
...VaultSecret
|
142
|
-
}
|
143
|
-
}
|
144
|
-
parameters
|
145
|
-
secretParameters {
|
146
|
-
name
|
147
|
-
secret {
|
148
|
-
...VaultSecret
|
149
|
-
}
|
150
|
-
}
|
151
|
-
resourceTemplates {
|
152
|
-
name
|
153
|
-
url
|
154
|
-
path
|
155
|
-
provider
|
156
|
-
hash_length
|
157
|
-
parameters
|
158
|
-
secretParameters {
|
159
|
-
name
|
160
|
-
secret {
|
161
|
-
...VaultSecret
|
162
|
-
}
|
163
|
-
}
|
164
|
-
targets {
|
165
|
-
path
|
166
|
-
name
|
167
|
-
namespace {
|
168
|
-
name
|
169
|
-
environment {
|
170
|
-
name
|
171
|
-
parameters
|
172
|
-
secretParameters {
|
173
|
-
name
|
174
|
-
secret {
|
175
|
-
...VaultSecret
|
176
|
-
}
|
177
|
-
}
|
178
|
-
}
|
179
|
-
app {
|
180
|
-
name
|
181
|
-
}
|
182
|
-
cluster {
|
183
|
-
...OcConnectionCluster
|
184
|
-
}
|
185
|
-
}
|
186
|
-
ref
|
187
|
-
promotion {
|
188
|
-
auto
|
189
|
-
publish
|
190
|
-
subscribe
|
191
|
-
promotion_data {
|
192
|
-
channel
|
193
|
-
data {
|
194
|
-
type
|
195
|
-
... on ParentSaasPromotion_v1 {
|
196
|
-
parent_saas
|
197
|
-
target_config_hash
|
198
|
-
}
|
199
|
-
}
|
200
|
-
}
|
201
|
-
}
|
202
|
-
parameters
|
203
|
-
secretParameters {
|
204
|
-
name
|
205
|
-
secret {
|
206
|
-
...VaultSecret
|
207
|
-
}
|
208
|
-
}
|
209
|
-
upstream {
|
210
|
-
instance {
|
211
|
-
name
|
212
|
-
serverUrl
|
213
|
-
}
|
214
|
-
name
|
215
|
-
}
|
216
|
-
image {
|
217
|
-
org {
|
218
|
-
name
|
219
|
-
instance {
|
220
|
-
url
|
221
|
-
}
|
222
|
-
}
|
223
|
-
name
|
224
|
-
}
|
225
|
-
disable
|
226
|
-
delete
|
227
|
-
}
|
228
|
-
}
|
229
|
-
selfServiceRoles {
|
230
|
-
users {
|
231
|
-
org_username
|
232
|
-
tag_on_merge_requests
|
233
|
-
}
|
234
|
-
bots {
|
235
|
-
org_username
|
236
|
-
}
|
237
|
-
}
|
238
|
-
}
|
239
|
-
}
|
240
|
-
"""
|
241
|
-
|
242
|
-
|
243
|
-
class ConfiguredBaseModel(BaseModel):
|
244
|
-
class Config:
|
245
|
-
smart_union = True
|
246
|
-
extra = Extra.forbid
|
247
|
-
|
248
|
-
|
249
|
-
class AppV1(ConfiguredBaseModel):
|
250
|
-
name: str = Field(..., alias="name")
|
251
|
-
|
252
|
-
|
253
|
-
class PipelinesProviderV1(ConfiguredBaseModel):
|
254
|
-
name: str = Field(..., alias="name")
|
255
|
-
provider: str = Field(..., alias="provider")
|
256
|
-
|
257
|
-
|
258
|
-
class ClusterV1(OcConnectionCluster):
|
259
|
-
console_url: str = Field(..., alias="consoleUrl")
|
260
|
-
|
261
|
-
|
262
|
-
class NamespaceV1(ConfiguredBaseModel):
|
263
|
-
name: str = Field(..., alias="name")
|
264
|
-
cluster: ClusterV1 = Field(..., alias="cluster")
|
265
|
-
|
266
|
-
|
267
|
-
class PipelinesProviderTektonObjectTemplateV1(ConfiguredBaseModel):
|
268
|
-
name: str = Field(..., alias="name")
|
269
|
-
|
270
|
-
|
271
|
-
class PipelinesProviderPipelineTemplatesV1(ConfiguredBaseModel):
|
272
|
-
openshift_saas_deploy: PipelinesProviderTektonObjectTemplateV1 = Field(
|
273
|
-
..., alias="openshiftSaasDeploy"
|
274
|
-
)
|
275
|
-
|
276
|
-
|
277
|
-
class PipelinesProviderTektonProviderDefaultsV1(ConfiguredBaseModel):
|
278
|
-
pipeline_templates: PipelinesProviderPipelineTemplatesV1 = Field(
|
279
|
-
..., alias="pipelineTemplates"
|
280
|
-
)
|
281
|
-
|
282
|
-
|
283
|
-
class PipelinesProviderTektonV1_PipelinesProviderPipelineTemplatesV1_PipelinesProviderTektonObjectTemplateV1(
|
284
|
-
ConfiguredBaseModel
|
285
|
-
):
|
286
|
-
name: str = Field(..., alias="name")
|
287
|
-
|
288
|
-
|
289
|
-
class PipelinesProviderTektonV1_PipelinesProviderPipelineTemplatesV1(
|
290
|
-
ConfiguredBaseModel
|
291
|
-
):
|
292
|
-
openshift_saas_deploy: PipelinesProviderTektonV1_PipelinesProviderPipelineTemplatesV1_PipelinesProviderTektonObjectTemplateV1 = Field(
|
293
|
-
..., alias="openshiftSaasDeploy"
|
294
|
-
)
|
295
|
-
|
296
|
-
|
297
|
-
class PipelinesProviderTektonV1(PipelinesProviderV1):
|
298
|
-
namespace: NamespaceV1 = Field(..., alias="namespace")
|
299
|
-
defaults: PipelinesProviderTektonProviderDefaultsV1 = Field(..., alias="defaults")
|
300
|
-
pipeline_templates: Optional[
|
301
|
-
PipelinesProviderTektonV1_PipelinesProviderPipelineTemplatesV1
|
302
|
-
] = Field(..., alias="pipelineTemplates")
|
303
|
-
|
304
|
-
|
305
|
-
class ResourceRequirementsV1(ConfiguredBaseModel):
|
306
|
-
cpu: str = Field(..., alias="cpu")
|
307
|
-
memory: str = Field(..., alias="memory")
|
308
|
-
|
309
|
-
|
310
|
-
class DeployResourcesV1_ResourceRequirementsV1(ConfiguredBaseModel):
|
311
|
-
cpu: str = Field(..., alias="cpu")
|
312
|
-
memory: str = Field(..., alias="memory")
|
313
|
-
|
314
|
-
|
315
|
-
class DeployResourcesV1(ConfiguredBaseModel):
|
316
|
-
requests: ResourceRequirementsV1 = Field(..., alias="requests")
|
317
|
-
limits: DeployResourcesV1_ResourceRequirementsV1 = Field(..., alias="limits")
|
318
|
-
|
319
|
-
|
320
|
-
class SlackWorkspaceIntegrationV1(ConfiguredBaseModel):
|
321
|
-
name: str = Field(..., alias="name")
|
322
|
-
token: VaultSecret = Field(..., alias="token")
|
323
|
-
channel: str = Field(..., alias="channel")
|
324
|
-
icon_emoji: str = Field(..., alias="icon_emoji")
|
325
|
-
username: str = Field(..., alias="username")
|
326
|
-
|
327
|
-
|
328
|
-
class SlackWorkspaceV1(ConfiguredBaseModel):
|
329
|
-
name: str = Field(..., alias="name")
|
330
|
-
integrations: Optional[list[SlackWorkspaceIntegrationV1]] = Field(
|
331
|
-
..., alias="integrations"
|
332
|
-
)
|
333
|
-
|
334
|
-
|
335
|
-
class SlackOutputNotificationsV1(ConfiguredBaseModel):
|
336
|
-
start: Optional[bool] = Field(..., alias="start")
|
337
|
-
|
338
|
-
|
339
|
-
class SlackOutputV1(ConfiguredBaseModel):
|
340
|
-
output: Optional[str] = Field(..., alias="output")
|
341
|
-
workspace: SlackWorkspaceV1 = Field(..., alias="workspace")
|
342
|
-
channel: Optional[str] = Field(..., alias="channel")
|
343
|
-
notifications: Optional[SlackOutputNotificationsV1] = Field(
|
344
|
-
..., alias="notifications"
|
345
|
-
)
|
346
|
-
|
347
|
-
|
348
|
-
class SaasFileAuthenticationV1(ConfiguredBaseModel):
|
349
|
-
code: Optional[VaultSecret] = Field(..., alias="code")
|
350
|
-
image: Optional[VaultSecret] = Field(..., alias="image")
|
351
|
-
|
352
|
-
|
353
|
-
class SaasSecretParametersV1(ConfiguredBaseModel):
|
354
|
-
name: str = Field(..., alias="name")
|
355
|
-
secret: VaultSecret = Field(..., alias="secret")
|
356
|
-
|
357
|
-
|
358
|
-
class SaasResourceTemplateV2_SaasSecretParametersV1(ConfiguredBaseModel):
|
359
|
-
name: str = Field(..., alias="name")
|
360
|
-
secret: VaultSecret = Field(..., alias="secret")
|
361
|
-
|
362
|
-
|
363
|
-
class EnvironmentV1_SaasSecretParametersV1(ConfiguredBaseModel):
|
364
|
-
name: str = Field(..., alias="name")
|
365
|
-
secret: VaultSecret = Field(..., alias="secret")
|
366
|
-
|
367
|
-
|
368
|
-
class EnvironmentV1(ConfiguredBaseModel):
|
369
|
-
name: str = Field(..., alias="name")
|
370
|
-
parameters: Optional[Json] = Field(..., alias="parameters")
|
371
|
-
secret_parameters: Optional[list[EnvironmentV1_SaasSecretParametersV1]] = Field(
|
372
|
-
..., alias="secretParameters"
|
373
|
-
)
|
374
|
-
|
375
|
-
|
376
|
-
class SaasResourceTemplateTargetV2_NamespaceV1_AppV1(ConfiguredBaseModel):
|
377
|
-
name: str = Field(..., alias="name")
|
378
|
-
|
379
|
-
|
380
|
-
class SaasResourceTemplateTargetV2_NamespaceV1(ConfiguredBaseModel):
|
381
|
-
name: str = Field(..., alias="name")
|
382
|
-
environment: EnvironmentV1 = Field(..., alias="environment")
|
383
|
-
app: SaasResourceTemplateTargetV2_NamespaceV1_AppV1 = Field(..., alias="app")
|
384
|
-
cluster: OcConnectionCluster = Field(..., alias="cluster")
|
385
|
-
|
386
|
-
|
387
|
-
class PromotionChannelDataV1(ConfiguredBaseModel):
|
388
|
-
q_type: str = Field(..., alias="type")
|
389
|
-
|
390
|
-
|
391
|
-
class ParentSaasPromotionV1(PromotionChannelDataV1):
|
392
|
-
parent_saas: Optional[str] = Field(..., alias="parent_saas")
|
393
|
-
target_config_hash: Optional[str] = Field(..., alias="target_config_hash")
|
394
|
-
|
395
|
-
|
396
|
-
class PromotionDataV1(ConfiguredBaseModel):
|
397
|
-
channel: Optional[str] = Field(..., alias="channel")
|
398
|
-
data: Optional[list[Union[ParentSaasPromotionV1, PromotionChannelDataV1]]] = Field(
|
399
|
-
..., alias="data"
|
400
|
-
)
|
401
|
-
|
402
|
-
|
403
|
-
class SaasResourceTemplateTargetPromotionV1(ConfiguredBaseModel):
|
404
|
-
auto: Optional[bool] = Field(..., alias="auto")
|
405
|
-
publish: Optional[list[str]] = Field(..., alias="publish")
|
406
|
-
subscribe: Optional[list[str]] = Field(..., alias="subscribe")
|
407
|
-
promotion_data: Optional[list[PromotionDataV1]] = Field(..., alias="promotion_data")
|
408
|
-
|
409
|
-
|
410
|
-
class SaasResourceTemplateTargetV2_SaasSecretParametersV1(ConfiguredBaseModel):
|
411
|
-
name: str = Field(..., alias="name")
|
412
|
-
secret: VaultSecret = Field(..., alias="secret")
|
413
|
-
|
414
|
-
|
415
|
-
class JenkinsInstanceV1(ConfiguredBaseModel):
|
416
|
-
name: str = Field(..., alias="name")
|
417
|
-
server_url: str = Field(..., alias="serverUrl")
|
418
|
-
|
419
|
-
|
420
|
-
class SaasResourceTemplateTargetUpstreamV1(ConfiguredBaseModel):
|
421
|
-
instance: JenkinsInstanceV1 = Field(..., alias="instance")
|
422
|
-
name: str = Field(..., alias="name")
|
423
|
-
|
424
|
-
|
425
|
-
class QuayInstanceV1(ConfiguredBaseModel):
|
426
|
-
url: str = Field(..., alias="url")
|
427
|
-
|
428
|
-
|
429
|
-
class QuayOrgV1(ConfiguredBaseModel):
|
430
|
-
name: str = Field(..., alias="name")
|
431
|
-
instance: QuayInstanceV1 = Field(..., alias="instance")
|
432
|
-
|
433
|
-
|
434
|
-
class SaasResourceTemplateTargetImageV1(ConfiguredBaseModel):
|
435
|
-
org: QuayOrgV1 = Field(..., alias="org")
|
436
|
-
name: str = Field(..., alias="name")
|
437
|
-
|
438
|
-
|
439
|
-
class SaasResourceTemplateTargetV2(ConfiguredBaseModel):
|
440
|
-
path: Optional[str] = Field(..., alias="path")
|
441
|
-
name: Optional[str] = Field(..., alias="name")
|
442
|
-
namespace: SaasResourceTemplateTargetV2_NamespaceV1 = Field(..., alias="namespace")
|
443
|
-
ref: str = Field(..., alias="ref")
|
444
|
-
promotion: Optional[SaasResourceTemplateTargetPromotionV1] = Field(
|
445
|
-
..., alias="promotion"
|
446
|
-
)
|
447
|
-
parameters: Optional[Json] = Field(..., alias="parameters")
|
448
|
-
secret_parameters: Optional[
|
449
|
-
list[SaasResourceTemplateTargetV2_SaasSecretParametersV1]
|
450
|
-
] = Field(..., alias="secretParameters")
|
451
|
-
upstream: Optional[SaasResourceTemplateTargetUpstreamV1] = Field(
|
452
|
-
..., alias="upstream"
|
453
|
-
)
|
454
|
-
image: Optional[SaasResourceTemplateTargetImageV1] = Field(..., alias="image")
|
455
|
-
disable: Optional[bool] = Field(..., alias="disable")
|
456
|
-
delete: Optional[bool] = Field(..., alias="delete")
|
457
|
-
|
458
|
-
|
459
|
-
class SaasResourceTemplateV2(ConfiguredBaseModel):
|
460
|
-
name: str = Field(..., alias="name")
|
461
|
-
url: str = Field(..., alias="url")
|
462
|
-
path: str = Field(..., alias="path")
|
463
|
-
provider: Optional[str] = Field(..., alias="provider")
|
464
|
-
hash_length: Optional[int] = Field(..., alias="hash_length")
|
465
|
-
parameters: Optional[Json] = Field(..., alias="parameters")
|
466
|
-
secret_parameters: Optional[
|
467
|
-
list[SaasResourceTemplateV2_SaasSecretParametersV1]
|
468
|
-
] = Field(..., alias="secretParameters")
|
469
|
-
targets: list[SaasResourceTemplateTargetV2] = Field(..., alias="targets")
|
470
|
-
|
471
|
-
|
472
|
-
class UserV1(ConfiguredBaseModel):
|
473
|
-
org_username: str = Field(..., alias="org_username")
|
474
|
-
tag_on_merge_requests: Optional[bool] = Field(..., alias="tag_on_merge_requests")
|
475
|
-
|
476
|
-
|
477
|
-
class BotV1(ConfiguredBaseModel):
|
478
|
-
org_username: Optional[str] = Field(..., alias="org_username")
|
479
|
-
|
480
|
-
|
481
|
-
class RoleV1(ConfiguredBaseModel):
|
482
|
-
users: list[UserV1] = Field(..., alias="users")
|
483
|
-
bots: list[BotV1] = Field(..., alias="bots")
|
484
|
-
|
485
|
-
|
486
|
-
class SaasFileV2(ConfiguredBaseModel):
|
487
|
-
path: str = Field(..., alias="path")
|
488
|
-
name: str = Field(..., alias="name")
|
489
|
-
app: AppV1 = Field(..., alias="app")
|
490
|
-
pipelines_provider: Union[PipelinesProviderTektonV1, PipelinesProviderV1] = Field(
|
491
|
-
..., alias="pipelinesProvider"
|
492
|
-
)
|
493
|
-
deploy_resources: Optional[DeployResourcesV1] = Field(..., alias="deployResources")
|
494
|
-
slack: Optional[SlackOutputV1] = Field(..., alias="slack")
|
495
|
-
managed_resource_types: list[str] = Field(..., alias="managedResourceTypes")
|
496
|
-
takeover: Optional[bool] = Field(..., alias="takeover")
|
497
|
-
deprecated: Optional[bool] = Field(..., alias="deprecated")
|
498
|
-
compare: Optional[bool] = Field(..., alias="compare")
|
499
|
-
timeout: Optional[str] = Field(..., alias="timeout")
|
500
|
-
publish_job_logs: Optional[bool] = Field(..., alias="publishJobLogs")
|
501
|
-
cluster_admin: Optional[bool] = Field(..., alias="clusterAdmin")
|
502
|
-
image_patterns: list[str] = Field(..., alias="imagePatterns")
|
503
|
-
allowed_secret_parameter_paths: Optional[list[str]] = Field(
|
504
|
-
..., alias="allowedSecretParameterPaths"
|
505
|
-
)
|
506
|
-
use_channel_in_image_tag: Optional[bool] = Field(
|
507
|
-
..., alias="use_channel_in_image_tag"
|
508
|
-
)
|
509
|
-
authentication: Optional[SaasFileAuthenticationV1] = Field(
|
510
|
-
..., alias="authentication"
|
511
|
-
)
|
512
|
-
parameters: Optional[Json] = Field(..., alias="parameters")
|
513
|
-
secret_parameters: Optional[list[SaasSecretParametersV1]] = Field(
|
514
|
-
..., alias="secretParameters"
|
515
|
-
)
|
516
|
-
resource_templates: list[SaasResourceTemplateV2] = Field(
|
517
|
-
..., alias="resourceTemplates"
|
518
|
-
)
|
519
|
-
self_service_roles: Optional[list[RoleV1]] = Field(..., alias="selfServiceRoles")
|
520
|
-
|
521
|
-
|
522
|
-
class SaasFilesQueryData(ConfiguredBaseModel):
|
523
|
-
saas_files: Optional[list[SaasFileV2]] = Field(..., alias="saas_files")
|
524
|
-
|
525
|
-
|
526
|
-
def query(query_func: Callable, **kwargs: Any) -> SaasFilesQueryData:
|
527
|
-
"""
|
528
|
-
This is a convenience function which queries and parses the data into
|
529
|
-
concrete types. It should be compatible with most GQL clients.
|
530
|
-
You do not have to use it to consume the generated data classes.
|
531
|
-
Alternatively, you can also mime and alternate the behavior
|
532
|
-
of this function in the caller.
|
533
|
-
|
534
|
-
Parameters:
|
535
|
-
query_func (Callable): Function which queries your GQL Server
|
536
|
-
kwargs: optional arguments that will be passed to the query function
|
537
|
-
|
538
|
-
Returns:
|
539
|
-
SaasFilesQueryData: queried data parsed into generated classes
|
540
|
-
"""
|
541
|
-
raw_data: dict[Any, Any] = query_func(DEFINITION, **kwargs)
|
542
|
-
return SaasFilesQueryData(**raw_data)
|
@@ -1,62 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Generated by qenerate plugin=pydantic_v1. 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
|
-
Extra,
|
16
|
-
Field,
|
17
|
-
Json,
|
18
|
-
)
|
19
|
-
|
20
|
-
|
21
|
-
DEFINITION = """
|
22
|
-
query SaasherderSettings {
|
23
|
-
settings: app_interface_settings_v1 {
|
24
|
-
repoUrl
|
25
|
-
hashLength
|
26
|
-
}
|
27
|
-
}
|
28
|
-
"""
|
29
|
-
|
30
|
-
|
31
|
-
class ConfiguredBaseModel(BaseModel):
|
32
|
-
class Config:
|
33
|
-
smart_union = True
|
34
|
-
extra = Extra.forbid
|
35
|
-
|
36
|
-
|
37
|
-
class AppInterfaceSettingsV1(ConfiguredBaseModel):
|
38
|
-
repo_url: str = Field(..., alias="repoUrl")
|
39
|
-
hash_length: int = Field(..., alias="hashLength")
|
40
|
-
|
41
|
-
|
42
|
-
class SaasherderSettingsQueryData(ConfiguredBaseModel):
|
43
|
-
settings: Optional[list[AppInterfaceSettingsV1]] = Field(..., alias="settings")
|
44
|
-
|
45
|
-
|
46
|
-
def query(query_func: Callable, **kwargs: Any) -> SaasherderSettingsQueryData:
|
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
|
-
SaasherderSettingsQueryData: queried data parsed into generated classes
|
60
|
-
"""
|
61
|
-
raw_data: dict[Any, Any] = query_func(DEFINITION, **kwargs)
|
62
|
-
return SaasherderSettingsQueryData(**raw_data)
|
@@ -1,47 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Generated by qenerate plugin=pydantic_v1. 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
|
-
Extra,
|
16
|
-
Field,
|
17
|
-
Json,
|
18
|
-
)
|
19
|
-
|
20
|
-
from reconcile.gql_definitions.fragments.jumphost_common_fields import (
|
21
|
-
CommonJumphostFields,
|
22
|
-
)
|
23
|
-
from reconcile.gql_definitions.fragments.vault_secret import VaultSecret
|
24
|
-
|
25
|
-
|
26
|
-
class ConfiguredBaseModel(BaseModel):
|
27
|
-
class Config:
|
28
|
-
smart_union = True
|
29
|
-
extra = Extra.forbid
|
30
|
-
|
31
|
-
|
32
|
-
class DisableClusterAutomationsV1(ConfiguredBaseModel):
|
33
|
-
integrations: Optional[list[str]] = Field(..., alias="integrations")
|
34
|
-
e2e_tests: Optional[list[str]] = Field(..., alias="e2eTests")
|
35
|
-
|
36
|
-
|
37
|
-
class OcConnectionCluster(ConfiguredBaseModel):
|
38
|
-
name: str = Field(..., alias="name")
|
39
|
-
server_url: str = Field(..., alias="serverUrl")
|
40
|
-
internal: Optional[bool] = Field(..., alias="internal")
|
41
|
-
insecure_skip_tls_verify: Optional[bool] = Field(..., alias="insecureSkipTLSVerify")
|
42
|
-
jump_host: Optional[CommonJumphostFields] = Field(..., alias="jumpHost")
|
43
|
-
automation_token: Optional[VaultSecret] = Field(..., alias="automationToken")
|
44
|
-
cluster_admin_automation_token: Optional[VaultSecret] = Field(
|
45
|
-
..., alias="clusterAdminAutomationToken"
|
46
|
-
)
|
47
|
-
disable: Optional[DisableClusterAutomationsV1] = Field(..., alias="disable")
|