pypuppetdb 3.2.0__tar.gz → 4.0.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 (30) hide show
  1. pypuppetdb-4.0.0/PKG-INFO +83 -0
  2. {pypuppetdb-3.2.0 → pypuppetdb-4.0.0}/README.md +11 -0
  3. pypuppetdb-4.0.0/pyproject.toml +58 -0
  4. {pypuppetdb-3.2.0 → pypuppetdb-4.0.0}/pypuppetdb/QueryBuilder.py +3 -3
  5. {pypuppetdb-3.2.0 → pypuppetdb-4.0.0}/pypuppetdb/__init__.py +1 -0
  6. {pypuppetdb-3.2.0 → pypuppetdb-4.0.0}/pypuppetdb/api/query.py +2 -2
  7. pypuppetdb-3.2.0/CHANGELOG.md +0 -378
  8. pypuppetdb-3.2.0/MANIFEST.in +0 -5
  9. pypuppetdb-3.2.0/PKG-INFO +0 -451
  10. pypuppetdb-3.2.0/pypuppetdb.egg-info/PKG-INFO +0 -451
  11. pypuppetdb-3.2.0/pypuppetdb.egg-info/SOURCES.txt +0 -27
  12. pypuppetdb-3.2.0/pypuppetdb.egg-info/dependency_links.txt +0 -1
  13. pypuppetdb-3.2.0/pypuppetdb.egg-info/requires.txt +0 -1
  14. pypuppetdb-3.2.0/pypuppetdb.egg-info/top_level.txt +0 -1
  15. pypuppetdb-3.2.0/requirements-test.txt +0 -20
  16. pypuppetdb-3.2.0/requirements.txt +0 -1
  17. pypuppetdb-3.2.0/setup.cfg +0 -16
  18. pypuppetdb-3.2.0/setup.py +0 -76
  19. pypuppetdb-3.2.0/version +0 -1
  20. {pypuppetdb-3.2.0 → pypuppetdb-4.0.0}/LICENSE +0 -0
  21. {pypuppetdb-3.2.0 → pypuppetdb-4.0.0}/pypuppetdb/api/__init__.py +0 -0
  22. {pypuppetdb-3.2.0 → pypuppetdb-4.0.0}/pypuppetdb/api/base.py +0 -0
  23. {pypuppetdb-3.2.0 → pypuppetdb-4.0.0}/pypuppetdb/api/command.py +0 -0
  24. {pypuppetdb-3.2.0 → pypuppetdb-4.0.0}/pypuppetdb/api/metadata.py +0 -0
  25. {pypuppetdb-3.2.0 → pypuppetdb-4.0.0}/pypuppetdb/api/metrics.py +0 -0
  26. {pypuppetdb-3.2.0 → pypuppetdb-4.0.0}/pypuppetdb/api/pql.py +0 -0
  27. {pypuppetdb-3.2.0 → pypuppetdb-4.0.0}/pypuppetdb/api/status.py +0 -0
  28. {pypuppetdb-3.2.0 → pypuppetdb-4.0.0}/pypuppetdb/errors.py +0 -0
  29. {pypuppetdb-3.2.0 → pypuppetdb-4.0.0}/pypuppetdb/types.py +0 -0
  30. {pypuppetdb-3.2.0 → pypuppetdb-4.0.0}/pypuppetdb/utils.py +0 -0
@@ -0,0 +1,83 @@
1
+ Metadata-Version: 2.4
2
+ Name: pypuppetdb
3
+ Version: 4.0.0
4
+ Summary: Library for working with the PuppetDB REST API.
5
+ License: Apache-2.0
6
+ License-File: LICENSE
7
+ Keywords: puppet,puppetdb
8
+ Author: Vox Pupuli
9
+ Author-email: voxpupuli@groups.io
10
+ Requires-Python: >=3.12,<4.0
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Natural Language :: English
15
+ Classifier: Operating System :: POSIX
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Topic :: Software Development :: Libraries
21
+ Requires-Dist: requests (>=2.28.1,<3.0.0)
22
+ Project-URL: Repository, https://github.com/voxpupuli/pypuppetdb
23
+ Description-Content-Type: text/markdown
24
+
25
+ # pypuppetdb
26
+
27
+ [![PyPi Version](https://img.shields.io/pypi/v/pypuppetdb)](https://pypi.org/project/pypuppetdb/)
28
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pypuppetdb)](https://pypi.org/project/pypuppetdb/)
29
+ [![PyPi Downloads](https://img.shields.io/pypi/dm/pypuppetdb)](https://pypi.org/project/pypuppetdb/)
30
+ ![Tests Status](https://github.com/voxpupuli/pypuppetdb/workflows/tests%20(unit)/badge.svg)
31
+ [![codecov](https://codecov.io/gh/voxpupuli/pypuppetdb/branch/master/graph/badge.svg?token=mOOj805A15)](https://codecov.io/gh/voxpupuli/pypuppetdb)
32
+ [![Documentation Status](https://readthedocs.org/projects/pypuppetdb/badge/?version=latest)](https://pypuppetdb.readthedocs.io/en/latest/?badge=latest)
33
+ [![By Voxpupuli](https://img.shields.io/badge/by-Vox%20Pupuli%20%F0%9F%A6%8A-ef902f.svg)](https://voxpupuli.org)
34
+
35
+ This library is a thin wrapper around the REST API providing some
36
+ convenience functions and objects to request and hold data from
37
+ PuppetDB.
38
+
39
+ ## Requirements
40
+
41
+ * PuppetDB 5.2 or newer
42
+ * Python 3.7-3.11
43
+
44
+ (For support of the older PuppetDB or Python versions please check previous library version.)
45
+
46
+ ## Installation
47
+
48
+ You can install this package from PyPI with:
49
+
50
+ ```bash
51
+ pip install pypuppetdb
52
+ ```
53
+
54
+ ## Documentation
55
+
56
+ The [user guide, API reference and a developer guide is available on Read the Docs](https://pypuppetdb.readthedocs.io/en/latest/).
57
+
58
+ ## Getting Help
59
+
60
+ For bug reports you can file an
61
+ [issue](https://github.com/voxpupuli/pypuppetdb/issues). If you need
62
+ help with something feel free to pop by \#voxpupuli or the \#puppetboard on
63
+ [Freenode](https://freenode.net) or [Vox Pupuli on Slack](https://puppetcommunity.slack.com/messages/voxpupuli/).
64
+
65
+ ## Contributing
66
+
67
+ Please see the [contribution guide here](https://github.com/voxpupuli/pypuppetdb/blob/master/CONTRIBUTING.md).
68
+
69
+ ## License
70
+
71
+ This project is licensed under the [Apache v2.0 License](https://github.com/voxpupuli/pypuppetdb/blob/master/LICENSE).
72
+
73
+ ## Making a new release
74
+
75
+ * set a GitHub token as environment variable: `export CHANGELOG_GITHUB_TOKEN=github_pat_...`
76
+ * Install changelog generator dependencies: `bundle config set --local with release; bundle install; bundle update`
77
+ * Set a new version in `pyproject.toml`
78
+ * run `bundle exec rake changelog`
79
+ * Read the diff in CHANGELOG.md, maybe adjust the version and run the generator again, open a PR
80
+ * Get a review, merge it
81
+ * Create a matching tag for the new version, with a leading `v`, push the tag
82
+ * CI will publish to pypi and to Dockerhub
83
+
@@ -45,3 +45,14 @@ Please see the [contribution guide here](https://github.com/voxpupuli/pypuppetdb
45
45
  ## License
46
46
 
47
47
  This project is licensed under the [Apache v2.0 License](https://github.com/voxpupuli/pypuppetdb/blob/master/LICENSE).
48
+
49
+ ## Making a new release
50
+
51
+ * set a GitHub token as environment variable: `export CHANGELOG_GITHUB_TOKEN=github_pat_...`
52
+ * Install changelog generator dependencies: `bundle config set --local with release; bundle install; bundle update`
53
+ * Set a new version in `pyproject.toml`
54
+ * run `bundle exec rake changelog`
55
+ * Read the diff in CHANGELOG.md, maybe adjust the version and run the generator again, open a PR
56
+ * Get a review, merge it
57
+ * Create a matching tag for the new version, with a leading `v`, push the tag
58
+ * CI will publish to pypi and to Dockerhub
@@ -0,0 +1,58 @@
1
+ [tool.poetry]
2
+ name = "pypuppetdb"
3
+ version = "4.0.0"
4
+ description = "Library for working with the PuppetDB REST API."
5
+ authors = ["Vox Pupuli <voxpupuli@groups.io>"]
6
+ license = "Apache-2.0"
7
+ readme = "README.md"
8
+ repository = "https://github.com/voxpupuli/pypuppetdb"
9
+ keywords = ["puppet", "puppetdb"]
10
+ classifiers = [
11
+ "Development Status :: 5 - Production/Stable",
12
+ "Intended Audience :: Developers",
13
+ "Natural Language :: English",
14
+ "Operating System :: POSIX",
15
+ "Topic :: Software Development :: Libraries",
16
+ ]
17
+
18
+ [tool.poetry.dependencies]
19
+ python = "^3.12"
20
+ requests = "^2.28.1"
21
+
22
+
23
+ [tool.poetry.group.test.dependencies]
24
+ bandit = "^1.8.0"
25
+ coverage = "^7.6.9"
26
+ flake8 = "^7.1.1"
27
+ pytest = ">=8.3.4,<10.0.0"
28
+ pytest-cov = ">=6,<8"
29
+ pytest-flake8 = "^1.3.0"
30
+ pytest-mypy = ">=0.10.3,<1.2.0"
31
+ mypy = ">=1.13,<3.0"
32
+ cov-core = "^1.15.0"
33
+ httpretty = "^1.1.4"
34
+
35
+
36
+ [tool.poetry.group.docs.dependencies]
37
+ alabaster = "^0.7"
38
+ babel = "^2.16.0"
39
+ certifi = ">=2024.8.30,<2027.0.0"
40
+ requests = "^2.32.3"
41
+ sphinx = ">=7,<10"
42
+ sphinx-rtd-theme = "^3.0.2"
43
+ sphinxcontrib-applehelp = "^2.0.0"
44
+ sphinxcontrib-devhelp = "^2.0.0"
45
+ sphinxcontrib-htmlhelp = "^2.1.0"
46
+ sphinxcontrib-jsmath = ">=1.0.1,<3.0.0"
47
+ sphinxcontrib-qthelp = "^2.0.0"
48
+ sphinxcontrib-serializinghtml = "^2.0.0"
49
+ pytz = ">=2024.2,<2027.0"
50
+ pyparsing = "^3.2.0"
51
+ pygments = "^2.18.0"
52
+ idna = "^3.10"
53
+ docutils = "^0.21.2"
54
+ snowballstemmer = ">=2.2,<4.0"
55
+
56
+ [build-system]
57
+ requires = ["poetry-core"]
58
+ build-backend = "poetry.core.masonry.api"
@@ -71,10 +71,10 @@ class BooleanOperator:
71
71
  self.operations = []
72
72
 
73
73
  def add(self, query):
74
- if type(query) == list:
74
+ if isinstance(query, list):
75
75
  for i in query:
76
76
  self.add(i)
77
- elif type(query) == str:
77
+ elif isinstance(query, str):
78
78
  self.operations.append(json.loads(query))
79
79
  elif isinstance(query, (BinaryOperator, InOperator, BooleanOperator)):
80
80
  self.operations.append(query.json_data())
@@ -652,7 +652,7 @@ class NullOperator(BinaryOperator):
652
652
  """
653
653
 
654
654
  def __init__(self, field, value):
655
- if type(value) != bool:
655
+ if not isinstance(value, bool):
656
656
  raise APIError("NullOperator value must be boolean")
657
657
 
658
658
  super().__init__("null?", field, value)
@@ -53,6 +53,7 @@ Will return a generator object containing all file resources you're managing
53
53
  across your infrastructure. This is probably a bad idea if you have a big
54
54
  number of nodes as the response will be huge.
55
55
  """
56
+
56
57
  import logging
57
58
 
58
59
  from pypuppetdb.api import API
@@ -54,7 +54,7 @@ class QueryAPI(BaseAPI):
54
54
  # If we happen to only get one node back it
55
55
  # won't be inside a list so iterating over it
56
56
  # goes boom. Therefor we wrap a list around it.
57
- if type(nodes) == dict:
57
+ if isinstance(nodes, dict):
58
58
  nodes = [
59
59
  nodes,
60
60
  ]
@@ -239,7 +239,7 @@ class QueryAPI(BaseAPI):
239
239
 
240
240
  catalogs = self._query("catalogs", **kwargs)
241
241
 
242
- if type(catalogs) == dict:
242
+ if isinstance(catalogs, dict):
243
243
  catalogs = [
244
244
  catalogs,
245
245
  ]
@@ -1,378 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- ## [3.2.0](https://github.com/voxpupuli/pypuppetdb/tree/3.2.0) (2023-10-08)
6
-
7
- [Full Changelog](https://github.com/voxpupuli/pypuppetdb/compare/3.1.0...3.2.0)
8
-
9
- **Merged pull requests:**
10
-
11
- - CI: Run on PRs and merges [\#252](https://github.com/voxpupuli/pypuppetdb/pull/252) ([bastelfreak](https://github.com/bastelfreak))
12
- - purge not required empty newlines [\#242](https://github.com/voxpupuli/pypuppetdb/pull/242) ([bastelfreak](https://github.com/bastelfreak))
13
- - add dummy CI job we can depend on [\#241](https://github.com/voxpupuli/pypuppetdb/pull/241) ([bastelfreak](https://github.com/bastelfreak))
14
- - add dependabot config [\#240](https://github.com/voxpupuli/pypuppetdb/pull/240) ([bastelfreak](https://github.com/bastelfreak))
15
- - Update sphinx requirement from \<6.0,\>=4.3 to \>=4.3,\<8.0 [\#239](https://github.com/voxpupuli/pypuppetdb/pull/239) ([dependabot[bot]](https://github.com/apps/dependabot))
16
- - Update urllib3 requirement from \<2.0,\>=1.26 to \>=1.26,\<3.0 [\#238](https://github.com/voxpupuli/pypuppetdb/pull/238) ([dependabot[bot]](https://github.com/apps/dependabot))
17
- - Modernize the code [\#235](https://github.com/voxpupuli/pypuppetdb/pull/235) ([gdubicki](https://github.com/gdubicki))
18
-
19
- ## [3.1.0](https://github.com/voxpupuli/pypuppetdb/tree/3.1.0) (2022-10-27)
20
-
21
- - Confirm support for Python 3.11 (final).
22
-
23
- 3.0.0
24
- -----
25
- This is a maintenance release.
26
-
27
- The major version is bumped because of:
28
- - dropped support for PuppetDBs < 5.2.0 (Puppet 4 has reached its end-of-life in October 2018),
29
- - dropped support for Python 3.6 (end-of-life in December 2021),
30
- - the required [Requests](https://requests.readthedocs.io/en/latest/) version bumped to the current latest.
31
-
32
- 2.5.2
33
- -----
34
- - Remove harmful terminology, following [the Puppetlabs components name changes](https://puppet.com/blog/removing-harmful-terminology-from-our-products/) ([#216](https://github.com/voxpupuli/pypuppetdb/pull/216))
35
- - Use built-in unittest.mock instead of mock ([#228](https://github.com/voxpupuli/pypuppetdb/pull/228))
36
- - Build and test dependencies updates.
37
-
38
- Thanks to the following contributors of this release: [@pgajdos](https://github.com/pgajdos).
39
-
40
- 2.5.1
41
- -----
42
-
43
- - Fix TypeError exception thrown by `BaseAPI._query()` when using debug logging.
44
-
45
- Thanks to Ben Roberts for his contribution!
46
-
47
- 2.5.0
48
- -----
49
-
50
- - Python 3.10 added as a supported version
51
- ([#213](https://github.com/voxpupuli/pypuppetdb/pull/213))
52
-
53
- 2.4.0
54
- -----
55
-
56
- - Added PQL support with `pql()` method
57
- (PR [#201](https://github.com/voxpupuli/pypuppetdb/pull/201),
58
- fixes [#167](https://github.com/voxpupuli/pypuppetdb/issues/167))
59
- - Added ability to specify additional queries when using `Node.facts()`
60
- ([#127](https://github.com/voxpupuli/pypuppetdb/pull/127))
61
- - Improve the documentation (even more ;))
62
- (PR [#206](https://github.com/voxpupuli/pypuppetdb/issues/206),
63
- fixes [#143](https://github.com/voxpupuli/pypuppetdb/issues/143)
64
- and [#129](https://github.com/voxpupuli/pypuppetdb/issues/129))
65
- - Fixed creating `Edge` objects
66
- ([#202](https://github.com/voxpupuli/pypuppetdb/issues/202))
67
- - Python 3.9 added as a supported version
68
- ([#203](https://github.com/voxpupuli/pypuppetdb/pull/203))
69
-
70
- 2.3.0
71
- -----
72
-
73
- - Added support for `with` statement
74
- ([#185](https://github.com/voxpupuli/pypuppetdb/pull/185))
75
- - Added explicit `disconnect()` method
76
- ([#185](https://github.com/voxpupuli/pypuppetdb/pull/185))
77
- - Improved the documentation on [Read the Docs](https://pypuppetdb.readthedocs.io/en/latest/)
78
- and in the project's README
79
- ([#190](https://github.com/voxpupuli/pypuppetdb/pull/190))
80
-
81
- 2.2.0
82
- -----
83
-
84
- - Loosen requirements and drop six
85
-
86
- 2.1.0
87
- -----
88
-
89
- - Bugfix: Fixed <span class="title-ref">metric()</span> function to
90
- query the new v2 endpoint based on Jolokia
91
- (<https://jolokia.org/reference/html/protocol.html>)
92
- - Added a new parameter
93
- <span class="title-ref">metric\_api\_version</span> to the
94
- <span class="title-ref">BaseAPI()</span> constructor that allows
95
- changing the version of the <span class="title-ref">metric</span>
96
- API being queried. Valid values are
97
- <span class="title-ref">'v1'</span> for PuppetDB \<= 6.9.0,
98
- <span class="title-ref">'v2'</span> for PuppetDB \>= 6.9.1 or
99
- <span class="title-ref">None</span> which defaults to
100
- <span class="title-ref">'v2'</span>.
101
- - Added a mew parameter <span class="title-ref">version</span> to the
102
- <span class="title-ref">metric()</span> function that allows
103
- overriding the version of the metric API being queried for that
104
- individual call. If nothing is specified it will default to the
105
- <span class="title-ref">self.metric\_api\_version</span> of the
106
- class, else it expects a value of
107
- <span class="title-ref">'v1'</span> or
108
- <span class="title-ref">'v2'</span> same as the
109
- <span class="title-ref">metric\_api\_version</span> class parameter.
110
- - Added new <span class="title-ref">payload</span> parameter to
111
- <span class="title-ref">\_query()</span> to allow users to send
112
- arbitrary payloads with their queries (useful for debugging).
113
-
114
- 2.0.0
115
- -----
116
-
117
- - Dropping old python 2.7/3.5 and ensuring 3 latest versions are
118
- supported
119
- - Adding mypy + cleanup + further removal of python2 code
120
- - Bugfix: Httpretty is not used outside tests and breaks install on
121
- newer python versions for some systems
122
-
123
- 1.2.0
124
- -----
125
-
126
- - Add option to get nodes without using event-counts
127
- - define the project status as stable
128
- - bundle requirements-test.txt in python package
129
-
130
- 1.1.0
131
- -----
132
-
133
- - deduplicate dependencylist
134
- - QueryBuilder.py: Use native data structures for internal
135
- representation
136
- - Add support for the Command API, /pdb/cmd/v1. Added \_cmd alongside
137
- \_query to minimise changes to original code
138
-
139
- 1.0.0
140
- -----
141
-
142
- - Bump dependencies
143
- - QueryBuilder: Added support for FromOperator, arrays and
144
- FromOperator
145
- - New endpoint: status
146
- - POST query in request body
147
- - Simplify JSON encoding for POST
148
- - Upload and publish is built in to setuptools
149
-
150
- 0.3.3
151
- -----
152
-
153
- - Add support for authentication with tokens
154
- - Fix bug with parsing results from inventory endpoint
155
-
156
- 0.3.2
157
- -----
158
-
159
- - Fixed noop puppet runs reporting unchanged instead of noop.
160
- - Fixed unreported nodes shown as 'noop' in puppetdb \> 4.1.0.
161
- - Add Inventory API endpoint for PuppetDB 4.2.0.
162
- - Support for producer field on catalogs, facts and report types.
163
-
164
- 0.3.1
165
- -----
166
-
167
- - Fixed a datetime related bug in
168
- <span class="title-ref">pypuppetdb.api.nodes()</span> that caused
169
- all returned nodes to be an unreported status
170
-
171
- 0.3.0
172
- -----
173
-
174
- - New QueryBuilder module allows users to build PuppetDB queries in an
175
- Object-Oriented fashion.
176
- - Adding support for new fields provided in PuppetDB 4.1.0.
177
-
178
- 0.2.3
179
- -----
180
-
181
- - Removed deprecation of
182
- <span class="title-ref">pypuppetdb.types.Report.events()</span>.
183
- Expanded resource events data timestamps are not parseable.
184
- - Escaping additional path parameters passed to \_url() with
185
- urllib.quote
186
-
187
- 0.2.2
188
- -----
189
-
190
- - Fixed URL Encoding found when querying the specific value of a
191
- macaddress fact.
192
- - Adding support for PuppetDB 4.0.0 information. Namely Adding a
193
- catalog\_uuid attribute to the Catalog type object. Adding code\_id,
194
- catalog\_uuid and cached\_catalog\_status attributes to the Report
195
- type object.
196
- - Removing unneeded sudo option from .travis.yml, this gave
197
- unnecessary warning in the test environment.
198
- - Updating the files under docs/ so
199
- <https://pypuppetdb.readthedocs.org/en/latest/> can be updated
200
- - Deprecating
201
- <span class="title-ref">pypuppetdb.types.Report.events()</span> in
202
- favour of the new events list variable.
203
- - Renaming test-requirements.txt to requirements.txt
204
-
205
- 0.2.1
206
- -----
207
-
208
- - Adding a version comparison utility function using examples provided
209
- in
210
- <http://stackoverflow.com/questions/1714027/version-number-comparison>
211
- - Adding a new variable latest\_report\_hash to the Node object.
212
- Default None but is given a real value from the field of the same
213
- name in the Nodes endpoint available in PuppetDB 3.2 or higher.
214
- - Allowing support for 'GET' AND 'POST' requests in the api \_query()
215
- function. This will allow clients to send requests to the PuppetDB
216
- that are too long for a GEt request query string
217
- - Adding a node field, code\_id, to the Catalog object using the field
218
- of the same name from the Catalogs endpoint (currently unused as of
219
- PuppetDB 3.2.2)
220
- - Adding test cases for new features EXCEPT the GET and POST update.
221
-
222
- 0.2.0
223
- -----
224
-
225
- - Version bump to 0.2.0
226
- - Adding support for v4 of the Query API
227
- - Removing v2 and v3 api functions as per changelog
228
- - pypuppetdb will no longer support multiple API versions, removing
229
- the api\_version attribute from pypuppetdb.connect()
230
- - All clients must remove the api\_version attribute from the connect
231
- function, or the starting number, since it is no longer supported
232
- - Removing all NotImplemented errors in the function of BaseAPI and
233
- filled them with the real code
234
-
235
- **New Features**
236
-
237
- New endpoints:
238
-
239
- - `environments`: `environments()`
240
- - `factsets`: `factsets()`
241
- - `fact-paths`: `fact_paths()`
242
- - `fact-contents`: `fact_contents()`
243
- - `edges`: `edges()`
244
-
245
- Changes to Types:
246
-
247
- - `pypupperdb.types.Report` now requires `api` to be passed as the
248
- second argument, this allows to directly query for any events that
249
- occurred in this report object. This functionality was proposed and
250
- denied because of backward compatability reasons, since the previous
251
- versions are now removed this is no longer a problem.
252
- - All `pypupperdb.types.*` accept the v4 API information as optional
253
- parameters. These parameters are primarily environment related but
254
- may include additional information if provided from that endpoint.
255
- - Functions appearing inside `pypuppetdb.types` that run queries
256
- against the PuppetDB now accept and passing additional keyword
257
- arguments to the query.
258
- - All `pypuppetdb.BaseAPI` functions pass any received keyword
259
- arguments to the `pypuppetdb.api.__init__._query()` function. This
260
- allows for easy integration with paging functions and parameters.
261
-
262
- 0.1.1
263
- -----
264
-
265
- - Fix the license in our `setup.py`. The license shouldn't be longer
266
- than 200 characters. We were including the full license tripping up
267
- tools like bdist\_rpm.
268
-
269
- 0.1.0
270
- -----
271
-
272
- Significant changes have been made in this release. The complete v3 API
273
- is now supported except for query pagination.
274
-
275
- Most changes are backwards compatible except for a change in the SSL
276
- configuration. The previous behaviour was buggy and slightly misleading
277
- in the names the options took:
278
-
279
- - `ssl` has been renamed to `ssl_verify` and now defaults to `True`.
280
- - Automatically use HTTPS if `ssl_key` and `ssl_cert` are provided.
281
-
282
- For additional instructions about getting SSL to work see the Quickstart
283
- in the documentation.
284
-
285
- **Deprecation**
286
-
287
- Support for API v2 will be dropped in the 0.2.x release series.
288
-
289
- **New features**
290
-
291
- The following features are **only** supported for **API v3**.
292
-
293
- The `node()` and `nodes()` function have gained the following options:
294
-
295
- - `with_status=False`
296
- - `unreported=2`
297
-
298
- When `with_status` is set to `True` an additional query will be made
299
- using the `events-count` endpoint scoped to the latest report. This will
300
- result in an additional `events` and `status` keys on the node object.
301
- `status` will be either of `changed`, `unchanged` or `failed` depending
302
- on if `events` contains `successes` or `failures` or none.
303
-
304
- By default `unreported` is set to `2`. This is only in effect when
305
- `with_status` is set to `True`. It means that if a node hasn't checked
306
- in for two hours it will get a `status` of `unreported` instead.
307
-
308
- New endpoints:
309
-
310
- - `events-count`: `events_count()`
311
- - `aggregate-event-counts`: `aggregate_event_counts()`
312
- - `server-time`: `server_time()`
313
- - `version`: `current_version()`
314
- - `catalog`: `catalog()`
315
-
316
- New types:
317
-
318
- - `pypuppetdb.types.Catalog`
319
- - `pypuppetdb.types.Edge`
320
-
321
- Changes to types:
322
-
323
- - `pypuppetdb.types.Node` now has:
324
- - `status` defaulting to `None`
325
- - `events` defaulting to `None`
326
- - `unreported_time` defaulting to `None`
327
-
328
- 0.0.4
329
- -----
330
-
331
- Due to a fairly serious bug 0.0.3 was pulled from PyPi minutes after
332
- release.
333
-
334
- When a bug was fixed to be able to query for all facts we accidentally
335
- introduced a different bug that caused the `facts()` call on a node to
336
- query for all facts because we were resetting the query.
337
-
338
- - Fix a bug where `node.facts()` was causing us to query all facts
339
- because the query to scope our request was being reset.
340
-
341
- 0.0.3
342
- -----
343
-
344
- With the introduction of PuppetDB 1.5 a new API version, v3, was also
345
- introduced. In that same release the old `/experimental` endpoints were
346
- removed, meaning that as of PuppetDB 1.5 with the v2 API you can no
347
- longer get access to reports or events.
348
-
349
- In light of this the support for the experimental endpoints has been
350
- completely removed from pypuppetdb. As of this release you can only get
351
- to reports and/or events through v3 of the API.
352
-
353
- This release includes preliminary support for the v3 API. Everything
354
- that could be done with v2 plus the experimental endpoints is now
355
- possible on v3. However, more advanced funtionality has not yet been
356
- implemented. That will be the focus of the next release.
357
-
358
- - Removed dependency on pytz.
359
- - Fixed the behaviour of `facts()` and `resources()`. We can now
360
- correctly query for all facts or resources.
361
- - Fixed an issue with catalog timestampless nodes.
362
- - Pass along the `timeout` option to `connect()`.
363
- - Added preliminary PuppetDB API v3 support.
364
- - Removed support for the experimental endpoints.
365
- - The `connect()` method defaults to API v3 now.
366
-
367
- 0.0.2
368
- -----
369
-
370
- - Fix a bug in `setup.py` preventing successful installation.
371
-
372
- 0.0.1
373
- -----
374
-
375
- Initial release. Implements most of the v2 API.
376
-
377
-
378
- \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
@@ -1,5 +0,0 @@
1
- include README.md
2
- include CHANGELOG.md
3
- include LICENSE
4
- include requirements.txt
5
- include version