qontract-reconcile 0.10.1rc933__py3-none-any.whl → 0.10.1rc935__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.1rc933.dist-info → qontract_reconcile-0.10.1rc935.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc933.dist-info → qontract_reconcile-0.10.1rc935.dist-info}/RECORD +8 -10
- reconcile/cli.py +0 -17
- reconcile/dynatrace_token_provider/integration.py +1 -1
- reconcile/templating/lib/rendering.py +23 -6
- reconcile/dynatrace_token_provider/integration_v2.py +0 -20
- reconcile/dynatrace_token_provider/meta.py +0 -1
- {qontract_reconcile-0.10.1rc933.dist-info → qontract_reconcile-0.10.1rc935.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc933.dist-info → qontract_reconcile-0.10.1rc935.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc933.dist-info → qontract_reconcile-0.10.1rc935.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc933.dist-info → qontract_reconcile-0.10.1rc935.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.1rc935
|
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.1rc933.dist-info → qontract_reconcile-0.10.1rc935.dist-info}/RECORD
RENAMED
@@ -10,7 +10,7 @@ reconcile/aws_iam_password_reset.py,sha256=q96mwr2KeEQ5bpNniGlgIMZTxiuLSodcYfX-t
|
|
10
10
|
reconcile/aws_support_cases_sos.py,sha256=Jk6_XjDeJSYxgRGqcEAOcynt9qJF2r5HPIPcSKmoBv8,2974
|
11
11
|
reconcile/blackbox_exporter_endpoint_monitoring.py,sha256=O1wFp52EyF538c6txaWBs8eMtUIy19gyHZ6VzJ6QXS8,3512
|
12
12
|
reconcile/checkpoint.py,sha256=_JhMxrye5BgkRMxWYuf7Upli6XayPINKSsuo3ynHTRc,5010
|
13
|
-
reconcile/cli.py,sha256=
|
13
|
+
reconcile/cli.py,sha256=rcy5rudCBXog_WSWGnHoTo8xZDeP-VHVXzF4sdpdrbU,105520
|
14
14
|
reconcile/closedbox_endpoint_monitoring_base.py,sha256=rLh16BOlBOxTmJ8Si3wWyyEpmMlhh4Znx1Gc36qsmOc,4865
|
15
15
|
reconcile/cluster_deployment_mapper.py,sha256=5gumAaRCcFXsabUJ1dnuUy9WrP_FEEM5JnOnE8ch9sE,2326
|
16
16
|
reconcile/dashdotdb_base.py,sha256=l34QDu1G96_Ctnh7ZXdxXgSeCE93GQMdLAkWxmN6vDA,4775
|
@@ -179,9 +179,7 @@ reconcile/cna/assets/asset.py,sha256=KWgA4fuDAEGsJwmR52WwK_YgSJMW-1cV2la3lmNf4iE
|
|
179
179
|
reconcile/cna/assets/asset_factory.py,sha256=7T7X_J6xIsoGETqBRI45_EyIKEdQcnRPt_GAuVuLQcc,785
|
180
180
|
reconcile/cna/assets/null.py,sha256=85mVh97atCoC0aLuX47poTZiyOthmziJeBsUw0c924w,1658
|
181
181
|
reconcile/dynatrace_token_provider/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
182
|
-
reconcile/dynatrace_token_provider/integration.py,sha256=
|
183
|
-
reconcile/dynatrace_token_provider/integration_v2.py,sha256=Si-hwvGSnC4kVF33-QBZ9FTc4Jfsl_PcESbfl_XmVL8,558
|
184
|
-
reconcile/dynatrace_token_provider/meta.py,sha256=f1EdgTS-fuQMUnBmzQFNwvo3Rr9mzNO2R5aOH44oCYg,50
|
182
|
+
reconcile/dynatrace_token_provider/integration.py,sha256=Tt3Nayf1TOdizBStXdEaJKfKqlOkJljw22lWlN2GB2s,16518
|
185
183
|
reconcile/dynatrace_token_provider/metrics.py,sha256=xiKkl8fTEBQaXJelGCPNTZhHAWdO1M3pCXNr_Tei63c,1285
|
186
184
|
reconcile/external_resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
187
185
|
reconcile/external_resources/aws.py,sha256=JvjKaABy2Pg8u8Lq82Acv4zMvpE3_qGKes7OG-zlHOM,2956
|
@@ -468,7 +466,7 @@ reconcile/templating/validator.py,sha256=5f9f35PCHOOdjb7KZquL2YdabyuAUokPDa4xutS
|
|
468
466
|
reconcile/templating/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
469
467
|
reconcile/templating/lib/merge_request_manager.py,sha256=P4IbblzXbubjlaxAYoahHFADUNIXLepfqwzdnHPs8OY,5608
|
470
468
|
reconcile/templating/lib/model.py,sha256=Y1PeEP-koHKiH46JSwv4-PGRGQtcxZa9VmjTiuI6Lxs,889
|
471
|
-
reconcile/templating/lib/rendering.py,sha256=
|
469
|
+
reconcile/templating/lib/rendering.py,sha256=pbZv8uYlNtgzTjYMl5qSIW94vDS4CfE47aSjX4HpL-k,6210
|
472
470
|
reconcile/terraform_init/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
473
471
|
reconcile/terraform_init/integration.py,sha256=glQ9uy8Kj2aTQXCAupwSFeih7reX_xMX_UuWW_ywBMU,6100
|
474
472
|
reconcile/terraform_init/merge_request.py,sha256=3CYtgSd7Q9zjKg4wsDz437EPCRfGeZZ8fZ0Y-ChKXJY,1475
|
@@ -844,8 +842,8 @@ tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jr
|
|
844
842
|
tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
|
845
843
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
846
844
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
847
|
-
qontract_reconcile-0.10.
|
848
|
-
qontract_reconcile-0.10.
|
849
|
-
qontract_reconcile-0.10.
|
850
|
-
qontract_reconcile-0.10.
|
851
|
-
qontract_reconcile-0.10.
|
845
|
+
qontract_reconcile-0.10.1rc935.dist-info/METADATA,sha256=nG4Alh2q6Ov9z5xVFf0kauA15MoWAQNm-Cc-C8bNA1Y,2262
|
846
|
+
qontract_reconcile-0.10.1rc935.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
847
|
+
qontract_reconcile-0.10.1rc935.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
|
848
|
+
qontract_reconcile-0.10.1rc935.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
849
|
+
qontract_reconcile-0.10.1rc935.dist-info/RECORD,,
|
reconcile/cli.py
CHANGED
@@ -3057,25 +3057,8 @@ def dynatrace_token_provider(ctx, ocm_org_ids):
|
|
3057
3057
|
DynatraceTokenProviderIntegration,
|
3058
3058
|
DynatraceTokenProviderIntegrationParams,
|
3059
3059
|
)
|
3060
|
-
from reconcile.dynatrace_token_provider.integration_v2 import (
|
3061
|
-
DynatraceTokenProviderIntegrationParamsV2,
|
3062
|
-
DynatraceTokenProviderIntegrationV2,
|
3063
|
-
)
|
3064
3060
|
|
3065
3061
|
parsed_ocm_org_ids = set(ocm_org_ids.split(",")) if ocm_org_ids else None
|
3066
|
-
|
3067
|
-
# We will remove V1 once migrations towards new token declaration is done
|
3068
|
-
# Run V2
|
3069
|
-
run_class_integration(
|
3070
|
-
integration=DynatraceTokenProviderIntegrationV2(
|
3071
|
-
DynatraceTokenProviderIntegrationParamsV2(
|
3072
|
-
ocm_organization_ids=parsed_ocm_org_ids
|
3073
|
-
)
|
3074
|
-
),
|
3075
|
-
ctx=ctx.obj,
|
3076
|
-
)
|
3077
|
-
|
3078
|
-
# Run V1
|
3079
3062
|
run_class_integration(
|
3080
3063
|
integration=DynatraceTokenProviderIntegration(
|
3081
3064
|
DynatraceTokenProviderIntegrationParams(
|
@@ -8,7 +8,6 @@ from typing import Any
|
|
8
8
|
from dynatrace import Dynatrace
|
9
9
|
from dynatrace.environment_v2.tokens_api import ApiTokenCreated
|
10
10
|
|
11
|
-
from reconcile.dynatrace_token_provider.meta import QONTRACT_INTEGRATION
|
12
11
|
from reconcile.dynatrace_token_provider.metrics import (
|
13
12
|
DTPClustersManagedGauge,
|
14
13
|
DTPOrganizationErrorRate,
|
@@ -53,6 +52,7 @@ from reconcile.utils.runtime.integration import (
|
|
53
52
|
)
|
54
53
|
from reconcile.utils.secret_reader import SecretReaderBase
|
55
54
|
|
55
|
+
QONTRACT_INTEGRATION = "dynatrace-token-provider"
|
56
56
|
SYNCSET_ID = "ext-dynatrace-tokens-dtp"
|
57
57
|
SECRET_NAME = "dynatrace-token-dtp"
|
58
58
|
SECRET_NAMESPACE = "dynatrace"
|
@@ -123,11 +123,28 @@ class PatchRenderer(Renderer):
|
|
123
123
|
)
|
124
124
|
|
125
125
|
if isinstance(matched_value, list):
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
126
|
+
|
127
|
+
def get_identifier(data: dict[str, Any]) -> Any:
|
128
|
+
assert self.template.patch is not None # mypy
|
129
|
+
if not self.template.patch.identifier:
|
130
|
+
raise ValueError(
|
131
|
+
f"Expected identifier in patch for list at {self.template}"
|
132
|
+
)
|
133
|
+
if self.template.patch.identifier.startswith(
|
134
|
+
"$"
|
135
|
+
) and not self.template.patch.identifier.startswith("$ref"):
|
136
|
+
# jsonpath and list of strings support
|
137
|
+
if matches := [
|
138
|
+
match.value
|
139
|
+
for match in parse_jsonpath(
|
140
|
+
self.template.patch.identifier
|
141
|
+
).find(data)
|
142
|
+
]:
|
143
|
+
return matches[0]
|
144
|
+
return None
|
145
|
+
return data.get(self.template.patch.identifier)
|
146
|
+
|
147
|
+
dta_identifier = get_identifier(data_to_add)
|
131
148
|
if not dta_identifier:
|
132
149
|
raise ValueError(
|
133
150
|
f"Expected identifier {self.template.patch.identifier} in data to add"
|
@@ -137,7 +154,7 @@ class PatchRenderer(Renderer):
|
|
137
154
|
(
|
138
155
|
index
|
139
156
|
for index, data in enumerate(matched_value)
|
140
|
-
if data
|
157
|
+
if get_identifier(data) == dta_identifier
|
141
158
|
),
|
142
159
|
None,
|
143
160
|
)
|
@@ -1,20 +0,0 @@
|
|
1
|
-
from reconcile.dynatrace_token_provider.meta import QONTRACT_INTEGRATION
|
2
|
-
from reconcile.utils.runtime.integration import (
|
3
|
-
PydanticRunParams,
|
4
|
-
QontractReconcileIntegration,
|
5
|
-
)
|
6
|
-
|
7
|
-
|
8
|
-
class DynatraceTokenProviderIntegrationParamsV2(PydanticRunParams):
|
9
|
-
ocm_organization_ids: set[str] | None = None
|
10
|
-
|
11
|
-
|
12
|
-
class DynatraceTokenProviderIntegrationV2(
|
13
|
-
QontractReconcileIntegration[DynatraceTokenProviderIntegrationParamsV2]
|
14
|
-
):
|
15
|
-
@property
|
16
|
-
def name(self) -> str:
|
17
|
-
return QONTRACT_INTEGRATION
|
18
|
-
|
19
|
-
def run(self, dry_run: bool) -> None:
|
20
|
-
pass
|
@@ -1 +0,0 @@
|
|
1
|
-
QONTRACT_INTEGRATION = "dynatrace-token-provider"
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc933.dist-info → qontract_reconcile-0.10.1rc935.dist-info}/top_level.txt
RENAMED
File without changes
|