Skip to content

Commit 9486464

Browse files
author
Shakeel Mohamed
committed
Release 1.4.0
2 parents 1c5c8d6 + ac66072 commit 9486464

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2022
-1686
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ tests/searchcommands_data/output/
2121
examples/searchcommands_app/searchcommand_app.log
2222
Test Results*.html
2323
tests/searchcommands/data/app/app.log
24+
splunk_sdk.egg-info/
25+
dist/

CHANGELOG.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,45 @@
11
# Splunk SDK for Python Changelog
22

3+
## Version 1.4.0
4+
5+
### New features and APIs
6+
7+
* Added support for cookie-based authentication, for Splunk 6.2+.
8+
9+
* Added support for installing as a Python egg.
10+
11+
* Added a convenience `Service.job()` method to get a `Job` by its sid.
12+
13+
### Bug fixes
14+
15+
* Restored support for Python 2.6 (GitHub issues #96 & #114).
16+
17+
* Fix `SearchCommands` decorators and `Validator` classes (Github issue #113).
18+
19+
* Fix `SearchCommands` bug iterating over `None` in `dict_reader.fieldnames` (Github issue #110).
20+
21+
* Fixed JSON parsing errors (GitHub issue #100).
22+
23+
* Retain the `type` property when parsing Atom feeds (GitHub issue #92).
24+
25+
* Update non-namespaced server paths with a `/services/` prefix. Fixes a bug where setting the `owner` and/or `app` on a `Service` could produce 403 errors on some REST API endpoints.
26+
27+
* Modular input `Argument.title` is now written correctly.
28+
29+
* `Client.connect` will now always return a `Service` instance, even if user credentials are invalid.
30+
31+
* Update the `saved_search/saved_search.py` example to handle saved searches with names containing characters that must be URL encoded (ex: `"Top 5 sourcetypes"`).
32+
33+
### Minor Changes
34+
35+
* Update modular input examples with readable titles.
36+
37+
* Improvements to `splunklib.searchcommands` tests.
38+
39+
* Various docstring and code style corrections.
40+
41+
* Updated some tests to pass on Splunk 6.2+.
42+
343
## Version 1.3.1
444

545
### Bug fixes
@@ -15,7 +55,7 @@
1555

1656
* Added a script (GenerateHelloCommand) to the searchcommand_app to generate a custom search command.
1757

18-
* Added a human readable title parameter to `modularinput.argument`.
58+
* Added a human readable argument titles to modular input examples.
1959

2060
* Renamed the searchcommand `csv` module to `splunk_csv`.
2161

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The Splunk Software Development Kit for Python
22

3-
#### Version 1.3.1
3+
#### Version 1.4.0
44

55
The Splunk Software Development Kit (SDK) for Python contains library code and
66
examples designed to enable developers to build applications using Splunk.
@@ -60,6 +60,10 @@ Or
6060

6161
[sudo] pip install splunk-sdk
6262

63+
Or to install the Python egg
64+
65+
[sudo] pip install --egg splunk-sdk
66+
6367
Alternatively, you can use **setup.py** on the sources you cloned from GitHub:
6468

6569
[sudo] python setup.py install

docs/binding.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ splunklib.binding
1313
:members:
1414

1515
.. autoclass:: Context
16-
:members: connect, delete, get, login, logout, post, request
16+
:members: connect, delete, get, get_cookies, has_cookies, login, logout, post, request
1717

1818
.. autoclass:: HTTPError
1919
:members:

docs/client.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ splunklib.client
110110
:inherited-members:
111111

112112
.. autoclass:: Service
113-
:members: apps, confs, capabilities, event_types, fired_alerts, indexes, info, inputs, jobs, loggers, messages, modular_input_kinds, parse, restart, restart_required, roles, search, saved_searches, settings, splunk_version, storage_passwords, users
113+
:members: apps, confs, capabilities, event_types, fired_alerts, indexes, info, inputs, job, jobs, loggers, messages, modular_input_kinds, parse, restart, restart_required, roles, search, saved_searches, settings, splunk_version, storage_passwords, users
114114
:inherited-members:
115115

116116
.. autoclass:: Settings

examples/analytics/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Similarly to `AnalyticsTracker`, the `output.py` file defines the "output" side
7373
of the Analytics service. If you want to extract the events you logged in using
7474
`AnalyticsTracker`, you'd use the `AnalyticsRetriever` class.
7575

76-
Creating an `AnalyticsTracker` instance is identical to the `AnalyticsTracker`:
76+
Creating an `AnalyticsRetriever` instance is identical to the `AnalyticsTracker`:
7777

7878
```python
7979
from analytics.output import AnalyticsRetriever
@@ -138,7 +138,7 @@ you can see a graph of events over time, properties, etc.
138138

139139
We make use of the excellent open source
140140
[flot](http://code.google.com/p/flot/) graphing library to render
141-
our Javascript graphs. We also use the [`bottle.py`](bottlepy.org)
141+
our Javascript graphs. We also use the [`bottle.py`](http://bottlepy.org)
142142
micro-web framework.
143143

144144
## Running the Sample

examples/analytics/input.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(self, application_name, splunk_info, index = ANALYTICS_INDEX_NAME):
5959

6060
@staticmethod
6161
def encode(props):
62-
encoded = " ";
62+
encoded = " "
6363
for k,v in props.iteritems():
6464
# We disallow dictionaries - it doesn't quite make sense.
6565
assert(not isinstance(v, dict))

examples/binding1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ def indexes(self):
4242
return self.context.get("data/indexes")
4343

4444
def info(self):
45-
return self.context.get("server/info")
45+
return self.context.get("/services/server/info")
4646

4747
def settings(self):
48-
return self.context.get("server/settings")
48+
return self.context.get("/services/server/settings")
4949

5050
def search(self, query, **kwargs):
5151
return self.context.post("search/jobs/export", search=query, **kwargs)

examples/explorer/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def make_request(self, url, method, data, headers):
114114
response_file = StringIO.StringIO(response_text)
115115

116116
# On errors, we also log the response text
117-
self.log_message("Response: %s", response_text);
117+
self.log_message("Response: %s", response_text)
118118

119119
# Send the error response code
120120
self.send_response(e.code, message=e.msg)

examples/export/export.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def main():
328328
service = connect(**options.kwargs)
329329

330330
if path.exists(options.kwargs['output']):
331-
if options.kwargs['recover'] == False:
331+
if not options.kwargs['recover']:
332332
print "Export file %s exists, and recover option nor specified" % \
333333
options.kwargs['output']
334334
sys.exit(1)

0 commit comments

Comments
 (0)