Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/1.7.1 #479

Merged
merged 27 commits into from Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c049e61
eventing_app for CSC tests
vmalaviya-splunk Jun 7, 2022
5010af2
generating_app for CSC tests
vmalaviya-splunk Jun 7, 2022
6907767
reporting_app for CSC tests
vmalaviya-splunk Jun 7, 2022
8a7d9db
streaming_app for CSC tests
vmalaviya-splunk Jun 7, 2022
6477d5b
Bind mounts added for CSC apps testing
vmalaviya-splunk Jun 7, 2022
61b8ac6
Tests added for Custom Search Command apps
vmalaviya-splunk Jun 7, 2022
81ab83c
recordings removed from tests/searchcommands
vmalaviya-splunk Jun 8, 2022
f503c85
recordings dependencies removed from tests
vmalaviya-splunk Jun 8, 2022
7b1d621
Update test_csc_apps.py
vmalaviya-splunk Jun 8, 2022
10a88b7
Update test.yml
vmalaviya-splunk Jun 8, 2022
1f76d60
Update test.yml
vmalaviya-splunk Jun 8, 2022
40a5342
Update test.yml
vmalaviya-splunk Jun 8, 2022
9f8c54e
Update test.yml
vmalaviya-splunk Jun 8, 2022
65efaad
Update test.yml
vmalaviya-splunk Jun 8, 2022
cdda593
Update test.yml
vmalaviya-splunk Jun 13, 2022
878ffac
Update test.yml
vmalaviya-splunk Jun 13, 2022
87c1bce
Update test.yml
vmalaviya-splunk Jun 13, 2022
3b48fb6
Update test.yml
vmalaviya-splunk Jun 13, 2022
92c6fc6
updated saved search history method
akaila-splunk Jun 14, 2022
66a8741
Merge pull request #470 from splunk/master
fantavlik Jun 17, 2022
9ed8a10
cookie fix
ashah-splunk Jun 23, 2022
9753de9
Merge pull request #467 from splunk/DVPL-11246
akaila-splunk Jul 12, 2022
0837de2
Merge pull request #466 from splunk/tests-for-csc-apps
vmalaviya-splunk Jul 12, 2022
112015c
Merge pull request #471 from splunk/cookie_fix
ashah-splunk Jul 13, 2022
11e6560
README updates
ashah-splunk Jul 28, 2022
f29d31c
Merge pull request #475 from splunk/readme_updates
ashah-splunk Aug 18, 2022
21dae78
release v1.7.1 changes
akaila-splunk Aug 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.