python-observabilityclient 0.2.0__py3-none-any.whl → 0.4.0__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.
- observabilityclient/prometheus_client.py +2 -11
- observabilityclient/v1/base.py +0 -11
- {python_observabilityclient-0.2.0.dist-info → python_observabilityclient-0.4.0.dist-info}/AUTHORS +1 -0
- {python_observabilityclient-0.2.0.dist-info → python_observabilityclient-0.4.0.dist-info}/METADATA +9 -19
- {python_observabilityclient-0.2.0.dist-info → python_observabilityclient-0.4.0.dist-info}/RECORD +10 -10
- {python_observabilityclient-0.2.0.dist-info → python_observabilityclient-0.4.0.dist-info}/WHEEL +1 -1
- {python_observabilityclient-0.2.0.dist-info → python_observabilityclient-0.4.0.dist-info}/entry_points.txt +0 -1
- python_observabilityclient-0.4.0.dist-info/pbr.json +1 -0
- python_observabilityclient-0.2.0.dist-info/pbr.json +0 -1
- {python_observabilityclient-0.2.0.dist-info → python_observabilityclient-0.4.0.dist-info}/LICENSE +0 -0
- {python_observabilityclient-0.2.0.dist-info → python_observabilityclient-0.4.0.dist-info}/top_level.txt +0 -0
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
import logging
|
|
16
16
|
|
|
17
17
|
import requests
|
|
18
|
-
import simplejson
|
|
19
18
|
|
|
20
19
|
|
|
21
20
|
LOG = logging.getLogger(__name__)
|
|
@@ -32,7 +31,7 @@ class PrometheusAPIClientError(Exception):
|
|
|
32
31
|
decoded = self.resp.json()
|
|
33
32
|
if 'error' in decoded:
|
|
34
33
|
return f'[{self.resp.status_code}] {decoded["error"]}'
|
|
35
|
-
except
|
|
34
|
+
except requests.JSONDecodeError:
|
|
36
35
|
# If an https endpoint is accessed as http,
|
|
37
36
|
# we get 400 status with plain text instead of
|
|
38
37
|
# json and decoding it raises exception.
|
|
@@ -43,15 +42,7 @@ class PrometheusAPIClientError(Exception):
|
|
|
43
42
|
return f'[{decoded.status}]'
|
|
44
43
|
|
|
45
44
|
def __repr__(self) -> str:
|
|
46
|
-
|
|
47
|
-
if self.resp.status_code != 204:
|
|
48
|
-
decoded = self.resp.json()
|
|
49
|
-
if 'error' in decoded:
|
|
50
|
-
return f'[{self.resp.status_code}] {decoded["error"]}'
|
|
51
|
-
return f'[{self.resp.status_code}] {self.resp.reason}'
|
|
52
|
-
else:
|
|
53
|
-
decoded = self.resp.json()
|
|
54
|
-
return f'[{decoded.status}]'
|
|
45
|
+
return self.__str__()
|
|
55
46
|
|
|
56
47
|
|
|
57
48
|
class PrometheusMetric(object):
|
observabilityclient/v1/base.py
CHANGED
|
@@ -23,17 +23,6 @@ class ObservabilityBaseCommand(command.Command):
|
|
|
23
23
|
|
|
24
24
|
def get_parser(self, prog_name):
|
|
25
25
|
parser = super().get_parser(prog_name)
|
|
26
|
-
parser.add_argument(
|
|
27
|
-
'--dev',
|
|
28
|
-
action='store_true',
|
|
29
|
-
help=_("Enable development output.")
|
|
30
|
-
)
|
|
31
|
-
parser.add_argument(
|
|
32
|
-
'--messy',
|
|
33
|
-
action='store_true',
|
|
34
|
-
help=_("Disable cleanup of temporary files.")
|
|
35
|
-
)
|
|
36
|
-
|
|
37
26
|
# TODO(jwysogla): Should this be restricted somehow?
|
|
38
27
|
parser.add_argument(
|
|
39
28
|
'--disable-rbac',
|
{python_observabilityclient-0.2.0.dist-info → python_observabilityclient-0.4.0.dist-info}/METADATA
RENAMED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-observabilityclient
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: OpenStack Observability Client
|
|
5
5
|
Home-page: https://infrawatch.github.io/documentation/
|
|
6
6
|
Author: OpenStack
|
|
7
7
|
Author-email: openstack-discuss@lists.openstack.org
|
|
8
8
|
License: Apache License, Version 2.0
|
|
9
|
-
Platform: UNKNOWN
|
|
10
9
|
Classifier: Environment :: Console
|
|
11
10
|
Classifier: Environment :: OpenStack
|
|
12
11
|
Classifier: Intended Audience :: Developers
|
|
@@ -18,25 +17,18 @@ Classifier: Programming Language :: Python
|
|
|
18
17
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
19
18
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
20
19
|
Classifier: Programming Language :: Python :: 3
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
22
20
|
Classifier: Programming Language :: Python :: 3.9
|
|
23
21
|
Classifier: Programming Language :: Python :: 3.10
|
|
24
22
|
Classifier: Programming Language :: Python :: 3.11
|
|
25
|
-
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Requires-Python: >=3.9
|
|
26
25
|
Description-Content-Type: text/markdown; charset=UTF-8
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Requires-Dist: osc-lib
|
|
30
|
-
|
|
31
|
-
Requires-Dist:
|
|
32
|
-
Requires-Dist:
|
|
33
|
-
Requires-Dist: oslo.db (<=12.3.1) ; extra == 'test'
|
|
34
|
-
Requires-Dist: oslotest (>=1.10.0) ; extra == 'test'
|
|
35
|
-
Requires-Dist: pifpaf[gnocchi] (>=0.23) ; extra == 'test'
|
|
36
|
-
Requires-Dist: reno (>=1.6.2) ; extra == 'test'
|
|
37
|
-
Requires-Dist: stestr (>=2.0.0) ; extra == 'test'
|
|
38
|
-
Requires-Dist: tempest (>=10) ; extra == 'test'
|
|
39
|
-
Requires-Dist: testtools (>=1.4.0) ; extra == 'test'
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
License-File: AUTHORS
|
|
28
|
+
Requires-Dist: osc-lib >=1.0.1
|
|
29
|
+
Requires-Dist: keystoneauth1 >=1.0.0
|
|
30
|
+
Requires-Dist: cliff >=1.14.0
|
|
31
|
+
Requires-Dist: PyYAML >5.1
|
|
40
32
|
|
|
41
33
|
# python-observabilityclient
|
|
42
34
|
|
|
@@ -90,5 +82,3 @@ c.query.query - queries prometheus and outputs the result
|
|
|
90
82
|
c.query.delete - deletes some metrics
|
|
91
83
|
c.query.snapshot - takes a snapshot of the current data
|
|
92
84
|
c.query.clean-tombstones - cleans the tsdb tombstones
|
|
93
|
-
|
|
94
|
-
|
{python_observabilityclient-0.2.0.dist-info → python_observabilityclient-0.4.0.dist-info}/RECORD
RENAMED
|
@@ -2,7 +2,7 @@ observabilityclient/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
|
2
2
|
observabilityclient/client.py,sha256=cfRb816p6Ips9t2cdWvmSJ1uGrtTEHXQnctoExrLA5A,828
|
|
3
3
|
observabilityclient/i18n.py,sha256=PFo6BaOfyGQD5q7L3FunYJ8d4mwbRszG8wOrJIjki_4,790
|
|
4
4
|
observabilityclient/plugin.py,sha256=hyxENjNO6NLrH6G4muyAeEEtFTBa9d5OozjwpzNpJVA,2262
|
|
5
|
-
observabilityclient/prometheus_client.py,sha256=
|
|
5
|
+
observabilityclient/prometheus_client.py,sha256=NcZAJRZzcuNFVJGdROwZBdwzpaV98_Ywcw29QBf7g18,7052
|
|
6
6
|
observabilityclient/tests/functional/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
observabilityclient/tests/functional/base.py,sha256=SXbPiksFH7aER-zZjIWxz5nwCqq5f1MYWth1tlFLwcs,6523
|
|
8
8
|
observabilityclient/tests/functional/test_cli.py,sha256=QqU8BCGUnh4IlwnGr6hdDHjHp7TIM0jasDjReyZpz-Y,4856
|
|
@@ -16,16 +16,16 @@ observabilityclient/tests/unit/test_utils.py,sha256=-sYsiYTuvcb71SX2KewrxkPinMEG
|
|
|
16
16
|
observabilityclient/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
observabilityclient/utils/metric_utils.py,sha256=K_G23krVIENNSPNsj2w9AkmCk2MDum9K3DkWNQl3Bro,3425
|
|
18
18
|
observabilityclient/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
-
observabilityclient/v1/base.py,sha256=
|
|
19
|
+
observabilityclient/v1/base.py,sha256=2AMQU8WKbERvfoiRdOPIlogzH1ds_Son4Gr7fjGdGQ4,2260
|
|
20
20
|
observabilityclient/v1/cli.py,sha256=ln7GsnbW95n90oFGw4zLiwHDjY0YHBxkRBzID-j6ZmA,4028
|
|
21
21
|
observabilityclient/v1/client.py,sha256=q5bH-N9uCWi9boVVYhLv6M7NYLxMnmgGBupg2uqvgRo,1643
|
|
22
22
|
observabilityclient/v1/python_api.py,sha256=nTsaasNBMVNrGW5CNSf7-o2oOKsea_u38GEbs2-8Gkw,3916
|
|
23
23
|
observabilityclient/v1/rbac.py,sha256=cnscaSzcbY7AEcLHcjpXBeHHZ12k5-hYmVwXsMTBSjQ,6115
|
|
24
|
-
python_observabilityclient-0.
|
|
25
|
-
python_observabilityclient-0.
|
|
26
|
-
python_observabilityclient-0.
|
|
27
|
-
python_observabilityclient-0.
|
|
28
|
-
python_observabilityclient-0.
|
|
29
|
-
python_observabilityclient-0.
|
|
30
|
-
python_observabilityclient-0.
|
|
31
|
-
python_observabilityclient-0.
|
|
24
|
+
python_observabilityclient-0.4.0.dist-info/AUTHORS,sha256=zWBYZ8rVSwsa_gRSTSrH1_WEtElkJl2LO7nWANcVao0,432
|
|
25
|
+
python_observabilityclient-0.4.0.dist-info/LICENSE,sha256=qyh9xnj_IPtYWzClm5mZxCWRKTr2eUP_iLcU28DIvCw,11343
|
|
26
|
+
python_observabilityclient-0.4.0.dist-info/METADATA,sha256=qqBvE_I-2DBK1SWhWWo01QBvXzbISkpmeVT304ANO5M,2998
|
|
27
|
+
python_observabilityclient-0.4.0.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
28
|
+
python_observabilityclient-0.4.0.dist-info/entry_points.txt,sha256=15rmai80pMRfBKZrk6yPNrRkAs2h63bwlcbQKq9fax4,424
|
|
29
|
+
python_observabilityclient-0.4.0.dist-info/pbr.json,sha256=pdbs7sVnVCndbMaEPpoTrrs2jQhgqgrBFuTvBUaC--o,46
|
|
30
|
+
python_observabilityclient-0.4.0.dist-info/top_level.txt,sha256=Lf7Fwm3hfK-X1JNRy19rVlrMUOyQShBBPwsCU3pz6yw,20
|
|
31
|
+
python_observabilityclient-0.4.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"git_version": "df6c253", "is_release": true}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"git_version": "0dea42c", "is_release": true}
|
{python_observabilityclient-0.2.0.dist-info → python_observabilityclient-0.4.0.dist-info}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|