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.
Files changed (31) hide show
  1. {qontract_reconcile-0.10.2.dev160.dist-info → qontract_reconcile-0.10.2.dev173.dist-info}/METADATA +2 -2
  2. {qontract_reconcile-0.10.2.dev160.dist-info → qontract_reconcile-0.10.2.dev173.dist-info}/RECORD +30 -23
  3. reconcile/acs_rbac.py +1 -0
  4. reconcile/cli.py +4 -6
  5. reconcile/dashdotdb_slo.py +45 -156
  6. reconcile/gcp_image_mirror.py +252 -0
  7. reconcile/gitlab_housekeeping.py +1 -1
  8. reconcile/gql_definitions/common/saas_files.py +49 -0
  9. reconcile/gql_definitions/dashdotdb_slo/slo_documents_query.py +15 -67
  10. reconcile/gql_definitions/fragments/container_image_mirror.py +33 -0
  11. reconcile/gql_definitions/fragments/saas_slo_document.py +82 -0
  12. reconcile/gql_definitions/gcp/__init__.py +0 -0
  13. reconcile/gql_definitions/gcp/gcp_docker_repos.py +128 -0
  14. reconcile/gql_definitions/gcp/gcp_projects.py +77 -0
  15. reconcile/gql_definitions/introspection.json +380 -230
  16. reconcile/quay_mirror.py +3 -42
  17. reconcile/quay_mirror_org.py +3 -2
  18. reconcile/slack_base.py +2 -2
  19. reconcile/utils/dynatrace/client.py +0 -31
  20. reconcile/utils/quay_mirror.py +42 -0
  21. reconcile/utils/saasherder/interfaces.py +2 -0
  22. reconcile/utils/saasherder/saasherder.py +5 -0
  23. reconcile/utils/slack_api.py +3 -1
  24. reconcile/utils/slo_document_manager.py +278 -0
  25. reconcile/utils/terrascript_aws_client.py +57 -0
  26. tools/{sd_app_sre_alert_report.py → alert_report.py} +1 -1
  27. tools/cli_commands/erv2.py +61 -0
  28. tools/qontract_cli.py +15 -5
  29. reconcile/gcr_mirror.py +0 -278
  30. {qontract_reconcile-0.10.2.dev160.dist-info → qontract_reconcile-0.10.2.dev173.dist-info}/WHEEL +0 -0
  31. {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)