Skip to content

Commit e045c07

Browse files
Merge pull request #461 from splunk/release/1.6.20
Release/1.6.20
2 parents f28dd7b + be9d985 commit e045c07

File tree

167 files changed

+154
-36916
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+154
-36916
lines changed

.github/workflows/release.yml

+14-63
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,10 @@
11
name: Release
22
on:
3-
push:
4-
branches:
5-
- master
6-
workflow_dispatch: { }
7-
8-
jobs:
9-
find_version:
10-
name: Find Version
11-
runs-on: ubuntu-latest
12-
outputs:
13-
version: ${{ steps.get-version.outputs.version }}
14-
steps:
15-
- name: Checkout source
16-
uses: actions/[email protected]
17-
- name: Set up Python
18-
uses: actions/setup-python@v2
19-
with:
20-
python-version: 3.7
21-
- name: Get version
22-
id: get-version
23-
run: python -c 'import splunklib; print("::set-output name=version::%s" % splunklib.__version__)'
24-
- name: Install tox
25-
run: pip install tox
26-
- name: Generate API docs
27-
run: |
28-
rm -rf ./docs/_build
29-
tox -e docs
30-
cd ./docs/_build/html && zip -r ../docs_html.zip . -x ".*" -x "__MACOSX"
31-
tag_version:
32-
needs: find_version
33-
name: Tag Version
34-
runs-on: ubuntu-latest
35-
steps:
36-
- name: Create tag
37-
uses: tvdias/[email protected]
38-
with:
39-
repo-token: ${{ secrets.GITHUB_TOKEN }}
40-
tag: ${{ needs.find_version.outputs.version }}
413
release:
42-
needs: [ find_version, tag_version ]
43-
name: Create Release
44-
runs-on: ubuntu-latest
45-
steps:
46-
- name: Checkout code
47-
uses: actions/[email protected]
48-
- name: Create Release
49-
id: create_release
50-
uses: actions/create-release@v1
51-
env:
52-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53-
with:
54-
tag_name: ${{ needs.find_version.outputs.version }}
55-
release_name: Release/${{ needs.find_version.outputs.version }}
56-
body: |
57-
## Version ${{ needs.find_version.outputs.version }}
4+
types: [published]
585

59-
**TODO: Insert CHANGELOG.md contents here.**
60-
draft: false
61-
prerelease: false
62-
- name: Upload Artifact
63-
uses: actions/upload-artifact@v3
64-
with:
65-
name: apidocs
66-
path: docs/_build/docs_html.zip
6+
jobs:
677
publish:
68-
needs: release
698
name: Deploy Release to PyPI
709
runs-on: ubuntu-latest
7110
steps:
@@ -84,6 +23,18 @@ jobs:
8423
with:
8524
user: __token__
8625
password: ${{ secrets.pypi_password }}
26+
- name: Install tox
27+
run: pip install tox
28+
- name: Generate API docs
29+
run: |
30+
rm -rf ./docs/_build
31+
tox -e docs
32+
cd ./docs/_build/html && zip -r ../docs_html.zip . -x ".*" -x "__MACOSX"
33+
- name : Docs Upload
34+
uses: actions/upload-artifact@v3
35+
with:
36+
name: apidocs
37+
path: docs/_build/docs_html.zip
8738
# Test upload
8839
# - name: Publish package to TestPyPI
8940
# uses: pypa/gh-action-pypi-publish@master

.gitignore

-5
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,12 @@ proxy.log
1515
MANIFEST
1616
coverage_report
1717
test.log
18-
examples/*/local
19-
examples/**/local.meta
20-
examples/**/*.log
2118
tests/searchcommands_data/log/
2219
tests/searchcommands_data/output/
23-
examples/searchcommands_app/searchcommand_app.log
2420
Test Results*.html
2521
tests/searchcommands/data/app/app.log
2622
splunk_sdk.egg-info/
2723
dist/
28-
examples/searchcommands_app/package/lib/splunklib
2924
tests/searchcommands/apps/app_with_logging_configuration/*.log
3025
*.observed
3126
venv/

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Splunk Enterprise SDK for Python Changelog
22

3+
## Version 1.6.20
4+
5+
### New features and APIs
6+
* [#442](https://github.com/splunk/splunk-sdk-python/pull/442) Optional retries feature added
7+
* [#447](https://github.com/splunk/splunk-sdk-python/pull/447) Create job support for "output_mode:json" [[issue#285](https://github.com/splunk/splunk-sdk-python/issues/285)]
8+
9+
### Bug fixes
10+
* [#449](https://github.com/splunk/splunk-sdk-python/pull/449) Set cookie [[issue#438](https://github.com/splunk/splunk-sdk-python/issues/438)]
11+
* [#460](https://github.com/splunk/splunk-sdk-python/pull/460) Remove restart from client.Entity.disable
12+
13+
### Minor changes
14+
* [#444](https://github.com/splunk/splunk-sdk-python/pull/444) Update tox.ini
15+
* [#446](https://github.com/splunk/splunk-sdk-python/pull/446) Release workflow refactor
16+
* [#448](https://github.com/splunk/splunk-sdk-python/pull/448) Documentation changes
17+
* [#450](https://github.com/splunk/splunk-sdk-python/pull/450) Removed examples and it's references from the SDK
18+
19+
320
## Version 1.6.19
421

522
### New features and APIs

README.md

+9-32
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
# The Splunk Enterprise Software Development Kit for Python
55

6-
#### Version 1.6.19
6+
#### Version 1.6.20
77

8-
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.
8+
The Splunk Enterprise Software Development Kit (SDK) for Python contains library code designed to enable developers to build applications using the Splunk platform.
99

1010
The Splunk platform is a search engine and analytic environment that uses a distributed map-reduce architecture to efficiently index, search, and process large time-varying data sets.
1111

@@ -18,7 +18,7 @@ The Splunk developer platform enables developers to take advantage of the same t
1818

1919
## Get started with the Splunk Enterprise SDK for Python
2020

21-
The Splunk Enterprise SDK for Python contains library code and examples that show how to programmatically interact with the Splunk platform for a variety of scenarios including searching, saved searches, data inputs, and many more, along with building complete applications.
21+
The Splunk Enterprise SDK for Python contains library code, and it's examples are located in the [splunk-app-examples](https://github.com/splunk/splunk-app-examples) repository, that show how to programmatically interact with the Splunk platform for a variety of scenarios including searching, saved searches, data inputs, and many more, along with building complete applications.
2222

2323
### Requirements
2424

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

4040
### Install the SDK
4141

42-
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.
42+
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 unit tests from the SDK.
4343

4444
Use `pip`:
4545

@@ -68,8 +68,6 @@ To run the examples and unit tests, you must put the root of the SDK on your PYT
6868

6969
export PYTHONPATH=~/splunk-sdk-python
7070

71-
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.
72-
7371
### Following are the different ways to connect to Splunk Enterprise
7472
#### Using username/password
7573
```python
@@ -115,29 +113,9 @@ here is an example of .env file:
115113
# Session key for authentication
116114
#sessionKey=<Session-Key>
117115

118-
#### Run the examples
119-
120-
Examples are located in the **/splunk-sdk-python/examples** directory. To run the examples at the command line, use the Python interpreter and include any arguments that are required by the example. In the commands below, replace "examplename" with the name of the specific example in the directory that you want to run:
121-
122-
Using username and Password
123-
124-
python examplename.py --username="admin" --password="changeme"
125-
126-
Using Bearer token
127-
128-
python examplename.py --bearerToken=<value>
129-
130-
Using Session key
131-
132-
python examplename.py --sessionKey="<value>"
116+
#### SDK examples
133117

134-
If you saved your login credentials in the **.env** file, you can omit those arguments:
135-
136-
python examplename.py
137-
138-
To get help for an example, use the `--help` argument with an example:
139-
140-
python examplename.py --help
118+
Examples for the Splunk Enterprise SDK for Python are located in the [splunk-app-examples](https://github.com/splunk/splunk-app-examples) repository. For details, see the [Examples using the Splunk Enterprise SDK for Python](https://dev.splunk.com/enterprise/docs/devtools/python/sdk-python/examplespython) on the Splunk Developer Portal.
141119

142120
#### Run the unit tests
143121

@@ -162,10 +140,9 @@ The test suite uses Python's standard library, the built-in `unittest` library,
162140
| Directory | Description |
163141
|:--------- |:---------------------------------------------------------- |
164142
|/docs | Source for Sphinx-based docs and build |
165-
|/examples | Examples demonstrating various SDK features |
166143
|/splunklib | Source for the Splunk library modules |
167144
|/tests | Source for unit tests |
168-
|/utils | Source for utilities shared by the examples and unit tests |
145+
|/utils | Source for utilities shared by the unit tests |
169146

170147
### Customization
171148
* When working with custom search commands such as Custom Streaming Commands or Custom Generating Commands, We may need to add new fields to the records based on certain conditions.
@@ -216,7 +193,7 @@ class GeneratorTest(GeneratingCommand):
216193

217194
### Access metadata of modular inputs app
218195
* In stream_events() method we can access modular input app metadata from InputDefinition object
219-
* See [GitHub Commit](https://github.com/splunk/splunk-sdk-python/blob/develop/examples/github_commits/bin/github_commits.py) Modular input App example for reference.
196+
* See [GitHub Commit](https://github.com/splunk/splunk-app-examples/blob/master/modularinputs/python/github_commits/bin/github_commits.py) Modular input App example for reference.
220197
```python
221198
def stream_events(self, inputs, ew):
222199
# other code
@@ -262,7 +239,7 @@ To learn about our branching model, see [Branching Model](https://github.com/spl
262239
| [REST API Reference Manual](https://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTprolog) | Splunk REST API reference documentation |
263240
| [Splunk>Docs](https://docs.splunk.com/Documentation) | General documentation for the Splunk platform |
264241
| [GitHub Wiki](https://github.com/splunk/splunk-sdk-python/wiki/) | Documentation for this SDK's repository on GitHub |
265-
242+
| [Splunk Enterprise SDK for Python Examples](https://github.com/splunk/splunk-app-examples) | Examples for this SDK's repository |
266243

267244
## Community
268245

docker-compose.yml

-10
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,6 @@ services:
99
- SPLUNK_HEC_TOKEN=11111111-1111-1111-1111-1111111111113
1010
- SPLUNK_PASSWORD=changed!
1111
- SPLUNK_APPS_URL=https://github.com/splunk/sdk-app-collection/releases/download/v1.1.0/sdkappcollection.tgz
12-
volumes:
13-
- ./examples/github_forks:/opt/splunk/etc/apps/github_forks
14-
- ./splunklib:/opt/splunk/etc/apps/github_forks/lib/splunklib
15-
- ./examples/random_numbers:/opt/splunk/etc/apps/random_numbers
16-
- ./splunklib:/opt/splunk/etc/apps/random_numbers/lib/splunklib
17-
- ./examples/github_commits:/opt/splunk/etc/apps/github_commits
18-
- ./splunklib:/opt/splunk/etc/apps/github_commits/lib/splunklib
19-
- ./examples/searchcommands_app/package:/opt/splunk/etc/apps/searchcommands_app
20-
- ./splunklib:/opt/splunk/etc/apps/searchcommands_app/lib/splunklib
21-
- ./examples/twitted/twitted:/opt/splunk/etc/apps/twitted
2212
ports:
2313
- 8000:8000
2414
- 8088:8088

docs/results.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ splunklib.results
55

66
.. autoclass:: Message
77

8-
.. autoclass:: ResultsReader
8+
.. autoclass:: JSONResultsReader

examples/abc/README.md

-24
This file was deleted.

examples/abc/a.py

-70
This file was deleted.

0 commit comments

Comments
 (0)