|
1 | 1 | # Splunk Python SDK Changelog |
2 | 2 |
|
3 | | -## 1.0 |
4 | | - |
5 | | -* The argument order of Inputs.create has been swapped to have name first. This is consistent with |
6 | | - all other collections and all other operations on Inputs. |
7 | | -* All the .contains methods on collections have been removed. Use Python's `in` operator instead. |
8 | | -* Confs has been renamed to Configurations, and ConfFile to ConfigurationFile. |
9 | | -* Stanza.submit now takes a dictionary of key/value pairs specifying the stanza instead of a raw string. |
10 | | -* Namespace handling has changed subtly. Code that depends on namespace handling in detail may break. |
11 | | -* Added User.role_entities to return a list of the actual entity objects for the |
12 | | - roles of a user. User.roles still returns a list of the role names. |
13 | | -* The first time .cancel() is called on job, it cancels it. Any calls to it thereafter on that |
14 | | - job are a nop. |
| 3 | +## Version 1.0 |
| 4 | + |
| 5 | +### New features and APIs |
| 6 | + |
| 7 | +* Added a distinct `AuthenticationError` and optional autologin/autorelogin. |
| 8 | +* Added `is_ready` and `is_done` methods to `Job`. |
| 9 | + - Job objects are no longer guaranteed to be ready, so `is_ready` should be |
| 10 | + checked if your code assumes this. |
| 11 | +* Collection listings are optionally paginated. |
| 12 | +* Added modular inputs (for Splunk 5.0+). |
| 13 | +* Added `Jobs.export()` method. |
15 | 14 | * Service.restart now takes a timeout argument. If it is specified, the function blocks until |
16 | 15 | splunkd has restarted or the timeout has passed; if it is not specified, then it returns |
17 | 16 | immediately and you have to check whether splunkd has restarted yourself. |
18 | | -* Added .alert_count and .fired_alerts properties to SavedSearch entity. |
19 | | -* Added Index.attached_socket(), which provides the same functionality as Index.attach(), but as |
20 | | - a with block. |
21 | | -* Added Indexes.default() which returns the name of the default index that data will be submitted into. |
22 | | -* Connecting with a preexisting token works whether the token begins with 'Splunk ' or not; |
| 17 | +* `Collections.__getitem__` can fetch items from collections |
| 18 | + with an explicit namespace. For example, instead of |
| 19 | + `'Top five sourcetypes' in service.saved_searches`, you can also write |
| 20 | + `('Top five sourcetypes', record({'owner': 'nobody', 'app': 'search'})) in service.saved_searches`. |
| 21 | + [FIXME: This looks ridiculous. Has it been tested? |
| 22 | + Given a lack of record() calls in the tests, I doubt it.] |
| 23 | +* Extended `SavedSearch`: |
| 24 | + - New properties: `alert_count`, `fired_alerts`, `scheduled_times`, `suppressed` |
| 25 | + - New operations: `suppress`, `unsuppress` |
| 26 | +* Added `Index.attached_socket()` which can be used inside a with-block to |
| 27 | + submit multiple events to an index. This is a more idiomatic style than |
| 28 | + using the preexisting `Index.attach()` method. |
| 29 | +* Added `Indexes.get_default()` which returns the name of the default index that data will be submitted into. |
| 30 | +* Connecting with a preexisting session token works whether the token begins with 'Splunk ' or not; |
23 | 31 | the SDK will handle either case correctly. |
24 | | -* Added .is_ready() and .is_done() methods to Job to make it easy to loop until either point as been reached. |
25 | | -* Expanded endpoint coverage. Now at parity with the Java SDK. |
26 | | -* Replaced ResultsReader with something shorter. Iteration now |
27 | | - results either Message objects or dicts, and moved preview from |
28 | | - iteration to a field. |
29 | | -* Entities can be fetched from collections by name plus namespace |
30 | | - combinations (which are unique, unlike names alone). Fetching |
31 | | - entries by name alone properly throws errors on name conflicts. |
32 | | -* Added a distinct AuthenticationError and optional autologin/autorelogin. |
33 | | -* Reduced roundtrips and listings with specific lookups in __getitem__ |
34 | | - and similar methods. |
35 | | -* Put in types and operations to make URL encoding of strings consistent. |
36 | | -* Pagination is implemented to stream search results a hunk at a time. |
| 32 | +* Added `Service.search()` method as a shortcut for creating a search job. |
| 33 | +* Added `User.role_entities` as a convenience to return a list of the actual |
| 34 | + entity objects for the roles of a user. `User.roles` still returns a list |
| 35 | + of the role names. |
| 36 | +* Added `Role.grant` and `revoke` as convenience methods to add and remove |
| 37 | + capabilities from a role. |
| 38 | +* Added `Application.package()` and `updateInfo()` methods. |
37 | 39 | * Lots of docstrings expanded. |
38 | 40 | * Lots of small bugs fixed. |
39 | 41 |
|
| 42 | +### Breaking changes |
| 43 | + |
| 44 | +* Authentication errors are now reported as `AuthenticationError` instead of as |
| 45 | + an `HTTPError` with code 401. |
| 46 | +* `Job` objects are no longer guaranteed to be ready for querying. |
| 47 | + Client code should call `Job.is_ready()` to determine when it is safe to |
| 48 | + access properties on the job. |
| 49 | +* `Jobs.create()` can no longer be used to create a oneshot search |
| 50 | + (with `exec_mode=oneshot`). Use the `Jobs.oneshot()` method instead. |
| 51 | +* The `ResultsReader` interface has changed completely. |
| 52 | + - The `read` method has been removed. |
| 53 | + Instead iterate over the `ResultsReader` object directly. |
| 54 | + - Results from the iteration are either `dict`s or `results.Message` |
| 55 | + instances. |
| 56 | +* All `contains` methods on collections have been removed. |
| 57 | + Use Python's `in` operator instead. For example, instead of |
| 58 | + `service.apps.contains('search')`, use `'search' in service.apps`. |
| 59 | +* `Collections.__getitem__` will throw an `AmbiguousReferenceException` if |
| 60 | + there are multiple entities that have the specified entity name in |
| 61 | + the current namespace. |
| 62 | +* The argument order of `Inputs.create` has changed to have the `name` |
| 63 | + argument first. This is consistent with all other collections and all other |
| 64 | + operations on `Inputs`. |
| 65 | +* `ConfFile` has been renamed to `ConfigurationFile`. |
| 66 | + `Confs` has been renamed to `Configurations`. |
| 67 | +* Namespace handling has changed subtly. |
| 68 | + Code that depends on namespace handling in detail may break. |
| 69 | +* Calling `Job.cancel()` on a job that has already been cancelled no longer |
| 70 | + has any effect. |
| 71 | +* `Stanza.submit` now takes a dict instead of a raw string. |
| 72 | + |
| 73 | + |
40 | 74 | ## 0.8.0 (beta) |
41 | 75 |
|
42 | 76 | ### Features |
|
0 commit comments