qontract-reconcile 0.10.1rc794__py3-none-any.whl → 0.10.1rc795__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.1rc794.dist-info → qontract_reconcile-0.10.1rc795.dist-info}/METADATA +1 -2
- {qontract_reconcile-0.10.1rc794.dist-info → qontract_reconcile-0.10.1rc795.dist-info}/RECORD +6 -6
- reconcile/statuspage/atlassian.py +15 -16
- {qontract_reconcile-0.10.1rc794.dist-info → qontract_reconcile-0.10.1rc795.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc794.dist-info → qontract_reconcile-0.10.1rc795.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc794.dist-info → qontract_reconcile-0.10.1rc795.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc794.dist-info → qontract_reconcile-0.10.1rc795.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.1rc795
|
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
|
@@ -46,7 +46,6 @@ Requires-Dist: kubernetes ~=24.0
|
|
46
46
|
Requires-Dist: websocket-client <0.55.0,>=0.35
|
47
47
|
Requires-Dist: sshtunnel >=0.4.0
|
48
48
|
Requires-Dist: croniter <1.1.0,>=1.0.15
|
49
|
-
Requires-Dist: transity-statuspageio <0.1,>=0.0.3
|
50
49
|
Requires-Dist: pydantic ~=1.10.6
|
51
50
|
Requires-Dist: MarkupSafe ==2.1.1
|
52
51
|
Requires-Dist: filetype ~=1.2.0
|
{qontract_reconcile-0.10.1rc794.dist-info → qontract_reconcile-0.10.1rc795.dist-info}/RECORD
RENAMED
@@ -431,7 +431,7 @@ reconcile/skupper_network/models.py,sha256=DNTI7HZv-rqY42GIIxyRuvroHLvdH6rJerjIq
|
|
431
431
|
reconcile/skupper_network/reconciler.py,sha256=XS-1oKBr_1l3dYUAVqUH6gCHg1G5ZuOfY_7fgGVAiFA,9996
|
432
432
|
reconcile/skupper_network/site_controller.py,sha256=A3K-62BjJ5HiFVydV0ouGoD1NwrO7XhAH15BHAcS9fk,1550
|
433
433
|
reconcile/statuspage/__init__.py,sha256=o9vR6sp3ARDQFZrbCEShelTxjF1XgfLaElK_QVt_248,261
|
434
|
-
reconcile/statuspage/atlassian.py,sha256=
|
434
|
+
reconcile/statuspage/atlassian.py,sha256=1W9wQyO0B0qcw5Zrke8h7Rv9xhpXLyMezM7N-5XE8Dg,13665
|
435
435
|
reconcile/statuspage/integration.py,sha256=---tzyl381RddAkIhXb7n3ySjUhuX7FBBI152SYsRfk,3654
|
436
436
|
reconcile/statuspage/page.py,sha256=cJH2sDA8jiAmSdaDitQqNjkyDq_UP2w3s7eauCi-yt4,3740
|
437
437
|
reconcile/statuspage/state.py,sha256=HD9EOoKm_nEqCMLIwW809En3cq5VhyzKJPUbsh-bae8,1617
|
@@ -788,8 +788,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
|
|
788
788
|
tools/test/test_qontract_cli.py,sha256=w2l4BHB09k1d-BGJ1jBUNCqDv7zkqYrMHojQXg-21kQ,4155
|
789
789
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
790
790
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
791
|
-
qontract_reconcile-0.10.
|
792
|
-
qontract_reconcile-0.10.
|
793
|
-
qontract_reconcile-0.10.
|
794
|
-
qontract_reconcile-0.10.
|
795
|
-
qontract_reconcile-0.10.
|
791
|
+
qontract_reconcile-0.10.1rc795.dist-info/METADATA,sha256=Ovpk0jb54wUWpHAZyy7CYWlvtanybjVhy_aS0MtypCM,2314
|
792
|
+
qontract_reconcile-0.10.1rc795.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
793
|
+
qontract_reconcile-0.10.1rc795.dist-info/entry_points.txt,sha256=rIxI5zWtHNlfpDeq1a7pZXAPoqf7HG32KMTN3MeWK_8,429
|
794
|
+
qontract_reconcile-0.10.1rc795.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
795
|
+
qontract_reconcile-0.10.1rc795.dist-info/RECORD,,
|
@@ -7,7 +7,6 @@ from typing import (
|
|
7
7
|
)
|
8
8
|
|
9
9
|
import requests
|
10
|
-
import statuspageio # type: ignore
|
11
10
|
from pydantic import BaseModel
|
12
11
|
from requests import Response
|
13
12
|
from sretoolbox.utils import retry
|
@@ -49,14 +48,9 @@ class AtlassianAPI(Protocol):
|
|
49
48
|
def delete_component(self, id: str) -> None: ...
|
50
49
|
|
51
50
|
|
52
|
-
class
|
51
|
+
class AtlassianRESTAPI:
|
53
52
|
"""
|
54
|
-
This API class wraps the statuspageio
|
55
|
-
This class is named Legacy for a couple reasons:
|
56
|
-
* the underlying library is not maintained anymore
|
57
|
-
* the library has no type annotated
|
58
|
-
* the library does not support pagination which becomes important for this API
|
59
|
-
Therefore this lib will be replaced by a think wrapper based on uplink in an upcoming PR.
|
53
|
+
This API class wraps the statuspageio REST API for basic component operations.
|
60
54
|
"""
|
61
55
|
|
62
56
|
def __init__(self, page_id: str, api_url: str, token: str):
|
@@ -64,9 +58,6 @@ class LegacyLibAtlassianAPI:
|
|
64
58
|
self.api_url = api_url
|
65
59
|
self.token = token
|
66
60
|
self.auth_headers = {"Authorization": f"OAuth {self.token}"}
|
67
|
-
self._client = statuspageio.Client(
|
68
|
-
api_key=self.token, page_id=self.page_id, organization_id="unset"
|
69
|
-
)
|
70
61
|
|
71
62
|
@retry(max_attempts=10)
|
72
63
|
def _do_get(self, url: str, params: dict[str, Any]) -> Response:
|
@@ -96,14 +87,22 @@ class LegacyLibAtlassianAPI:
|
|
96
87
|
return all_components
|
97
88
|
|
98
89
|
def update_component(self, id: str, data: dict[str, Any]) -> None:
|
99
|
-
self.
|
90
|
+
url = f"{self.api_url}/v1/pages/{self.page_id}/components/{id}"
|
91
|
+
requests.patch(
|
92
|
+
url, json={"component": data}, headers=self.auth_headers
|
93
|
+
).raise_for_status()
|
100
94
|
|
101
95
|
def create_component(self, data: dict[str, Any]) -> str:
|
102
|
-
|
103
|
-
|
96
|
+
url = f"{self.api_url}/v1/pages/{self.page_id}/components"
|
97
|
+
response = requests.post(
|
98
|
+
url, json={"component": data}, headers=self.auth_headers
|
99
|
+
)
|
100
|
+
response.raise_for_status()
|
101
|
+
return response.json()["id"]
|
104
102
|
|
105
103
|
def delete_component(self, id: str) -> None:
|
106
|
-
self.
|
104
|
+
url = f"{self.api_url}/v1/pages/{self.page_id}/components/{id}"
|
105
|
+
requests.delete(url, headers=self.auth_headers).raise_for_status()
|
107
106
|
|
108
107
|
|
109
108
|
class AtlassianStatusPageProvider(StatusPageProvider):
|
@@ -364,7 +363,7 @@ def init_provider_for_page(
|
|
364
363
|
"""
|
365
364
|
return AtlassianStatusPageProvider(
|
366
365
|
page_name=page.name,
|
367
|
-
api=
|
366
|
+
api=AtlassianRESTAPI(
|
368
367
|
page_id=page.page_id,
|
369
368
|
api_url=page.api_url,
|
370
369
|
token=token,
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc794.dist-info → qontract_reconcile-0.10.1rc795.dist-info}/top_level.txt
RENAMED
File without changes
|