qontract-reconcile 0.10.2.dev160__py3-none-any.whl → 0.10.2.dev173__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.dev160.dist-info → qontract_reconcile-0.10.2.dev173.dist-info}/METADATA +2 -2
- {qontract_reconcile-0.10.2.dev160.dist-info → qontract_reconcile-0.10.2.dev173.dist-info}/RECORD +30 -23
- reconcile/acs_rbac.py +1 -0
- reconcile/cli.py +4 -6
- reconcile/dashdotdb_slo.py +45 -156
- reconcile/gcp_image_mirror.py +252 -0
- reconcile/gitlab_housekeeping.py +1 -1
- reconcile/gql_definitions/common/saas_files.py +49 -0
- reconcile/gql_definitions/dashdotdb_slo/slo_documents_query.py +15 -67
- reconcile/gql_definitions/fragments/container_image_mirror.py +33 -0
- reconcile/gql_definitions/fragments/saas_slo_document.py +82 -0
- reconcile/gql_definitions/gcp/__init__.py +0 -0
- reconcile/gql_definitions/gcp/gcp_docker_repos.py +128 -0
- reconcile/gql_definitions/gcp/gcp_projects.py +77 -0
- reconcile/gql_definitions/introspection.json +380 -230
- reconcile/quay_mirror.py +3 -42
- reconcile/quay_mirror_org.py +3 -2
- reconcile/slack_base.py +2 -2
- reconcile/utils/dynatrace/client.py +0 -31
- reconcile/utils/quay_mirror.py +42 -0
- reconcile/utils/saasherder/interfaces.py +2 -0
- reconcile/utils/saasherder/saasherder.py +5 -0
- reconcile/utils/slack_api.py +3 -1
- reconcile/utils/slo_document_manager.py +278 -0
- reconcile/utils/terrascript_aws_client.py +57 -0
- tools/{sd_app_sre_alert_report.py → alert_report.py} +1 -1
- tools/cli_commands/erv2.py +61 -0
- tools/qontract_cli.py +15 -5
- reconcile/gcr_mirror.py +0 -278
- {qontract_reconcile-0.10.2.dev160.dist-info → qontract_reconcile-0.10.2.dev173.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.2.dev160.dist-info → qontract_reconcile-0.10.2.dev173.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,77 @@
|
|
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.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 GcpProjects {
|
32
|
+
gcp_projects: gcp_projects_v1 {
|
33
|
+
name
|
34
|
+
gcrPushCredentials {
|
35
|
+
...VaultSecret
|
36
|
+
}
|
37
|
+
artifactPushCredentials {
|
38
|
+
...VaultSecret
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
"""
|
43
|
+
|
44
|
+
|
45
|
+
class ConfiguredBaseModel(BaseModel):
|
46
|
+
class Config:
|
47
|
+
smart_union=True
|
48
|
+
extra=Extra.forbid
|
49
|
+
|
50
|
+
|
51
|
+
class GcpProjectV1(ConfiguredBaseModel):
|
52
|
+
name: str = Field(..., alias="name")
|
53
|
+
gcr_push_credentials: Optional[VaultSecret] = Field(..., alias="gcrPushCredentials")
|
54
|
+
artifact_push_credentials: VaultSecret = Field(..., alias="artifactPushCredentials")
|
55
|
+
|
56
|
+
|
57
|
+
class GcpProjectsQueryData(ConfiguredBaseModel):
|
58
|
+
gcp_projects: Optional[list[GcpProjectV1]] = Field(..., alias="gcp_projects")
|
59
|
+
|
60
|
+
|
61
|
+
def query(query_func: Callable, **kwargs: Any) -> GcpProjectsQueryData:
|
62
|
+
"""
|
63
|
+
This is a convenience function which queries and parses the data into
|
64
|
+
concrete types. It should be compatible with most GQL clients.
|
65
|
+
You do not have to use it to consume the generated data classes.
|
66
|
+
Alternatively, you can also mime and alternate the behavior
|
67
|
+
of this function in the caller.
|
68
|
+
|
69
|
+
Parameters:
|
70
|
+
query_func (Callable): Function which queries your GQL Server
|
71
|
+
kwargs: optional arguments that will be passed to the query function
|
72
|
+
|
73
|
+
Returns:
|
74
|
+
GcpProjectsQueryData: queried data parsed into generated classes
|
75
|
+
"""
|
76
|
+
raw_data: dict[Any, Any] = query_func(DEFINITION, **kwargs)
|
77
|
+
return GcpProjectsQueryData(**raw_data)
|