Skip to content

Release 1.6.17 #410

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

Merged
merged 50 commits into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
db3ca92
Merge pull request #379 from splunk/master
fantavlik Jun 8, 2021
f9191a1
Update conf.py
PKing70 Jun 10, 2021
61e67c1
Merge pull request #381 from splunk/PKing70-patch-1
fantavlik Jun 10, 2021
a4e08ae
Implemented the possibility to provide a SSLContext object to the con…
Jun 10, 2021
d28ab52
docs: Fix a few typos
timgates42 Jul 28, 2021
b7a453e
Fix spelling error
Aug 4, 2021
2516a45
Merge pull request #389 from timgates42/bugfix_typos
Aug 5, 2021
107c8fa
Updating development status past 3
tdhellmann Sep 8, 2021
0c201c0
Update random_number.py
akaila-splunk Sep 15, 2021
ff6cd64
Merge pull request #395 from splunk/DVPL-9857
akaila-splunk Sep 16, 2021
d634d2d
Updated KVStore Methods
ashah-splunk Sep 21, 2021
3d013c4
Update client.py
rmaheshwari-splunk Sep 22, 2021
a4039cd
Updated kvstore method
akaila-splunk Sep 22, 2021
ba05bb9
Merge pull request #396 from splunk/DVPL-10033
ashah-splunk Sep 23, 2021
cd742c8
Merge pull request #398 from splunk/DVPL-10032
ashah-splunk Sep 23, 2021
3ce0e37
Merge branch 'develop' into DVPL-10029
ashah-splunk Sep 23, 2021
10489f2
Merge pull request #397 from splunk/DVPL-10029
ashah-splunk Sep 23, 2021
e3b28e3
Create test.yml
akaila-splunk Sep 23, 2021
1921bd2
Update test.yml
akaila-splunk Sep 23, 2021
4642c50
Delete .travis.yml
akaila-splunk Sep 24, 2021
261a943
Update test.yml
akaila-splunk Sep 27, 2021
709806e
Merge pull request #399 from splunk/DVPL-10027
akaila-splunk Sep 28, 2021
a01ae70
Remove usage of Easy_install to install SDK
ncanumalla-splunk Oct 6, 2021
6e701d4
Fix test cases failure for latest(8.2.x) Splunk version
akaila-splunk Oct 8, 2021
7462905
Update test.yml
akaila-splunk Oct 8, 2021
c66b8e6
Update test_collection.py
ashah-splunk Oct 12, 2021
cbda7f6
updated tearDown method of index test cases
akaila-splunk Oct 13, 2021
1103328
Update test_index.py
akaila-splunk Oct 13, 2021
d89e1fe
Update test_index.py
akaila-splunk Oct 13, 2021
7a508da
Merge pull request #404 from splunk/DVPL-10081
ashah-splunk Oct 14, 2021
89aa93d
Update search_command.py
vmalaviya-splunk Oct 4, 2021
d585269
Update search_command.py
vmalaviya-splunk Oct 5, 2021
fa21493
variable renamed to allow_empty_input and default to true
vmalaviya-splunk Oct 14, 2021
000fe6b
Removed overriding method
vmalaviya-splunk Oct 18, 2021
9705bef
Update generating_command.py
vmalaviya-splunk Oct 19, 2021
62b6bb1
Merge pull request #403 from splunk/ncanumalla-splunk-patch-2
ncanumalla-splunk Oct 20, 2021
75dbe30
Merge pull request #393 from splunk/update-development-status
zenmoto Oct 20, 2021
6ac64d8
Update generating_command.py
vmalaviya-splunk Oct 21, 2021
80ddb4a
Merge pull request #383 from AndyXan/develop
fantavlik Oct 21, 2021
8a988f8
Merge pull request #391 from splunk/doc_390
ashah-splunk Oct 22, 2021
2bb0948
test scenario added for allow_empty_input flag
vmalaviya-splunk Oct 25, 2021
3664b39
PY2 compatibility added
vmalaviya-splunk Oct 25, 2021
e8239e5
Comment for allow_empty-input in Generating Commands
vmalaviya-splunk Oct 26, 2021
f9ad478
Test for allow_empty_input in generating commands
vmalaviya-splunk Oct 26, 2021
cd891df
Update test_generator_command.py
vmalaviya-splunk Oct 27, 2021
9938fcb
Update test.yml
vmalaviya-splunk Oct 27, 2021
fe1784f
Update test.yml
vmalaviya-splunk Oct 27, 2021
ad5f21e
Merge pull request #402 from splunk/DVPL-10069
ashah-splunk Oct 27, 2021
650bea0
Release-1.6.17 changes
vmalaviya-splunk Oct 28, 2021
b80d774
Update CHANGELOG.md
vmalaviya-splunk Nov 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Python CI

on:
[push, pull_request]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
python: [2.7, 3.7]
splunk-version:
- "8.0"
- "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: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Create .splunkrc file
run: |
cd ~
echo host=localhost > .splunkrc
echo port=8089 >> .splunkrc
echo username=admin >> .splunkrc
echo password=changed! >> .splunkrc
echo scheme=https >> .splunkrc
echo version=${{ matrix.splunk }} >> .splunkrc
- name: Create build dir for ExamplesTestCase::test_build_dir_exists test case
run: |
cd ~
cd /home/runner/work/splunk-sdk-python/splunk-sdk-python/
python setup.py build
python setup.py dist
- name: Install tox
run: pip install tox
- name: Test Execution
run: tox -e py
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Splunk Enterprise SDK for Python Changelog

## Version 1.6.17

### Bug fixes

* [#383](https://github.com/splunk/splunk-sdk-python/pull/383) Implemented the possibility to provide a SSLContext object to the connect method
* [#396](https://github.com/splunk/splunk-sdk-python/pull/396) Updated KVStore Methods to support dictionaries
* [#397](https://github.com/splunk/splunk-sdk-python/pull/397) Added code changes for encoding '/' in _key parameter in kvstore.data APIs.
* [#398](https://github.com/splunk/splunk-sdk-python/pull/398) Added dictionary support for KVStore "query" methods.
* [#402](https://github.com/splunk/splunk-sdk-python/pull/402) Fixed regression introduced in 1.6.15 to once again allow processing of empty input records in custom search commands (fix [#376](https://github.com/splunk/splunk-sdk-python/issues/376))
* [#404](https://github.com/splunk/splunk-sdk-python/pull/404) Fixed test case failure for 8.0 and latest(8.2.x) splunk version

### Minor changes

* [#381](https://github.com/splunk/splunk-sdk-python/pull/381) Updated current year in conf.py
* [#389](https://github.com/splunk/splunk-sdk-python/pull/389) Fixed few typos
* [#391](https://github.com/splunk/splunk-sdk-python/pull/391) Fixed spelling error in client.py
* [#393](https://github.com/splunk/splunk-sdk-python/pull/393) Updated development status past 3
* [#394](https://github.com/splunk/splunk-sdk-python/pull/394) Updated Readme steps to run examples
* [#395](https://github.com/splunk/splunk-sdk-python/pull/395) Updated random_number.py
* [#399](https://github.com/splunk/splunk-sdk-python/pull/399) Moved CI tests to GitHub Actions
* [#403](https://github.com/splunk/splunk-sdk-python/pull/403) Removed usage of Easy_install to install SDK

## Version 1.6.16

### Bug fixes
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# The Splunk Enterprise Software Development Kit for Python

#### Version 1.6.16
#### Version 1.6.17

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.

Expand Down Expand Up @@ -39,11 +39,7 @@ Here's what you need to get going with the Splunk Enterprise SDK for Python.

### Install the SDK

Use the following commands to install the Splunk Enterprise SDK for Python libraries in different ways. However, it's not necessary to install the libraries to run the examples and unit tests from the SDK.

Use `easy_install`:

[sudo] easy_install splunk-sdk
Use the following commands to install the Splunk Enterprise SDK for Python libraries. However, it's not necessary to install the libraries to run the examples and unit tests from the SDK.

Use `pip`:

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
- 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.0.0/sdk-app-collection.tgz
- SPLUNK_APPS_URL=https://github.com/splunk/sdk-app-collection/releases/download/v1.1.0/sdkappcollection.tgz
ports:
- 8000:8000
- 8088:8088
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

# General information about the project.
project = u'Splunk SDK for Python'
copyright = u'2020, Splunk Inc'
copyright = u'2021, Splunk Inc'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
6 changes: 3 additions & 3 deletions docs/searchcommands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ splunklib.searchcommands

.. automodule:: splunklib.searchcommands

.. autofunction:: dispatch(command_class[, argv=sys.argv, input_file=sys.stdin, output_file=sys.stdout, module_name=None])
.. autofunction:: dispatch(command_class[, argv=sys.argv, input_file=sys.stdin, output_file=sys.stdout, module_name=None, allow_empty_input=True])

.. autoclass:: EventingCommand
:members:
Expand Down Expand Up @@ -31,7 +31,7 @@ splunklib.searchcommands

.. automethod:: splunklib.searchcommands::GeneratingCommand.generate

.. automethod:: splunklib.searchcommands::GeneratingCommand.process(args=sys.argv[, input_file=sys.stdin, output_file=sys.stdout])
.. automethod:: splunklib.searchcommands::GeneratingCommand.process(args=sys.argv[, input_file=sys.stdin, output_file=sys.stdout, allow_empty_input=True])

.. autoclass:: ReportingCommand
:members:
Expand Down Expand Up @@ -59,7 +59,7 @@ splunklib.searchcommands
:inherited-members:
:exclude-members: configuration_settings, fix_up, items, keys

.. automethod:: splunklib.searchcommands::StreamingCommand.process(args=sys.argv[, input_file=sys.stdin, output_file=sys.stdout])
.. automethod:: splunklib.searchcommands::StreamingCommand.process(args=sys.argv[, input_file=sys.stdin, output_file=sys.stdout, allow_empty_input=True])

.. automethod:: splunklib.searchcommands::StreamingCommand.stream

Expand Down
8 changes: 4 additions & 4 deletions examples/analytics/bottle.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def __init__(self, catchall=True, autojson=True, config=None):

self.mounts = {}
self.error_handler = {}
#: If true, most exceptions are catched and returned as :exc:`HTTPError`
#: If true, most exceptions are caught and returned as :exc:`HTTPError`
self.catchall = catchall
self.config = config or {}
self.serve = True
Expand Down Expand Up @@ -638,8 +638,8 @@ def remove_hook(self, name, func):

def handle(self, path, method='GET'):
""" (deprecated) Execute the first matching route callback and return
the result. :exc:`HTTPResponse` exceptions are catched and returned.
If :attr:`Bottle.catchall` is true, other exceptions are catched as
the result. :exc:`HTTPResponse` exceptions are caught and returned.
If :attr:`Bottle.catchall` is true, other exceptions are caught as
well and returned as :exc:`HTTPError` instances (500).
"""
depr("This method will change semantics in 0.10. Try to avoid it.")
Expand Down Expand Up @@ -1081,7 +1081,7 @@ def set_cookie(self, key, value, secret=None, **kargs):
:param value: the value of the cookie.
:param secret: required for signed cookies. (default: None)
:param max_age: maximum age in seconds. (default: None)
:param expires: a datetime object or UNIX timestamp. (defaut: None)
:param expires: a datetime object or UNIX timestamp. (default: None)
:param domain: the domain that is allowed to read the cookie.
(default: current domain)
:param path: limits the cookie to a given path (default: /)
Expand Down
2 changes: 1 addition & 1 deletion examples/analytics/js/jquery.flot.selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ you want to know what's happening while it's happening,
A "plotunselected" event with no arguments is emitted when the user
clicks the mouse to remove the selection.

The plugin allso adds the following methods to the plot object:
The plugin also adds the following methods to the plot object:

- setSelection(ranges, preventEvent)

Expand Down
2 changes: 1 addition & 1 deletion examples/async/async.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def do_search(query):
return results

# We specify many queries to get show the advantages
# of paralleism.
# of parallelism.
queries = [
'search * | head 100',
'search * | head 100',
Expand Down
2 changes: 1 addition & 1 deletion examples/handlers/tiny-proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def daemonize(logger, opts):
sys.exit(0)
else:
if os.fork () != 0:
## allow the child pid to instanciate the server
## allow the child pid to instantiate the server
## class
time.sleep (1)
sys.exit (0)
Expand Down
2 changes: 1 addition & 1 deletion examples/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

# All job commands operate on search 'specifiers' (spec). A search specifier
# is either a search-id (sid) or the index of the search job in the list of
# jobs, eg: @0 would specify the frist job in the list, @1 the second, and so
# jobs, eg: @0 would specify the first job in the list, @1 the second, and so
# on.

from __future__ import absolute_import
Expand Down
23 changes: 20 additions & 3 deletions examples/kvstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,40 @@ def main():
# Let's make sure it doesn't have any data
print("Should be empty: %s" % json.dumps(collection.data.query()))

# Let's add some data
# Let's add some json data
collection.data.insert(json.dumps({"_key": "item1", "somekey": 1, "otherkey": "foo"}))
collection.data.insert(json.dumps({"_key": "item2", "somekey": 2, "otherkey": "foo"}))
#Let's add data as a dictionary object
collection.data.insert({"_key": "item2", "somekey": 2, "otherkey": "foo"})
collection.data.insert(json.dumps({"somekey": 3, "otherkey": "bar"}))

# Let's make sure it has the data we just entered
print("Should have our data: %s" % json.dumps(collection.data.query(), indent=1))

# Let's run some queries
print("Should return item1: %s" % json.dumps(collection.data.query_by_id("item1"), indent=1))

#Let's update some data
data = collection.data.query_by_id("item2")
data['otherkey'] = "bar"
#Passing data using 'json.dumps'
collection.data.update("item2", json.dumps(data))
print("Should return item2 with updated data: %s" % json.dumps(collection.data.query_by_id("item2"), indent=1))
data['otherkey'] = "foo"
# Passing data as a dictionary instance
collection.data.update("item2", data)
print("Should return item2 with updated data: %s" % json.dumps(collection.data.query_by_id("item2"), indent=1))


query = json.dumps({"otherkey": "foo"})
print("Should return item1 and item2: %s" % json.dumps(collection.data.query(query=query), indent=1))

query = json.dumps({"otherkey": "bar"})
print("Should return third item with auto-generated _key: %s" % json.dumps(collection.data.query(query=query), indent=1))


# passing query data as dict
query = {"somekey": {"$gt": 1}}
print("Should return item2 and item3: %s" % json.dumps(collection.data.query(query=query), indent=1))

# Let's delete the collection
collection.delete()

Expand Down
2 changes: 2 additions & 0 deletions examples/random_numbers/random_numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

from __future__ import absolute_import
import random, sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "lib"))

from splunklib.modularinput import *
from splunklib import six
Expand Down
2 changes: 1 addition & 1 deletion examples/searchcommands_app/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ def run(self):
setup(
description='Custom Search Command examples',
name=os.path.basename(project_dir),
version='1.6.16',
version='1.6.17',
author='Splunk, Inc.',
author_email='devinfo@splunk.com',
url='http://github.com/splunk/splunk-sdk-python',
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def run(self):

classifiers = [
"Programming Language :: Python",
"Development Status :: 3 - Alpha",
"Development Status :: 6 - Mature",
"Environment :: Other Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
Expand Down
2 changes: 1 addition & 1 deletion splunklib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@

from __future__ import absolute_import
from splunklib.six.moves import map
__version_info__ = (1, 6, 16)
__version_info__ = (1, 6, 17)
__version__ = ".".join(map(str, __version_info__))
Loading