qontract-reconcile 0.10.1rc847__py3-none-any.whl → 0.10.1rc849__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.1rc847.dist-info → qontract_reconcile-0.10.1rc849.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc847.dist-info → qontract_reconcile-0.10.1rc849.dist-info}/RECORD +8 -8
- reconcile/utils/three_way_diff_strategy.py +1 -1
- tools/cli_commands/systems_and_tools.py +167 -64
- tools/qontract_cli.py +3 -0
- {qontract_reconcile-0.10.1rc847.dist-info → qontract_reconcile-0.10.1rc849.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc847.dist-info → qontract_reconcile-0.10.1rc849.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc847.dist-info → qontract_reconcile-0.10.1rc849.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc847.dist-info → qontract_reconcile-0.10.1rc849.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.10.
|
3
|
+
Version: 0.10.1rc849
|
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
|
{qontract_reconcile-0.10.1rc847.dist-info → qontract_reconcile-0.10.1rc849.dist-info}/RECORD
RENAMED
@@ -701,7 +701,7 @@ reconcile/utils/structs.py,sha256=LcbLEg8WxfRqM6nW7NhcWN0YeqF7SQzxOgntmLs1SgY,35
|
|
701
701
|
reconcile/utils/template.py,sha256=wTvRU4AnAV_o042tD4Mwls2dwWMuk7MKnde3MaCjaYg,331
|
702
702
|
reconcile/utils/terraform_client.py,sha256=mZEKpu6nbfiQd60wRkc8-5sljBTUTOgaAKnF89itMzU,32085
|
703
703
|
reconcile/utils/terrascript_aws_client.py,sha256=87J2RszhfqYkABzZ5yO-JxycOvjvrx3bWgSmISop1tQ,276092
|
704
|
-
reconcile/utils/three_way_diff_strategy.py,sha256=
|
704
|
+
reconcile/utils/three_way_diff_strategy.py,sha256=Jo0M42zvG_K6ygJOSAZZTAPxF2Fkr247O1YsmDbi0TA,4641
|
705
705
|
reconcile/utils/throughput.py,sha256=iP4UWAe2LVhDo69mPPmgo9nQ7RxHD6_GS8MZe-aSiuM,344
|
706
706
|
reconcile/utils/vault.py,sha256=AYGG5aDJ7CSVhTFdZowfEg3iSQWenoAt676aGjHQMX8,14978
|
707
707
|
reconcile/utils/vaultsecretref.py,sha256=3Ed2uBy36TzSvL0B-l4FoWQqB2SbBKDKEuUPIO608Bo,931
|
@@ -806,12 +806,12 @@ tools/app_interface_metrics_exporter.py,sha256=zkwkxdAUAxjdc-pzx2_oJXG25fo0Fnyd5
|
|
806
806
|
tools/app_interface_reporter.py,sha256=upA-J-n-HXHKVDINRuMR7vTt-iJvQORKUVi9D3leQto,17738
|
807
807
|
tools/glitchtip_access_reporter.py,sha256=oPBnk_YoDuljU3v0FaChzOwwnk4vap1xEE67QEjzdqs,2948
|
808
808
|
tools/glitchtip_access_revalidation.py,sha256=8kbBJk04mkq28kWoRDDkfCGIF3GRg3pJrFAh1sW0dbk,2821
|
809
|
-
tools/qontract_cli.py,sha256=
|
809
|
+
tools/qontract_cli.py,sha256=y6Okq0KPRKXx8glu4g3GeDavtoosH8iqwy5YZMV8cwc,118517
|
810
810
|
tools/sd_app_sre_alert_report.py,sha256=e9vAdyenUz2f5c8-z-5WY0wv-SJ9aePKDH2r4IwB6pc,5063
|
811
811
|
tools/template_validation.py,sha256=-U-lTGeLaci8yWPEblCJeev2DOlY1jM9QOOh-O1zts8,3376
|
812
812
|
tools/cli_commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
813
813
|
tools/cli_commands/gpg_encrypt.py,sha256=w8hl4jIEWk5wKbEFN6fVEOwUJGmdlvOqYodW3XSN7mU,4978
|
814
|
-
tools/cli_commands/systems_and_tools.py,sha256=
|
814
|
+
tools/cli_commands/systems_and_tools.py,sha256=SRMV-VZn2BQ9JeUY_w5O8M_f9eMVxu7LidISUi1cfJQ,15073
|
815
815
|
tools/cli_commands/cost_report/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
816
816
|
tools/cli_commands/cost_report/aws.py,sha256=bdvbT3bDymBOMx4Ve4kt154MeGiGusTSpOpMMFrQ4SM,5191
|
817
817
|
tools/cli_commands/cost_report/cost_management_api.py,sha256=tFzjaZ3RSVJeAUsfSWXHiQlMVbV8dFcXibK158ODQcA,2549
|
@@ -834,8 +834,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
|
|
834
834
|
tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jrss,4941
|
835
835
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
836
836
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
837
|
-
qontract_reconcile-0.10.
|
838
|
-
qontract_reconcile-0.10.
|
839
|
-
qontract_reconcile-0.10.
|
840
|
-
qontract_reconcile-0.10.
|
841
|
-
qontract_reconcile-0.10.
|
837
|
+
qontract_reconcile-0.10.1rc849.dist-info/METADATA,sha256=9kea4FnbZH5tdRzVr18mi4qWWVKwjRXh37Ge0Qo2PzA,2273
|
838
|
+
qontract_reconcile-0.10.1rc849.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
839
|
+
qontract_reconcile-0.10.1rc849.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
|
840
|
+
qontract_reconcile-0.10.1rc849.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
841
|
+
qontract_reconcile-0.10.1rc849.dist-info/RECORD,,
|
@@ -61,7 +61,7 @@ def normalize_object(item: OR) -> OR:
|
|
61
61
|
validate_k8s_object=False,
|
62
62
|
)
|
63
63
|
|
64
|
-
annotations = n.body.get("metadata"
|
64
|
+
annotations = n.body.get("metadata").get("annotations") or {}
|
65
65
|
metadata["annotations"] = {
|
66
66
|
k: v for k, v in annotations.items() if k not in NORMALIZE_IGNORE_ANNOTATIONS
|
67
67
|
}
|
@@ -8,41 +8,107 @@ from typing import (
|
|
8
8
|
|
9
9
|
from pydantic import BaseModel
|
10
10
|
|
11
|
+
from reconcile.gql_definitions.common.app_code_component_repos import (
|
12
|
+
DEFINITION as CODE_COMPONENTS_DEFINITION,
|
13
|
+
)
|
11
14
|
from reconcile.gql_definitions.common.app_code_component_repos import (
|
12
15
|
AppCodeComponentsV1,
|
13
16
|
)
|
14
|
-
from reconcile.gql_definitions.common.clusters import
|
17
|
+
from reconcile.gql_definitions.common.clusters import (
|
18
|
+
DEFINITION as CLUSTERS_DEFINITION,
|
19
|
+
)
|
20
|
+
from reconcile.gql_definitions.common.clusters import (
|
21
|
+
ClusterV1,
|
22
|
+
)
|
23
|
+
from reconcile.gql_definitions.common.ocm_environments import (
|
24
|
+
DEFINITION as OCM_ENVIRONMENTS_DEFINITION,
|
25
|
+
)
|
26
|
+
from reconcile.gql_definitions.common.pagerduty_instances import (
|
27
|
+
DEFINITION as PAGERDUTY_INSTANCES_DEFINITION,
|
28
|
+
)
|
15
29
|
from reconcile.gql_definitions.common.pagerduty_instances import (
|
16
30
|
PagerDutyInstanceV1,
|
17
31
|
)
|
18
|
-
from reconcile.gql_definitions.common.quay_instances import
|
19
|
-
|
32
|
+
from reconcile.gql_definitions.common.quay_instances import (
|
33
|
+
DEFINITION as QUAY_INSTANCES_DEFINITION,
|
34
|
+
)
|
35
|
+
from reconcile.gql_definitions.common.quay_instances import (
|
36
|
+
QuayInstanceV1,
|
37
|
+
)
|
38
|
+
from reconcile.gql_definitions.common.slack_workspaces import (
|
39
|
+
DEFINITION as SLACK_WORKSPACES_DEFINITION,
|
40
|
+
)
|
41
|
+
from reconcile.gql_definitions.common.slack_workspaces import (
|
42
|
+
SlackWorkspaceV1,
|
43
|
+
)
|
44
|
+
from reconcile.gql_definitions.dynatrace_token_provider.dynatrace_bootstrap_tokens import (
|
45
|
+
DEFINITION as DYNATRACE_ENVIRONMENTS_DEFINITION,
|
46
|
+
)
|
20
47
|
from reconcile.gql_definitions.dynatrace_token_provider.dynatrace_bootstrap_tokens import (
|
21
48
|
DynatraceEnvironmentV1,
|
22
49
|
)
|
23
50
|
from reconcile.gql_definitions.fragments.ocm_environment import OCMEnvironment
|
24
|
-
from reconcile.gql_definitions.gitlab_members.gitlab_instances import
|
25
|
-
|
51
|
+
from reconcile.gql_definitions.gitlab_members.gitlab_instances import (
|
52
|
+
DEFINITION as GITLAB_INSTANCES_DEFINITION,
|
53
|
+
)
|
54
|
+
from reconcile.gql_definitions.gitlab_members.gitlab_instances import (
|
55
|
+
GitlabInstanceV1,
|
56
|
+
)
|
57
|
+
from reconcile.gql_definitions.glitchtip.glitchtip_instance import (
|
58
|
+
DEFINITION as GLITCHTIP_INSTANCES_DEFINITION,
|
59
|
+
)
|
60
|
+
from reconcile.gql_definitions.glitchtip.glitchtip_instance import (
|
61
|
+
GlitchtipInstanceV1,
|
62
|
+
)
|
63
|
+
from reconcile.gql_definitions.jenkins_configs.jenkins_instances import (
|
64
|
+
DEFINITION as JENKINS_INSTANCES_DEFINITION,
|
65
|
+
)
|
26
66
|
from reconcile.gql_definitions.jenkins_configs.jenkins_instances import (
|
27
67
|
JenkinsInstanceV1,
|
28
68
|
)
|
29
|
-
from reconcile.gql_definitions.jira.jira_servers import
|
30
|
-
|
69
|
+
from reconcile.gql_definitions.jira.jira_servers import (
|
70
|
+
DEFINITION as JIRA_SERVERS_DEFINITION,
|
71
|
+
)
|
72
|
+
from reconcile.gql_definitions.jira.jira_servers import (
|
73
|
+
JiraServerV1,
|
74
|
+
)
|
75
|
+
from reconcile.gql_definitions.statuspage.statuspages import (
|
76
|
+
DEFINITION as STATUS_PAGES_DEFINITION,
|
77
|
+
)
|
78
|
+
from reconcile.gql_definitions.statuspage.statuspages import (
|
79
|
+
StatusPageV1,
|
80
|
+
)
|
81
|
+
from reconcile.gql_definitions.terraform_cloudflare_resources.terraform_cloudflare_accounts import (
|
82
|
+
DEFINITION as CLOUDFLARE_ACCOUNTS_DEFINITION,
|
83
|
+
)
|
31
84
|
from reconcile.gql_definitions.terraform_cloudflare_resources.terraform_cloudflare_accounts import (
|
32
85
|
CloudflareAccountV1,
|
33
86
|
)
|
87
|
+
from reconcile.gql_definitions.terraform_tgw_attachments.aws_accounts import (
|
88
|
+
DEFINITION as AWS_ACCOUNTS_DEFINITION,
|
89
|
+
)
|
34
90
|
from reconcile.gql_definitions.terraform_tgw_attachments.aws_accounts import (
|
35
91
|
AWSAccountV1,
|
36
92
|
)
|
93
|
+
from reconcile.gql_definitions.unleash_feature_toggles.feature_toggles import (
|
94
|
+
DEFINITION as UNLEASH_INSTANCES_DEFINITION,
|
95
|
+
)
|
37
96
|
from reconcile.gql_definitions.unleash_feature_toggles.feature_toggles import (
|
38
97
|
UnleashInstanceV1,
|
39
98
|
)
|
40
|
-
from reconcile.gql_definitions.vault_instances.vault_instances import
|
99
|
+
from reconcile.gql_definitions.vault_instances.vault_instances import (
|
100
|
+
DEFINITION as VAULT_INSTANCES_DEFINITION,
|
101
|
+
)
|
102
|
+
from reconcile.gql_definitions.vault_instances.vault_instances import (
|
103
|
+
VaultInstanceV1,
|
104
|
+
)
|
41
105
|
from reconcile.statuspage.integration import get_status_pages
|
42
106
|
from reconcile.typed_queries.cloudflare import get_cloudflare_accounts
|
43
107
|
from reconcile.typed_queries.clusters import get_clusters
|
44
108
|
from reconcile.typed_queries.dynatrace import get_dynatrace_environments
|
45
|
-
from reconcile.typed_queries.gitlab_instances import
|
109
|
+
from reconcile.typed_queries.gitlab_instances import (
|
110
|
+
get_gitlab_instances,
|
111
|
+
)
|
46
112
|
from reconcile.typed_queries.glitchtip import get_glitchtip_instances
|
47
113
|
from reconcile.typed_queries.jenkins import get_jenkins_instances
|
48
114
|
from reconcile.typed_queries.jira import get_jira_servers
|
@@ -67,203 +133,228 @@ class SystemTool(BaseModel):
|
|
67
133
|
name: str
|
68
134
|
url: str
|
69
135
|
description: str
|
136
|
+
enumeration: str
|
70
137
|
|
71
138
|
@classmethod
|
72
|
-
def init_from_model(cls, model: Any) -> Self:
|
139
|
+
def init_from_model(cls, model: Any, enumeration: Any) -> Self:
|
73
140
|
match model:
|
74
141
|
case GitlabInstanceV1():
|
75
|
-
return cls.init_from_gitlab(model)
|
142
|
+
return cls.init_from_gitlab(model, enumeration)
|
76
143
|
case JenkinsInstanceV1():
|
77
|
-
return cls.init_from_jenkins(model)
|
144
|
+
return cls.init_from_jenkins(model, enumeration)
|
78
145
|
case ClusterV1():
|
79
|
-
return cls.init_from_cluster(model)
|
146
|
+
return cls.init_from_cluster(model, enumeration)
|
80
147
|
case AWSAccountV1():
|
81
|
-
return cls.init_from_aws_account(model)
|
148
|
+
return cls.init_from_aws_account(model, enumeration)
|
82
149
|
case DynatraceEnvironmentV1():
|
83
|
-
return cls.init_from_dynatrace_environment(model)
|
150
|
+
return cls.init_from_dynatrace_environment(model, enumeration)
|
84
151
|
case GlitchtipInstanceV1():
|
85
|
-
return cls.init_from_glitchtip_instance(model)
|
152
|
+
return cls.init_from_glitchtip_instance(model, enumeration)
|
86
153
|
case JiraServerV1():
|
87
|
-
return cls.init_from_jira_server(model)
|
154
|
+
return cls.init_from_jira_server(model, enumeration)
|
88
155
|
case OCMEnvironment():
|
89
|
-
return cls.init_from_ocm_environment(model)
|
156
|
+
return cls.init_from_ocm_environment(model, enumeration)
|
90
157
|
case PagerDutyInstanceV1():
|
91
|
-
return cls.init_from_pagerduty_instance(model)
|
158
|
+
return cls.init_from_pagerduty_instance(model, enumeration)
|
92
159
|
case QuayInstanceV1():
|
93
|
-
return cls.init_from_quay_instance(model)
|
160
|
+
return cls.init_from_quay_instance(model, enumeration)
|
94
161
|
case SlackWorkspaceV1():
|
95
|
-
return cls.init_from_slack_workspace(model)
|
162
|
+
return cls.init_from_slack_workspace(model, enumeration)
|
96
163
|
case StatusPageV1():
|
97
|
-
return cls.init_from_status_page(model)
|
164
|
+
return cls.init_from_status_page(model, enumeration)
|
98
165
|
case UnleashInstanceV1():
|
99
|
-
return cls.init_from_unleash_instance(model)
|
166
|
+
return cls.init_from_unleash_instance(model, enumeration)
|
100
167
|
case VaultInstanceV1():
|
101
|
-
return cls.init_from_vault_instance(model)
|
168
|
+
return cls.init_from_vault_instance(model, enumeration)
|
102
169
|
case CloudflareAccountV1():
|
103
|
-
return cls.init_from_cloudflare_account(model)
|
170
|
+
return cls.init_from_cloudflare_account(model, enumeration)
|
104
171
|
case AppCodeComponentsV1():
|
105
|
-
return cls.init_from_code_component(model)
|
172
|
+
return cls.init_from_code_component(model, enumeration)
|
106
173
|
case _:
|
107
174
|
raise NotImplementedError(f"unsupported: {model}")
|
108
175
|
|
109
176
|
@classmethod
|
110
|
-
def init_from_gitlab(cls, g: GitlabInstanceV1) -> Self:
|
177
|
+
def init_from_gitlab(cls, g: GitlabInstanceV1, enumeration: Any) -> Self:
|
111
178
|
return cls(
|
112
179
|
system_type="gitlab",
|
113
180
|
system_id=g.name,
|
114
181
|
name=g.name,
|
115
182
|
url=g.url,
|
116
183
|
description=g.description,
|
184
|
+
enumeration=enumeration,
|
117
185
|
)
|
118
186
|
|
119
187
|
@classmethod
|
120
|
-
def init_from_jenkins(cls, j: JenkinsInstanceV1) -> Self:
|
188
|
+
def init_from_jenkins(cls, j: JenkinsInstanceV1, enumeration: Any) -> Self:
|
121
189
|
return cls(
|
122
190
|
system_type="jenkins",
|
123
191
|
system_id=j.name,
|
124
192
|
name=j.name,
|
125
193
|
url=j.server_url,
|
126
194
|
description=j.description,
|
195
|
+
enumeration=enumeration,
|
127
196
|
)
|
128
197
|
|
129
198
|
@classmethod
|
130
|
-
def init_from_cluster(cls, c: ClusterV1) -> Self:
|
199
|
+
def init_from_cluster(cls, c: ClusterV1, enumeration: Any) -> Self:
|
131
200
|
return cls(
|
132
201
|
system_type="openshift",
|
133
202
|
system_id=c.spec.q_id if c.spec else "",
|
134
203
|
name=c.name,
|
135
204
|
url=c.server_url,
|
136
205
|
description=c.description,
|
206
|
+
enumeration=enumeration,
|
137
207
|
)
|
138
208
|
|
139
209
|
@classmethod
|
140
|
-
def init_from_aws_account(cls, a: AWSAccountV1) -> Self:
|
210
|
+
def init_from_aws_account(cls, a: AWSAccountV1, enumeration: Any) -> Self:
|
141
211
|
return cls(
|
142
212
|
system_type="aws",
|
143
213
|
system_id=a.uid,
|
144
214
|
name=a.name,
|
145
215
|
url=a.console_url,
|
146
216
|
description=a.description,
|
217
|
+
enumeration=enumeration,
|
147
218
|
)
|
148
219
|
|
149
220
|
@classmethod
|
150
|
-
def init_from_dynatrace_environment(
|
221
|
+
def init_from_dynatrace_environment(
|
222
|
+
cls, dt: DynatraceEnvironmentV1, enumeration: Any
|
223
|
+
) -> Self:
|
151
224
|
return cls(
|
152
225
|
system_type="dynatrace",
|
153
226
|
system_id=dt.environment_id,
|
154
227
|
name=dt.name,
|
155
228
|
url=dt.environment_url,
|
156
229
|
description=dt.description,
|
230
|
+
enumeration=enumeration,
|
157
231
|
)
|
158
232
|
|
159
233
|
@classmethod
|
160
|
-
def init_from_glitchtip_instance(
|
234
|
+
def init_from_glitchtip_instance(
|
235
|
+
cls, g: GlitchtipInstanceV1, enumeration: Any
|
236
|
+
) -> Self:
|
161
237
|
return cls(
|
162
238
|
system_type="glitchtip",
|
163
239
|
system_id=g.name,
|
164
240
|
name=g.name,
|
165
241
|
url=g.console_url,
|
166
242
|
description=g.description,
|
243
|
+
enumeration=enumeration,
|
167
244
|
)
|
168
245
|
|
169
246
|
@classmethod
|
170
|
-
def init_from_jira_server(cls, j: JiraServerV1) -> Self:
|
247
|
+
def init_from_jira_server(cls, j: JiraServerV1, enumeration: Any) -> Self:
|
171
248
|
return cls(
|
172
249
|
system_type="jira",
|
173
250
|
system_id=j.name,
|
174
251
|
name=j.name,
|
175
252
|
url=j.server_url,
|
176
253
|
description=j.description,
|
254
|
+
enumeration=enumeration,
|
177
255
|
)
|
178
256
|
|
179
257
|
@classmethod
|
180
|
-
def init_from_ocm_environment(cls, o: OCMEnvironment) -> Self:
|
258
|
+
def init_from_ocm_environment(cls, o: OCMEnvironment, enumeration: Any) -> Self:
|
181
259
|
return cls(
|
182
260
|
system_type="ocm",
|
183
261
|
system_id=o.name,
|
184
262
|
name=o.name,
|
185
263
|
url=o.url,
|
186
264
|
description=o.description,
|
265
|
+
enumeration=enumeration,
|
187
266
|
)
|
188
267
|
|
189
268
|
@classmethod
|
190
|
-
def init_from_pagerduty_instance(
|
269
|
+
def init_from_pagerduty_instance(
|
270
|
+
cls, p: PagerDutyInstanceV1, enumeration: Any
|
271
|
+
) -> Self:
|
191
272
|
return cls(
|
192
273
|
system_type="pagerduty",
|
193
274
|
system_id=p.name,
|
194
275
|
name=p.name,
|
195
276
|
url=p.description, # no url
|
196
277
|
description=p.description,
|
278
|
+
enumeration=enumeration,
|
197
279
|
)
|
198
280
|
|
199
281
|
@classmethod
|
200
|
-
def init_from_quay_instance(cls, q: QuayInstanceV1) -> Self:
|
282
|
+
def init_from_quay_instance(cls, q: QuayInstanceV1, enumeration: Any) -> Self:
|
201
283
|
return cls(
|
202
284
|
system_type="quay",
|
203
285
|
system_id=q.name,
|
204
286
|
name=q.name,
|
205
287
|
url=f"https://{q.name}.pagerduty.com",
|
206
288
|
description=q.description,
|
289
|
+
enumeration=enumeration,
|
207
290
|
)
|
208
291
|
|
209
292
|
@classmethod
|
210
|
-
def init_from_slack_workspace(cls, s: SlackWorkspaceV1) -> Self:
|
293
|
+
def init_from_slack_workspace(cls, s: SlackWorkspaceV1, enumeration: Any) -> Self:
|
211
294
|
return cls(
|
212
295
|
system_type="slack",
|
213
296
|
system_id=s.name,
|
214
297
|
name=s.name,
|
215
298
|
url=f"https://{s.name}.slack.com",
|
216
299
|
description=s.description,
|
300
|
+
enumeration=enumeration,
|
217
301
|
)
|
218
302
|
|
219
303
|
@classmethod
|
220
|
-
def init_from_status_page(cls, s: StatusPageV1) -> Self:
|
304
|
+
def init_from_status_page(cls, s: StatusPageV1, enumeration: Any) -> Self:
|
221
305
|
return cls(
|
222
306
|
system_type="statuspage",
|
223
307
|
system_id=s.name,
|
224
308
|
name=s.name,
|
225
309
|
url=s.url,
|
226
310
|
description=s.description,
|
311
|
+
enumeration=enumeration,
|
227
312
|
)
|
228
313
|
|
229
314
|
@classmethod
|
230
|
-
def init_from_unleash_instance(cls, u: UnleashInstanceV1) -> Self:
|
315
|
+
def init_from_unleash_instance(cls, u: UnleashInstanceV1, enumeration: Any) -> Self:
|
231
316
|
return cls(
|
232
317
|
system_type="unleash",
|
233
318
|
system_id=u.name,
|
234
319
|
name=u.name,
|
235
320
|
url=u.url,
|
236
321
|
description=u.description,
|
322
|
+
enumeration=enumeration,
|
237
323
|
)
|
238
324
|
|
239
325
|
@classmethod
|
240
|
-
def init_from_vault_instance(cls, v: VaultInstanceV1) -> Self:
|
326
|
+
def init_from_vault_instance(cls, v: VaultInstanceV1, enumeration: Any) -> Self:
|
241
327
|
return cls(
|
242
328
|
system_type="vault",
|
243
329
|
system_id=v.name,
|
244
330
|
name=v.name,
|
245
331
|
url=v.address,
|
246
332
|
description=v.description,
|
333
|
+
enumeration=enumeration,
|
247
334
|
)
|
248
335
|
|
249
336
|
@classmethod
|
250
|
-
def init_from_cloudflare_account(
|
337
|
+
def init_from_cloudflare_account(
|
338
|
+
cls, a: CloudflareAccountV1, enumeration: Any
|
339
|
+
) -> Self:
|
251
340
|
return cls(
|
252
341
|
system_type="cloudflare",
|
253
342
|
system_id=a.name,
|
254
343
|
name=a.name,
|
255
344
|
url="https://dash.cloudflare.com/",
|
256
345
|
description=a.description,
|
346
|
+
enumeration=enumeration,
|
257
347
|
)
|
258
348
|
|
259
349
|
@classmethod
|
260
|
-
def init_from_code_component(cls, c: AppCodeComponentsV1) -> Self:
|
350
|
+
def init_from_code_component(cls, c: AppCodeComponentsV1, enumeration: Any) -> Self:
|
261
351
|
return cls(
|
262
352
|
system_type=c.resource,
|
263
353
|
system_id=c.name,
|
264
354
|
name=c.name,
|
265
355
|
url=c.url,
|
266
356
|
description=c.description or "",
|
357
|
+
enumeration=enumeration,
|
267
358
|
)
|
268
359
|
|
269
360
|
|
@@ -271,12 +362,12 @@ class SystemToolInventory:
|
|
271
362
|
def __init__(self) -> None:
|
272
363
|
self.systems_and_tools: list[SystemTool] = []
|
273
364
|
|
274
|
-
def append(self, model: Any) -> None:
|
275
|
-
self.systems_and_tools.append(SystemTool.init_from_model(model))
|
365
|
+
def append(self, model: Any, enumeration: Any) -> None:
|
366
|
+
self.systems_and_tools.append(SystemTool.init_from_model(model, enumeration))
|
276
367
|
|
277
|
-
def update(self, models: list[Any]) -> None:
|
368
|
+
def update(self, models: list[Any], enumeration: Any) -> None:
|
278
369
|
for m in models:
|
279
|
-
self.append(m)
|
370
|
+
self.append(m, enumeration)
|
280
371
|
|
281
372
|
@property
|
282
373
|
def data(self) -> list[dict[str, Any]]:
|
@@ -287,6 +378,9 @@ class SystemToolInventory:
|
|
287
378
|
"name": st.name,
|
288
379
|
"url": st.url,
|
289
380
|
"description": st.description.replace("\n", "\\n"),
|
381
|
+
"enumeration": st.enumeration.strip().replace("\n", ",")
|
382
|
+
if st.enumeration
|
383
|
+
else "",
|
290
384
|
}
|
291
385
|
for st in self.systems_and_tools
|
292
386
|
]
|
@@ -299,6 +393,7 @@ class SystemToolInventory:
|
|
299
393
|
"name",
|
300
394
|
"url",
|
301
395
|
"description",
|
396
|
+
"enumeration",
|
302
397
|
]
|
303
398
|
|
304
399
|
|
@@ -306,24 +401,31 @@ def get_systems_and_tools_inventory() -> SystemToolInventory:
|
|
306
401
|
gql_api = gql.get_api()
|
307
402
|
inventory = SystemToolInventory()
|
308
403
|
|
309
|
-
inventory.update(get_gitlab_instances())
|
310
|
-
inventory.update(get_jenkins_instances())
|
311
|
-
inventory.update(get_clusters())
|
312
|
-
inventory.update(get_aws_accounts(gql_api))
|
313
|
-
inventory.update(get_dynatrace_environments())
|
314
|
-
inventory.update(get_glitchtip_instances())
|
315
|
-
inventory.update(get_jira_servers())
|
316
|
-
inventory.update(get_ocm_environments())
|
317
|
-
inventory.update(
|
318
|
-
|
319
|
-
|
320
|
-
inventory.update(
|
321
|
-
inventory.update(
|
322
|
-
inventory.update(
|
323
|
-
inventory.update(
|
324
|
-
inventory.update(
|
325
|
-
|
326
|
-
|
404
|
+
inventory.update(get_gitlab_instances(), GITLAB_INSTANCES_DEFINITION)
|
405
|
+
inventory.update(get_jenkins_instances(), JENKINS_INSTANCES_DEFINITION)
|
406
|
+
inventory.update(get_clusters(), CLUSTERS_DEFINITION)
|
407
|
+
inventory.update(get_aws_accounts(gql_api), AWS_ACCOUNTS_DEFINITION)
|
408
|
+
inventory.update(get_dynatrace_environments(), DYNATRACE_ENVIRONMENTS_DEFINITION)
|
409
|
+
inventory.update(get_glitchtip_instances(), GLITCHTIP_INSTANCES_DEFINITION)
|
410
|
+
inventory.update(get_jira_servers(), JIRA_SERVERS_DEFINITION)
|
411
|
+
inventory.update(get_ocm_environments(), OCM_ENVIRONMENTS_DEFINITION)
|
412
|
+
inventory.update(
|
413
|
+
get_pagerduty_instances(gql_api.query), PAGERDUTY_INSTANCES_DEFINITION
|
414
|
+
)
|
415
|
+
inventory.update(get_quay_instances(), QUAY_INSTANCES_DEFINITION)
|
416
|
+
inventory.update(get_slack_workspaces(), SLACK_WORKSPACES_DEFINITION)
|
417
|
+
inventory.update(get_status_pages(), STATUS_PAGES_DEFINITION)
|
418
|
+
inventory.update(get_unleash_instances(), UNLEASH_INSTANCES_DEFINITION)
|
419
|
+
inventory.update(get_vault_instances(), VAULT_INSTANCES_DEFINITION)
|
420
|
+
inventory.update(get_cloudflare_accounts(), CLOUDFLARE_ACCOUNTS_DEFINITION)
|
421
|
+
inventory.update(
|
422
|
+
[
|
423
|
+
c
|
424
|
+
for c in get_code_components()
|
425
|
+
if c.resource in {"gitops", "infrastructure"}
|
426
|
+
],
|
427
|
+
CODE_COMPONENTS_DEFINITION,
|
428
|
+
)
|
327
429
|
|
328
430
|
inventory.systems_and_tools.append(
|
329
431
|
SystemTool(
|
@@ -332,6 +434,7 @@ def get_systems_and_tools_inventory() -> SystemToolInventory:
|
|
332
434
|
name="github",
|
333
435
|
url="https://github.com",
|
334
436
|
description="github",
|
437
|
+
enumeration="github",
|
335
438
|
)
|
336
439
|
)
|
337
440
|
|
tools/qontract_cli.py
CHANGED
@@ -2705,6 +2705,9 @@ def hcp_migration_status(ctx):
|
|
2705
2705
|
@get.command()
|
2706
2706
|
@click.pass_context
|
2707
2707
|
def systems_and_tools(ctx):
|
2708
|
+
print(
|
2709
|
+
f"This report is obtained from app-interface Graphql endpoint available at: {config.get_config()['graphql']['server']}"
|
2710
|
+
)
|
2708
2711
|
inventory = get_systems_and_tools_inventory()
|
2709
2712
|
print_output(ctx.obj["options"], inventory.data, inventory.columns)
|
2710
2713
|
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc847.dist-info → qontract_reconcile-0.10.1rc849.dist-info}/top_level.txt
RENAMED
File without changes
|