Skip to content

Commit

Permalink
Merge pull request #479 from splunk/release/1.7.1
Browse files Browse the repository at this point in the history
Release/1.7.1
  • Loading branch information
akaila-splunk committed Aug 23, 2022
2 parents 14ef9f4 + 21dae78 commit db48641
Show file tree
Hide file tree
Showing 175 changed files with 738 additions and 18,738 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/test.yml
Expand Up @@ -17,26 +17,20 @@ jobs:
- "latest"
fail-fast: false

services:
splunk:
image: splunk/splunk:${{matrix.splunk-version}}
env:
SPLUNK_START_ARGS: --accept-license
SPLUNK_HEC_TOKEN: 11111111-1111-1111-1111-1111111111113
SPLUNK_PASSWORD: changed!
SPLUNK_APPS_URL: https://github.com/splunk/sdk-app-collection/releases/download/v1.1.0/sdkappcollection.tgz
ports:
- 8000:8000
- 8088:8088
- 8089:8089

steps:
- uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v2

- name: Run docker-compose
run: SPLUNK_VERSION=${{matrix.splunk-version}} docker-compose up -d

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Install tox
run: pip install tox

- name: Test Execution
run: tox -e py
10 changes: 10 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,15 @@
# Splunk Enterprise SDK for Python Changelog

## Version 1.7.1

### Bug fixes
* [#471](https://github.com/splunk/splunk-sdk-python/pull/471) Fixed support of Load Balancer "sticky sessions" (persistent cookies) [[issue#438](https://github.com/splunk/splunk-sdk-python/issues/438)]

### Minor changes
* [#466](https://github.com/splunk/splunk-sdk-python/pull/466) tests for CSC apps
* [#467](https://github.com/splunk/splunk-sdk-python/pull/467) Added 'kwargs' parameter for Saved Search History function
* [#475](https://github.com/splunk/splunk-sdk-python/pull/475) README updates

## Version 1.7.0

### New features and APIs
Expand Down
6 changes: 4 additions & 2 deletions README.md
Expand Up @@ -3,7 +3,7 @@

# The Splunk Enterprise Software Development Kit for Python

#### Version 1.7.0
#### Version 1.7.1

The Splunk Enterprise Software Development Kit (SDK) for Python contains library code designed to enable developers to build applications using the Splunk platform.

Expand All @@ -28,7 +28,9 @@ Here's what you need to get going with the Splunk Enterprise SDK for Python.

The Splunk Enterprise SDK for Python has been tested with Python v2.7 and v3.7.

* Splunk Enterprise
* Splunk Enterprise 9.0 or 8.2

The Splunk Enterprise SDK for Python has been tested with Splunk Enterprise 9.0 and 8.2

If you haven't already installed Splunk Enterprise, download it [here](http://www.splunk.com/download).
For more information, see the Splunk Enterprise [_Installation Manual_](https://docs.splunk.com/Documentation/Splunk/latest/Installation).
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.yml
Expand Up @@ -18,3 +18,12 @@ services:
interval: 5s
timeout: 5s
retries: 20
volumes:
- "./tests/searchcommands/test_apps/eventing_app:/opt/splunk/etc/apps/eventing_app"
- "./tests/searchcommands/test_apps/generating_app:/opt/splunk/etc/apps/generating_app"
- "./tests/searchcommands/test_apps/reporting_app:/opt/splunk/etc/apps/reporting_app"
- "./tests/searchcommands/test_apps/streaming_app:/opt/splunk/etc/apps/streaming_app"
- "./splunklib:/opt/splunk/etc/apps/eventing_app/lib/splunklib"
- "./splunklib:/opt/splunk/etc/apps/generating_app/lib/splunklib"
- "./splunklib:/opt/splunk/etc/apps/reporting_app/lib/splunklib"
- "./splunklib:/opt/splunk/etc/apps/streaming_app/lib/splunklib"
2 changes: 1 addition & 1 deletion splunklib/__init__.py
Expand Up @@ -31,5 +31,5 @@ def setup_logging(level, log_format=DEFAULT_LOG_FORMAT, date_format=DEFAULT_DATE
format=log_format,
datefmt=date_format)

__version_info__ = (1, 7, 0)
__version_info__ = (1, 7, 1)
__version__ = ".".join(map(str, __version_info__))
6 changes: 3 additions & 3 deletions splunklib/binding.py
Expand Up @@ -543,8 +543,8 @@ def _auth_headers(self):
token = 'Splunk %s' % self.token
if token:
header.append(("Authorization", token))
if self.get_cookies().__len__() > 0:
header.append("Cookie", _make_cookie_header(self.get_cookies().items()))
if self.get_cookies():
header.append(("Cookie", _make_cookie_header(list(self.get_cookies().items()))))

return header

Expand Down Expand Up @@ -1434,7 +1434,7 @@ def request(url, message, **kwargs):
head = {
"Content-Length": str(len(body)),
"Host": host,
"User-Agent": "splunk-sdk-python/1.7.0",
"User-Agent": "splunk-sdk-python/1.7.1",
"Accept": "*/*",
"Connection": "Close",
} # defaults
Expand Down
7 changes: 5 additions & 2 deletions splunklib/client.py
Expand Up @@ -3291,12 +3291,15 @@ def fired_alerts(self):
item=AlertGroup)
return c

def history(self):
def history(self, **kwargs):
"""Returns a list of search jobs corresponding to this saved search.
:param `kwargs`: Additional arguments (optional).
:type kwargs: ``dict``
:return: A list of :class:`Job` objects.
"""
response = self.get("history")
response = self.get("history", **kwargs)
entries = _load_atom_entries(response)
if entries is None: return []
jobs = []
Expand Down
2 changes: 1 addition & 1 deletion tests/README.md
@@ -1,7 +1,7 @@
# Splunk Test Suite

The test suite uses Python's standard library and the built-in **unittest**
library. If you're using Python 2.7, you're all set. However, if you are using
library. If you're using Python 2.7 or Python 3.7, you're all set. However, if you are using
Python 2.6, you'll also need to install the **unittest2** library to get the
additional features that were added to Python 2.7 (just run `pip install
unittest2` or `easy_install unittest2`).
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit db48641

Please sign in to comment.