diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c49f5c7..7edf338d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Splunk Enterprise SDK for Python Changelog +## Version 1.6.18 + +### Bug fixes +* [#405](https://github.com/splunk/splunk-sdk-python/pull/405) Fix searchcommands_app example +* [#406](https://github.com/splunk/splunk-sdk-python/pull/406) Fix mod inputs examples +* [#407](https://github.com/splunk/splunk-sdk-python/pull/407) Fixed issue with Streaming and Generating Custom Search Commands dropping fields that aren't present in the first row of results. More details on how to opt-in to this fix can be found here: +https://github.com/splunk/splunk-sdk-python/blob/develop/README.md#customization [ [issue#401](https://github.com/splunk/splunk-sdk-python/issues/401) ] + +### Minor changes +* [#408](https://github.com/splunk/splunk-sdk-python/pull/408) Add search mode example +* [#409](https://github.com/splunk/splunk-sdk-python/pull/409) Add Support for authorization tokens read from .splunkrc [ [issue#388](https://github.com/splunk/splunk-sdk-python/issues/388) ] +* [#413](https://github.com/splunk/splunk-sdk-python/pull/413) Default kvstore owner to nobody [ [issue#231](https://github.com/splunk/splunk-sdk-python/issues/231) ] + ## Version 1.6.17 ### Bug fixes diff --git a/README.md b/README.md index 4661dfe5..1436ad24 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ # The Splunk Enterprise Software Development Kit for Python -#### Version 1.6.17 +#### Version 1.6.18 The Splunk Enterprise Software Development Kit (SDK) for Python contains library code and examples designed to enable developers to build applications using the Splunk platform. @@ -71,6 +71,26 @@ To run the examples and unit tests, you must put the root of the SDK on your PYT The SDK command-line examples require a common set of arguments that specify the host, port, and login credentials for Splunk Enterprise. For a full list of command-line arguments, include `--help` as an argument to any of the examples. +### Following are the different ways to connect to Splunk Enterprise +#### Using username/password +```python +import splunklib.client as client + service = client.connect(host=, username=, password=, autoLogin=True) +``` + +#### Using bearer token +```python +import splunklib.client as client +service = client.connect(host=, splunkToken=, autologin=True) +``` + +#### Using session key +```python +import splunklib.client as client +service = client.connect(host=, token=, autologin=True) +``` + +### #### Create a .splunkrc convenience file To connect to Splunk Enterprise, many of the SDK examples and unit tests take command-line arguments that specify values for the host, port, and login credentials for Splunk Enterprise. For convenience during development, you can store these arguments as key-value pairs in a text file named **.splunkrc**. Then, the SDK examples and unit tests use the values from the **.splunkrc** file when you don't specify them. diff --git a/splunklib/__init__.py b/splunklib/__init__.py index 36f8a7e0..41c261fd 100644 --- a/splunklib/__init__.py +++ b/splunklib/__init__.py @@ -16,5 +16,5 @@ from __future__ import absolute_import from splunklib.six.moves import map -__version_info__ = (1, 6, 17) +__version_info__ = (1, 6, 18) __version__ = ".".join(map(str, __version_info__)) diff --git a/splunklib/binding.py b/splunklib/binding.py index dbbee853..94cc5581 100644 --- a/splunklib/binding.py +++ b/splunklib/binding.py @@ -1389,7 +1389,7 @@ def request(url, message, **kwargs): head = { "Content-Length": str(len(body)), "Host": host, - "User-Agent": "splunk-sdk-python/1.6.17", + "User-Agent": "splunk-sdk-python/1.6.18", "Accept": "*/*", "Connection": "Close", } # defaults