python-observabilityclient 0.2.0__tar.gz → 0.4.0__tar.gz

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 (56) hide show
  1. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/.zuul.yaml +1 -1
  2. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/AUTHORS +1 -0
  3. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/ChangeLog +16 -0
  4. python_observabilityclient-0.4.0/PKG-INFO +83 -0
  5. python_observabilityclient-0.4.0/doc/requirements.txt +3 -0
  6. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/prometheus_client.py +2 -11
  7. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/v1/base.py +0 -11
  8. python_observabilityclient-0.4.0/python_observabilityclient.egg-info/PKG-INFO +83 -0
  9. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/python_observabilityclient.egg-info/SOURCES.txt +6 -0
  10. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/python_observabilityclient.egg-info/entry_points.txt +0 -1
  11. python_observabilityclient-0.4.0/python_observabilityclient.egg-info/pbr.json +1 -0
  12. python_observabilityclient-0.4.0/python_observabilityclient.egg-info/requires.txt +4 -0
  13. python_observabilityclient-0.4.0/releasenotes/notes/remove-py38-acd461c4350f0dca.yaml +5 -0
  14. python_observabilityclient-0.4.0/releasenotes/source/_static/.placeholder +0 -0
  15. python_observabilityclient-0.4.0/releasenotes/source/conf.py +256 -0
  16. python_observabilityclient-0.4.0/releasenotes/source/index.rst +16 -0
  17. python_observabilityclient-0.4.0/releasenotes/source/unreleased.rst +5 -0
  18. python_observabilityclient-0.4.0/requirements.txt +4 -0
  19. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/setup.cfg +2 -19
  20. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/test-requirements.txt +3 -0
  21. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/tox.ini +24 -16
  22. python-observabilityclient-0.2.0/PKG-INFO +0 -80
  23. python-observabilityclient-0.2.0/python_observabilityclient.egg-info/PKG-INFO +0 -80
  24. python-observabilityclient-0.2.0/python_observabilityclient.egg-info/pbr.json +0 -1
  25. python-observabilityclient-0.2.0/python_observabilityclient.egg-info/requires.txt +0 -14
  26. python-observabilityclient-0.2.0/requirements.txt +0 -3
  27. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/LICENSE +0 -0
  28. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/README.md +0 -0
  29. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/__init__.py +0 -0
  30. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/client.py +0 -0
  31. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/i18n.py +0 -0
  32. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/plugin.py +0 -0
  33. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/tests/functional/__init__.py +0 -0
  34. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/tests/functional/base.py +0 -0
  35. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/tests/functional/test_cli.py +0 -0
  36. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/tests/functional/test_python_api.py +0 -0
  37. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/tests/unit/__init__.py +0 -0
  38. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/tests/unit/test_cli.py +0 -0
  39. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/tests/unit/test_prometheus_client.py +0 -0
  40. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/tests/unit/test_python_api.py +0 -0
  41. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/tests/unit/test_rbac.py +0 -0
  42. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/tests/unit/test_utils.py +0 -0
  43. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/utils/__init__.py +0 -0
  44. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/utils/metric_utils.py +0 -0
  45. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/v1/__init__.py +0 -0
  46. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/v1/cli.py +0 -0
  47. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/v1/client.py +0 -0
  48. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/v1/python_api.py +0 -0
  49. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/observabilityclient/v1/rbac.py +0 -0
  50. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/pyproject.toml +0 -0
  51. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/python_observabilityclient.egg-info/dependency_links.txt +0 -0
  52. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/python_observabilityclient.egg-info/not-zip-safe +0 -0
  53. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/python_observabilityclient.egg-info/top_level.txt +0 -0
  54. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/setup.py +0 -0
  55. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/tools/fix_ca_bundle.sh +0 -0
  56. {python-observabilityclient-0.2.0 → python_observabilityclient-0.4.0}/tools/install_deps.sh +0 -0
@@ -24,7 +24,7 @@
24
24
  templates:
25
25
  - openstack-python3-jobs
26
26
  - check-requirements
27
- #- release-notes-jobs-python3
27
+ - release-notes-jobs-python3
28
28
  check:
29
29
  jobs:
30
30
  - telemetry-dsvm-integration:
@@ -1,3 +1,4 @@
1
+ Alfredo Moralejo <amoralej@redhat.com>
1
2
  Chris Sibbitt <csibbitt@redhat.com>
2
3
  Erno Kuvaja <jokke@usr.fi>
3
4
  Ghanshyam Mann <gmann@ghanshyammann.com>
@@ -1,13 +1,29 @@
1
1
  CHANGES
2
2
  =======
3
3
 
4
+ 0.4.0
5
+ -----
6
+
7
+ * Fix release note build
8
+ * Remove Python 3.8 support
9
+ * Use requirements.txt solely to manage dependencies
10
+ * Add stestr as test requirement
11
+
12
+ 0.3.0
13
+ -----
14
+
15
+ * Drop direct usage of simplejson
16
+ * Use stestr for testing
17
+
4
18
  0.2.0
5
19
  -----
6
20
 
7
21
  * Sort column order in cli output
8
22
  * Fix table formatter
23
+ * Remove unused test dependencies
9
24
  * Remove AUTHORS file
10
25
  * Add TLS support
26
+ * Drop unused --dev and --messy
11
27
 
12
28
  0.1.1
13
29
  -----
@@ -0,0 +1,83 @@
1
+ Metadata-Version: 2.1
2
+ Name: python-observabilityclient
3
+ Version: 0.4.0
4
+ Summary: OpenStack Observability Client
5
+ Home-page: https://infrawatch.github.io/documentation/
6
+ Author: OpenStack
7
+ Author-email: openstack-discuss@lists.openstack.org
8
+ License: Apache License, Version 2.0
9
+ Classifier: Environment :: Console
10
+ Classifier: Environment :: OpenStack
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: Information Technology
13
+ Classifier: Intended Audience :: System Administrators
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python
17
+ Classifier: Programming Language :: Python :: Implementation :: CPython
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Requires-Python: >=3.9
25
+ Description-Content-Type: text/markdown; charset=UTF-8
26
+ License-File: LICENSE
27
+ Requires-Dist: osc-lib>=1.0.1
28
+ Requires-Dist: keystoneauth1>=1.0.0
29
+ Requires-Dist: cliff>=1.14.0
30
+ Requires-Dist: PyYAML>5.1
31
+
32
+ # python-observabilityclient
33
+
34
+ observabilityclient is an OpenStackClient (OSC) plugin implementation that
35
+ implements commands for management of Prometheus.
36
+
37
+ ## Development
38
+
39
+ Install your OpenStack environment and patch your `openstack` client application using python.
40
+
41
+ ```
42
+ # if using standalone, the following commands come after 'sudo dnf install -y python3-tripleoclient'
43
+
44
+ su - stack
45
+
46
+ # clone and install observability client plugin
47
+ git clone https://github.com/infrawatch/python-observabilityclient
48
+ cd python-observabilityclient
49
+ sudo python setup.py install --prefix=/usr
50
+ ```
51
+
52
+ ## Usage
53
+
54
+ Use `openstack metric query somequery` to query for metrics in prometheus.
55
+
56
+ To use the python api do the following:
57
+ ```
58
+ from observabilityclient import client
59
+
60
+ c = client.Client(
61
+ '1', keystone_client.get_session(conf),
62
+ adapter_options={
63
+ 'interface': conf.service_credentials.interface,
64
+ 'region_name': conf.service_credentials.region_name})
65
+ c.query.query("somequery")
66
+ ```
67
+
68
+ ## List of commands
69
+
70
+ openstack metric list - lists all metrics
71
+ openstack metric show - shows current values of a metric
72
+ openstack metric query - queries prometheus and outputs the result
73
+ openstack metric delete - deletes some metrics
74
+ openstack metric snapshot - takes a snapshot of the current data
75
+ openstack metric clean-tombstones - cleans the tsdb tombstones
76
+
77
+ ## List of functions provided by the python library
78
+ c.query.list - lists all metrics
79
+ c.query.show - shows current values of a metric
80
+ c.query.query - queries prometheus and outputs the result
81
+ c.query.delete - deletes some metrics
82
+ c.query.snapshot - takes a snapshot of the current data
83
+ c.query.clean-tombstones - cleans the tsdb tombstones
@@ -0,0 +1,3 @@
1
+ sphinx>=2.1.1 # BSD
2
+ openstackdocstheme>=2.2.1 # Apache-2.0
3
+ reno>=1.6.2 # Apache-2.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 simplejson.errors.JSONDecodeError:
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
- if self.resp.status_code != requests.codes.ok:
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):
@@ -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',
@@ -0,0 +1,83 @@
1
+ Metadata-Version: 2.1
2
+ Name: python-observabilityclient
3
+ Version: 0.4.0
4
+ Summary: OpenStack Observability Client
5
+ Home-page: https://infrawatch.github.io/documentation/
6
+ Author: OpenStack
7
+ Author-email: openstack-discuss@lists.openstack.org
8
+ License: Apache License, Version 2.0
9
+ Classifier: Environment :: Console
10
+ Classifier: Environment :: OpenStack
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: Information Technology
13
+ Classifier: Intended Audience :: System Administrators
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python
17
+ Classifier: Programming Language :: Python :: Implementation :: CPython
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Requires-Python: >=3.9
25
+ Description-Content-Type: text/markdown; charset=UTF-8
26
+ License-File: LICENSE
27
+ Requires-Dist: osc-lib>=1.0.1
28
+ Requires-Dist: keystoneauth1>=1.0.0
29
+ Requires-Dist: cliff>=1.14.0
30
+ Requires-Dist: PyYAML>5.1
31
+
32
+ # python-observabilityclient
33
+
34
+ observabilityclient is an OpenStackClient (OSC) plugin implementation that
35
+ implements commands for management of Prometheus.
36
+
37
+ ## Development
38
+
39
+ Install your OpenStack environment and patch your `openstack` client application using python.
40
+
41
+ ```
42
+ # if using standalone, the following commands come after 'sudo dnf install -y python3-tripleoclient'
43
+
44
+ su - stack
45
+
46
+ # clone and install observability client plugin
47
+ git clone https://github.com/infrawatch/python-observabilityclient
48
+ cd python-observabilityclient
49
+ sudo python setup.py install --prefix=/usr
50
+ ```
51
+
52
+ ## Usage
53
+
54
+ Use `openstack metric query somequery` to query for metrics in prometheus.
55
+
56
+ To use the python api do the following:
57
+ ```
58
+ from observabilityclient import client
59
+
60
+ c = client.Client(
61
+ '1', keystone_client.get_session(conf),
62
+ adapter_options={
63
+ 'interface': conf.service_credentials.interface,
64
+ 'region_name': conf.service_credentials.region_name})
65
+ c.query.query("somequery")
66
+ ```
67
+
68
+ ## List of commands
69
+
70
+ openstack metric list - lists all metrics
71
+ openstack metric show - shows current values of a metric
72
+ openstack metric query - queries prometheus and outputs the result
73
+ openstack metric delete - deletes some metrics
74
+ openstack metric snapshot - takes a snapshot of the current data
75
+ openstack metric clean-tombstones - cleans the tsdb tombstones
76
+
77
+ ## List of functions provided by the python library
78
+ c.query.list - lists all metrics
79
+ c.query.show - shows current values of a metric
80
+ c.query.query - queries prometheus and outputs the result
81
+ c.query.delete - deletes some metrics
82
+ c.query.snapshot - takes a snapshot of the current data
83
+ c.query.clean-tombstones - cleans the tsdb tombstones
@@ -9,6 +9,7 @@ setup.cfg
9
9
  setup.py
10
10
  test-requirements.txt
11
11
  tox.ini
12
+ doc/requirements.txt
12
13
  observabilityclient/__init__.py
13
14
  observabilityclient/client.py
14
15
  observabilityclient/i18n.py
@@ -40,5 +41,10 @@ python_observabilityclient.egg-info/not-zip-safe
40
41
  python_observabilityclient.egg-info/pbr.json
41
42
  python_observabilityclient.egg-info/requires.txt
42
43
  python_observabilityclient.egg-info/top_level.txt
44
+ releasenotes/notes/remove-py38-acd461c4350f0dca.yaml
45
+ releasenotes/source/conf.py
46
+ releasenotes/source/index.rst
47
+ releasenotes/source/unreleased.rst
48
+ releasenotes/source/_static/.placeholder
43
49
  tools/fix_ca_bundle.sh
44
50
  tools/install_deps.sh
@@ -8,4 +8,3 @@ metric_list = observabilityclient.v1.cli:List
8
8
  metric_query = observabilityclient.v1.cli:Query
9
9
  metric_show = observabilityclient.v1.cli:Show
10
10
  metric_snapshot = observabilityclient.v1.cli:Snapshot
11
-
@@ -0,0 +1 @@
1
+ {"git_version": "df6c253", "is_release": true}
@@ -0,0 +1,4 @@
1
+ osc-lib>=1.0.1
2
+ keystoneauth1>=1.0.0
3
+ cliff>=1.14.0
4
+ PyYAML>5.1
@@ -0,0 +1,5 @@
1
+ ---
2
+ upgrade:
3
+ - |
4
+ Support for Python 3.8 has been removed. Now the minimum python version
5
+ supported is 3.9 .
@@ -0,0 +1,256 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License");
2
+ # you may not use this file except in compliance with the License.
3
+ # You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
10
+ # implied.
11
+ # See the License for the specific language governing permissions and
12
+ # limitations under the License.
13
+ #
14
+ # This file is execfile()d with the current directory set to its
15
+ # containing dir.
16
+ #
17
+ # Note that not all possible configuration values are present in this
18
+ # autogenerated file.
19
+ #
20
+ # All configuration values have a default; values that are commented out
21
+ # serve to show the default.
22
+
23
+ # If extensions (or modules to document with autodoc) are in another directory,
24
+ # add these directories to sys.path here. If the directory is relative to the
25
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
26
+ # sys.path.insert(0, os.path.abspath('.'))
27
+
28
+ # -- General configuration ------------------------------------------------
29
+
30
+ # If your documentation needs a minimal Sphinx version, state it here.
31
+ # needs_sphinx = '1.0'
32
+
33
+ # Add any Sphinx extension module names here, as strings. They can be
34
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
35
+ # ones.
36
+ extensions = [
37
+ 'openstackdocstheme',
38
+ 'reno.sphinxext',
39
+ ]
40
+
41
+ # Add any paths that contain templates here, relative to this directory.
42
+ templates_path = ['_templates']
43
+
44
+ # The suffix of source filenames.
45
+ source_suffix = '.rst'
46
+
47
+ # The encoding of source files.
48
+ # source_encoding = 'utf-8-sig'
49
+
50
+ # The master toctree document.
51
+ master_doc = 'index'
52
+
53
+ # openstackdocstheme options
54
+ openstackdocs_repo_name = 'openstack/python-observability'
55
+ openstackdocs_bug_project = 'python-observability'
56
+ openstackdocs_bug_tag = ''
57
+ copyright = '2022-present, Telemetry developers'
58
+
59
+ # Release notes are version independent.
60
+ # The short X.Y version.
61
+ version = ''
62
+ # The full version, including alpha/beta/rc tags.
63
+ release = ''
64
+
65
+ # The language for content autogenerated by Sphinx. Refer to documentation
66
+ # for a list of supported languages.
67
+ # language = None
68
+
69
+ # There are two options for replacing |today|: either, you set today to some
70
+ # non-false value, then it is used:
71
+ # today = ''
72
+ # Else, today_fmt is used as the format for a strftime call.
73
+ # today_fmt = '%B %d, %Y'
74
+
75
+ # List of patterns, relative to source directory, that match files and
76
+ # directories to ignore when looking for source files.
77
+ exclude_patterns = []
78
+
79
+ # The reST default role (used for this markup: `text`) to use for all
80
+ # documents.
81
+ # default_role = None
82
+
83
+ # If true, '()' will be appended to :func: etc. cross-reference text.
84
+ # add_function_parentheses = True
85
+
86
+ # If true, the current module name will be prepended to all description
87
+ # unit titles (such as .. function::).
88
+ # add_module_names = True
89
+
90
+ # If true, sectionauthor and moduleauthor directives will be shown in the
91
+ # output. They are ignored by default.
92
+ # show_authors = False
93
+
94
+ # The name of the Pygments (syntax highlighting) style to use.
95
+ pygments_style = 'native'
96
+
97
+ # A list of ignored prefixes for module index sorting.
98
+ # modindex_common_prefix = []
99
+
100
+ # If true, keep warnings as "system message" paragraphs in the built documents.
101
+ # keep_warnings = False
102
+
103
+
104
+ # -- Options for HTML output ----------------------------------------------
105
+
106
+ # The theme to use for HTML and HTML Help pages. See the documentation for
107
+ # a list of builtin themes.
108
+ html_theme = 'openstackdocs'
109
+
110
+ # Theme options are theme-specific and customize the look and feel of a theme
111
+ # further. For a list of options available for each theme, see the
112
+ # documentation.
113
+ # html_theme_options = {}
114
+
115
+ # Add any paths that contain custom themes here, relative to this directory.
116
+ # html_theme_path = []
117
+
118
+ # The name for this set of Sphinx documents. If None, it defaults to
119
+ # "<project> v<release> documentation".
120
+ # html_title = None
121
+
122
+ # A shorter title for the navigation bar. Default is the same as html_title.
123
+ # html_short_title = None
124
+
125
+ # The name of an image file (relative to this directory) to place at the top
126
+ # of the sidebar.
127
+ # html_logo = None
128
+
129
+ # The name of an image file (within the static path) to use as favicon of the
130
+ # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
131
+ # pixels large.
132
+ # html_favicon = None
133
+
134
+ # Add any paths that contain custom static files (such as style sheets) here,
135
+ # relative to this directory. They are copied after the builtin static files,
136
+ # so a file named "default.css" will overwrite the builtin "default.css".
137
+ html_static_path = ['_static']
138
+
139
+ # Add any extra paths that contain custom files (such as robots.txt or
140
+ # .htaccess) here, relative to this directory. These files are copied
141
+ # directly to the root of the documentation.
142
+ # html_extra_path = []
143
+
144
+ # If true, SmartyPants will be used to convert quotes and dashes to
145
+ # typographically correct entities.
146
+ # html_use_smartypants = True
147
+
148
+ # Custom sidebar templates, maps document names to template names.
149
+ # html_sidebars = {}
150
+
151
+ # Additional templates that should be rendered to pages, maps page names to
152
+ # template names.
153
+ # html_additional_pages = {}
154
+
155
+ # If false, no module index is generated.
156
+ # html_domain_indices = True
157
+
158
+ # If false, no index is generated.
159
+ # html_use_index = True
160
+
161
+ # If true, the index is split into individual pages for each letter.
162
+ # html_split_index = False
163
+
164
+ # If true, links to the reST sources are added to the pages.
165
+ # html_show_sourcelink = True
166
+
167
+ # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
168
+ # html_show_sphinx = True
169
+
170
+ # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
171
+ # html_show_copyright = True
172
+
173
+ # If true, an OpenSearch description file will be output, and all pages will
174
+ # contain a <link> tag referring to it. The value of this option must be the
175
+ # base URL from which the finished HTML is served.
176
+ # html_use_opensearch = ''
177
+
178
+ # This is the file name suffix for HTML files (e.g. ".xhtml").
179
+ # html_file_suffix = None
180
+
181
+ # Output file base name for HTML help builder.
182
+ htmlhelp_basename = 'observabilityReleaseNotestdoc'
183
+
184
+
185
+ # -- Options for LaTeX output ---------------------------------------------
186
+
187
+ # Grouping the document tree into LaTeX files. List of tuples
188
+ # (source start file, target name, title,
189
+ # author, documentclass [howto, manual, or own class]).
190
+ latex_documents = [
191
+ ('index', 'Pythonobservability.tex',
192
+ 'Observability Client Release Notes Documentation',
193
+ 'Telemetry developers', 'manual'),
194
+ ]
195
+
196
+ # The name of an image file (relative to this directory) to place at the top of
197
+ # the title page.
198
+ # latex_logo = None
199
+
200
+ # For "manual" documents, if this is true, then toplevel headings are parts,
201
+ # not chapters.
202
+ # latex_use_parts = False
203
+
204
+ # If true, show page references after internal links.
205
+ # latex_show_pagerefs = False
206
+
207
+ # If true, show URL addresses after external links.
208
+ # latex_show_urls = False
209
+
210
+ # Documents to append as an appendix to all manuals.
211
+ # latex_appendices = []
212
+
213
+ # If false, no module index is generated.
214
+ # latex_domain_indices = True
215
+
216
+
217
+ # -- Options for manual page output ---------------------------------------
218
+
219
+ # One entry per manual page. List of tuples
220
+ # (source start file, name, description, authors, manual section).
221
+ man_pages = [
222
+ ('index', 'pythonobservability',
223
+ 'Observability Client Release Notes Documentation',
224
+ ['Telemetry developers'], 1)
225
+ ]
226
+
227
+ # If true, show URL addresses after external links.
228
+ # man_show_urls = False
229
+
230
+
231
+ # -- Options for Texinfo output -------------------------------------------
232
+
233
+ # Grouping the document tree into Texinfo files. List of tuples
234
+ # (source start file, target name, title, author,
235
+ # dir menu entry, description, category)
236
+ texinfo_documents = [
237
+ ('index', 'Pythonobservability',
238
+ 'Observability Client Release Notes Documentation',
239
+ 'Telemetry developers', 'Pythonobservability',
240
+ 'One line description of project.', 'Miscellaneous'),
241
+ ]
242
+
243
+ # Documents to append as an appendix to all manuals.
244
+ # texinfo_appendices = []
245
+
246
+ # If false, no module index is generated.
247
+ # texinfo_domain_indices = True
248
+
249
+ # How to display URL addresses: 'footnote', 'no', or 'inline'.
250
+ # texinfo_show_urls = 'footnote'
251
+
252
+ # If true, do not generate a @detailmenu in the "Top" node's menu.
253
+ # texinfo_no_detailmenu = False
254
+
255
+ # -- Options for Internationalization output ------------------------------
256
+ locale_dirs = ['locale/']
@@ -0,0 +1,16 @@
1
+ Welcome to Observability Client Release Notes documentation!
2
+ ============================================================
3
+
4
+ Contents
5
+ ========
6
+
7
+ .. toctree::
8
+ :maxdepth: 2
9
+
10
+ unreleased
11
+
12
+ Indices and tables
13
+ ==================
14
+
15
+ * :ref:`genindex`
16
+ * :ref:`search`
@@ -0,0 +1,5 @@
1
+ ============================
2
+ Current Series Release Notes
3
+ ============================
4
+
5
+ .. release-notes::
@@ -0,0 +1,4 @@
1
+ osc-lib>=1.0.1 # Apache-2.0
2
+ keystoneauth1>=1.0.0 # Apache-2.0
3
+ cliff>=1.14.0 # Apache-2.0
4
+ PyYAML>5.1 # Apache-2.0
@@ -7,12 +7,7 @@ license = Apache License, Version 2.0
7
7
  author = OpenStack
8
8
  author_email = openstack-discuss@lists.openstack.org
9
9
  home_page = https://infrawatch.github.io/documentation/
10
- python_requires = >=3.8
11
- install_requires =
12
- keystoneauth1
13
- osc-lib
14
- requests
15
- PyYaml
10
+ python_requires = >=3.9
16
11
  classifier =
17
12
  Environment :: Console
18
13
  Environment :: OpenStack
@@ -25,27 +20,15 @@ classifier =
25
20
  Programming Language :: Python :: Implementation :: CPython
26
21
  Programming Language :: Python :: 3 :: Only
27
22
  Programming Language :: Python :: 3
28
- Programming Language :: Python :: 3.8
29
23
  Programming Language :: Python :: 3.9
30
24
  Programming Language :: Python :: 3.10
31
25
  Programming Language :: Python :: 3.11
26
+ Programming Language :: Python :: 3.12
32
27
 
33
28
  [files]
34
29
  packages =
35
30
  observabilityclient
36
31
 
37
- [options.extras_require]
38
- test =
39
- coverage>=3.6
40
- oslotest>=1.10.0 # Apache-2.0
41
- reno>=1.6.2 # Apache2
42
- tempest>=10
43
- stestr>=2.0.0 # Apache-2.0
44
- testtools>=1.4.0
45
- pifpaf[gnocchi]>=0.23
46
- SQLAlchemy<=1.4.41
47
- oslo.db<=12.3.1
48
-
49
32
  [entry_points]
50
33
  openstack.cli.extension =
51
34
  observabilityclient = observabilityclient.plugin
@@ -1,2 +1,5 @@
1
1
  python-openstackclient>=6.3.0 # Apache-2.0
2
2
  os-client-config>=1.28.0 # Apache-2.0
3
+ stestr>=2.0.0 # Apache-2.0
4
+ tempest>=10 # Apache-2.0
5
+ testtools>=1.4.0 # MIT
@@ -13,10 +13,12 @@ setenv =
13
13
  passenv =
14
14
  PROMETHEUS_*
15
15
  OBSERVABILITY_*
16
- deps = .[test]
17
- pytest
16
+ deps =
17
+ -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
18
+ -r{toxinidir}/requirements.txt
19
+ -r{toxinidir}/test-requirements.txt
18
20
 
19
- commands = pytest {posargs} {env:OS_TEST_PATH}
21
+ commands = stestr run --slowest {posargs} --test-path {env:OS_TEST_PATH}
20
22
 
21
23
  [testenv:pep8]
22
24
  basepython = python3
@@ -24,28 +26,26 @@ deps = hacking<3.1.0,>=3.0
24
26
  commands = flake8
25
27
 
26
28
  [testenv:venv]
27
- deps = .[test,doc]
28
29
  commands = {posargs}
29
30
 
30
31
  [testenv:cover]
31
- deps = {[testenv]deps}
32
- pytest-cov
32
+ deps =
33
+ {[testenv]deps}
34
+ pytest-cov
33
35
  commands = observabilityclient {posargs} {env:$OS_TEST_PATH}
34
36
 
35
37
  [testenv:functional]
36
38
  setenv =
37
- OS_TEST_PATH = ./observabilityclient/tests/functional
38
- OS_TESTENV_NAME = {envname}
39
+ OS_TEST_PATH = ./observabilityclient/tests/functional
40
+ OS_TESTENV_NAME = {envname}
39
41
  allowlist_externals =
40
- bash
41
- deps = .[test]
42
- pytest
43
- -r{toxinidir}/requirements.txt
44
- -r{toxinidir}/test-requirements.txt
42
+ bash
43
+ deps =
44
+ {[testenv]deps}
45
+ pytest
45
46
  commands =
46
- bash tools/fix_ca_bundle.sh
47
- pytest {posargs} {env:OS_TEST_PATH}
48
-
47
+ bash tools/fix_ca_bundle.sh
48
+ stestr run --slowest {posargs} --test-path {env:OS_TEST_PATH}
49
49
 
50
50
  [flake8]
51
51
  show-source = True
@@ -82,3 +82,11 @@ application-import-names = observabilityclient
82
82
  [pytest]
83
83
  addopts = --verbose
84
84
  norecursedirs = .tox
85
+
86
+ [testenv:releasenotes]
87
+ deps =
88
+ -r{toxinidir}/doc/requirements.txt
89
+ -r{toxinidir}/requirements.txt
90
+ allowlist_externals =
91
+ sphinx-build
92
+ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
@@ -1,80 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: python-observabilityclient
3
- Version: 0.2.0
4
- Summary: OpenStack Observability Client
5
- Home-page: https://infrawatch.github.io/documentation/
6
- Author: OpenStack
7
- Author-email: openstack-discuss@lists.openstack.org
8
- License: Apache License, Version 2.0
9
- Description: # python-observabilityclient
10
-
11
- observabilityclient is an OpenStackClient (OSC) plugin implementation that
12
- implements commands for management of Prometheus.
13
-
14
- ## Development
15
-
16
- Install your OpenStack environment and patch your `openstack` client application using python.
17
-
18
- ```
19
- # if using standalone, the following commands come after 'sudo dnf install -y python3-tripleoclient'
20
-
21
- su - stack
22
-
23
- # clone and install observability client plugin
24
- git clone https://github.com/infrawatch/python-observabilityclient
25
- cd python-observabilityclient
26
- sudo python setup.py install --prefix=/usr
27
- ```
28
-
29
- ## Usage
30
-
31
- Use `openstack metric query somequery` to query for metrics in prometheus.
32
-
33
- To use the python api do the following:
34
- ```
35
- from observabilityclient import client
36
-
37
- c = client.Client(
38
- '1', keystone_client.get_session(conf),
39
- adapter_options={
40
- 'interface': conf.service_credentials.interface,
41
- 'region_name': conf.service_credentials.region_name})
42
- c.query.query("somequery")
43
- ```
44
-
45
- ## List of commands
46
-
47
- openstack metric list - lists all metrics
48
- openstack metric show - shows current values of a metric
49
- openstack metric query - queries prometheus and outputs the result
50
- openstack metric delete - deletes some metrics
51
- openstack metric snapshot - takes a snapshot of the current data
52
- openstack metric clean-tombstones - cleans the tsdb tombstones
53
-
54
- ## List of functions provided by the python library
55
- c.query.list - lists all metrics
56
- c.query.show - shows current values of a metric
57
- c.query.query - queries prometheus and outputs the result
58
- c.query.delete - deletes some metrics
59
- c.query.snapshot - takes a snapshot of the current data
60
- c.query.clean-tombstones - cleans the tsdb tombstones
61
-
62
- Platform: UNKNOWN
63
- Classifier: Environment :: Console
64
- Classifier: Environment :: OpenStack
65
- Classifier: Intended Audience :: Developers
66
- Classifier: Intended Audience :: Information Technology
67
- Classifier: Intended Audience :: System Administrators
68
- Classifier: License :: OSI Approved :: Apache Software License
69
- Classifier: Operating System :: OS Independent
70
- Classifier: Programming Language :: Python
71
- Classifier: Programming Language :: Python :: Implementation :: CPython
72
- Classifier: Programming Language :: Python :: 3 :: Only
73
- Classifier: Programming Language :: Python :: 3
74
- Classifier: Programming Language :: Python :: 3.8
75
- Classifier: Programming Language :: Python :: 3.9
76
- Classifier: Programming Language :: Python :: 3.10
77
- Classifier: Programming Language :: Python :: 3.11
78
- Requires-Python: >=3.8
79
- Description-Content-Type: text/markdown; charset=UTF-8
80
- Provides-Extra: test
@@ -1,80 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: python-observabilityclient
3
- Version: 0.2.0
4
- Summary: OpenStack Observability Client
5
- Home-page: https://infrawatch.github.io/documentation/
6
- Author: OpenStack
7
- Author-email: openstack-discuss@lists.openstack.org
8
- License: Apache License, Version 2.0
9
- Description: # python-observabilityclient
10
-
11
- observabilityclient is an OpenStackClient (OSC) plugin implementation that
12
- implements commands for management of Prometheus.
13
-
14
- ## Development
15
-
16
- Install your OpenStack environment and patch your `openstack` client application using python.
17
-
18
- ```
19
- # if using standalone, the following commands come after 'sudo dnf install -y python3-tripleoclient'
20
-
21
- su - stack
22
-
23
- # clone and install observability client plugin
24
- git clone https://github.com/infrawatch/python-observabilityclient
25
- cd python-observabilityclient
26
- sudo python setup.py install --prefix=/usr
27
- ```
28
-
29
- ## Usage
30
-
31
- Use `openstack metric query somequery` to query for metrics in prometheus.
32
-
33
- To use the python api do the following:
34
- ```
35
- from observabilityclient import client
36
-
37
- c = client.Client(
38
- '1', keystone_client.get_session(conf),
39
- adapter_options={
40
- 'interface': conf.service_credentials.interface,
41
- 'region_name': conf.service_credentials.region_name})
42
- c.query.query("somequery")
43
- ```
44
-
45
- ## List of commands
46
-
47
- openstack metric list - lists all metrics
48
- openstack metric show - shows current values of a metric
49
- openstack metric query - queries prometheus and outputs the result
50
- openstack metric delete - deletes some metrics
51
- openstack metric snapshot - takes a snapshot of the current data
52
- openstack metric clean-tombstones - cleans the tsdb tombstones
53
-
54
- ## List of functions provided by the python library
55
- c.query.list - lists all metrics
56
- c.query.show - shows current values of a metric
57
- c.query.query - queries prometheus and outputs the result
58
- c.query.delete - deletes some metrics
59
- c.query.snapshot - takes a snapshot of the current data
60
- c.query.clean-tombstones - cleans the tsdb tombstones
61
-
62
- Platform: UNKNOWN
63
- Classifier: Environment :: Console
64
- Classifier: Environment :: OpenStack
65
- Classifier: Intended Audience :: Developers
66
- Classifier: Intended Audience :: Information Technology
67
- Classifier: Intended Audience :: System Administrators
68
- Classifier: License :: OSI Approved :: Apache Software License
69
- Classifier: Operating System :: OS Independent
70
- Classifier: Programming Language :: Python
71
- Classifier: Programming Language :: Python :: Implementation :: CPython
72
- Classifier: Programming Language :: Python :: 3 :: Only
73
- Classifier: Programming Language :: Python :: 3
74
- Classifier: Programming Language :: Python :: 3.8
75
- Classifier: Programming Language :: Python :: 3.9
76
- Classifier: Programming Language :: Python :: 3.10
77
- Classifier: Programming Language :: Python :: 3.11
78
- Requires-Python: >=3.8
79
- Description-Content-Type: text/markdown; charset=UTF-8
80
- Provides-Extra: test
@@ -1 +0,0 @@
1
- {"git_version": "0dea42c", "is_release": true}
@@ -1,14 +0,0 @@
1
- cliff>=1.14.0
2
- keystoneauth1>=1.0.0
3
- osc-lib>=1.0.1
4
-
5
- [test]
6
- SQLAlchemy<=1.4.41
7
- coverage>=3.6
8
- oslo.db<=12.3.1
9
- oslotest>=1.10.0
10
- pifpaf[gnocchi]>=0.23
11
- reno>=1.6.2
12
- stestr>=2.0.0
13
- tempest>=10
14
- testtools>=1.4.0
@@ -1,3 +0,0 @@
1
- osc-lib>=1.0.1 # Apache-2.0
2
- keystoneauth1>=1.0.0
3
- cliff>=1.14.0 # Apache-2.0