Skip to content

Commit

Permalink
Merge pull request #410 from splunk/release-1.6.17
Browse files Browse the repository at this point in the history
Release 1.6.17
  • Loading branch information
vmalaviya-splunk authored Nov 3, 2021
2 parents 816e6fc + b80d774 commit 7674157
Show file tree
Hide file tree
Showing 31 changed files with 293 additions and 110 deletions.
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='[email protected]',
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

0 comments on commit 7674157

Please sign in to comment.