Skip to content

Commit b319e45

Browse files
author
David Noble
committed
Release 1.2.1
2 parents 70931cd + 7fba44c commit b319e45

File tree

145 files changed

+2058
-821
lines changed

Some content is hidden

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

145 files changed

+2058
-821
lines changed

CHANGELOG.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,64 @@
11
# Splunk SDK for Python Changelog
22

3+
## Version 1.2.1
4+
5+
### New features and APIs
6+
7+
* Added features for building custom search commands in Python
8+
9+
1. Access Splunk Search Results Info.
10+
11+
See the `SearchCommand.search_results_info` property.
12+
13+
2. Communicate with Splunk.
14+
15+
See the `SearchCommand.service` property.
16+
17+
3. Control logging and view command configuration settings from the Splunk
18+
command line
19+
20+
+ The `logging_configuration` option lets you pick an alternative logging
21+
configuration file for a command invocation.
22+
23+
+ The `logging_level` option lets you set the logging level for a command
24+
invocation.
25+
26+
+ The `show_configuration` option writes command configuration settings
27+
to the Splunk Job Inspector.
28+
29+
4. Get a more complete picture of what's happening when an error occurs
30+
31+
Command error messages now include a full stack trace.
32+
33+
5. Enable the Splunk Search Assistant to display command help.
34+
35+
See `examples/searchcommands_app/default/searchbnf.conf`
36+
37+
6. Write messages for display by the job inspector.
38+
39+
See `SearchCommand.messages_header`.
40+
41+
* Added a feature for building modular inputs.
42+
43+
1. Communicate with Splunk.
44+
45+
See the `Script.service` property.
46+
47+
### Bug fixes
48+
49+
* When running `setup.py dist` without running `setup.py build`, there is no
50+
longer an `No such file or directory` error on the command line, and the
51+
command behaves as expected.
52+
53+
* When setting the sourcetype of a modular input event, events are indexed
54+
properly.
55+
56+
Previously Splunk would encounter an error and skip them.
57+
58+
### Quality improvements
59+
60+
* Better code documentation and unit test coverage.
61+
362
## Version 1.2
463

564
### New features and APIs

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The Splunk Software Development Kit for Python
22

3-
#### Version 1.2
3+
#### Version 1.2.1
44

55
The Splunk Software Development Kit (SDK) for Python contains library code and
66
examples designed to enable developers to build applications using Splunk.
@@ -72,7 +72,7 @@ examples and unit tests from the SDK.
7272

7373
To run the examples and unit tests, you must put the root of
7474
the SDK on your PYTHONPATH. For example, if you have downloaded the SDK to your
75-
home folder and are running Mac OS X or Linux, add the following line to your
75+
home folder and are running OS X or Linux, add the following line to your
7676
**.bash_profile**:
7777

7878
export PYTHONPATH=~/splunk-sdk-python
@@ -108,7 +108,7 @@ To use this convenience file, create a text file with the following format:
108108

109109
Save the file as **.splunkrc** in the current user's home directory.
110110

111-
* For example on Mac OS X, save the file as:
111+
* For example on OS X, save the file as:
112112

113113
~/.splunkrc
114114

docs/searchcommands.rst

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,51 @@ splunklib.searchcommands
33

44
.. automodule:: splunklib.searchcommands
55

6-
.. autofunction:: dispatch
7-
8-
.. automodule:: splunklib.searchcommands.generating_command
6+
.. autofunction:: dispatch(command_class[, argv=sys.argv, input_file=sys.stdin, output_file=sys.stdout, module_name=None])
97

108
.. autoclass:: GeneratingCommand
119
:members:
1210
:inherited-members:
11+
:exclude-members: ConfigurationSettings, generate, process
12+
13+
.. autoclass:: splunklib.searchcommands::GeneratingCommand.ConfigurationSettings
14+
:members:
15+
:inherited-members:
16+
:exclude-members: configuration_settings, fix_up, items, keys
17+
18+
.. automethod:: splunklib.searchcommands::GeneratingCommand.generate
1319

14-
.. automodule:: splunklib.searchcommands.reporting_command
20+
.. automethod:: splunklib.searchcommands::GeneratingCommand.process(args=sys.argv[, input_file=sys.stdin, output_file=sys.stdout])
1521

1622
.. autoclass:: ReportingCommand
1723
:members:
1824
:inherited-members:
25+
:exclude-members: ConfigurationSettings, map, process, reduce
26+
27+
.. autoclass:: splunklib.searchcommands::ReportingCommand.ConfigurationSettings
28+
:members:
29+
:inherited-members:
30+
:exclude-members: configuration_settings, fix_up, items, keys
31+
32+
.. automethod:: splunklib.searchcommands::ReportingCommand.map
1933

20-
.. automodule:: splunklib.searchcommands.streaming_command
34+
.. automethod:: splunklib.searchcommands::ReportingCommand.process(args=sys.argv[, input_file=sys.stdin, output_file=sys.stdout])
35+
36+
.. automethod:: splunklib.searchcommands::ReportingCommand.reduce
2137

2238
.. autoclass:: StreamingCommand
2339
:members:
2440
:inherited-members:
41+
:exclude-members: ConfigurationSettings, process, stream
42+
43+
.. autoclass:: splunklib.searchcommands::StreamingCommand.ConfigurationSettings
44+
:members:
45+
:inherited-members:
46+
:exclude-members: configuration_settings, fix_up, items, keys
2547

26-
.. automodule:: splunklib.searchcommands.decorators
48+
.. automethod:: splunklib.searchcommands::StreamingCommand.process(args=sys.argv[, input_file=sys.stdin, output_file=sys.stdout])
49+
50+
.. automethod:: splunklib.searchcommands::StreamingCommand.stream
2751

2852
.. autoclass:: Configuration
2953
:members:
@@ -32,37 +56,36 @@ splunklib.searchcommands
3256
.. autoclass:: Option
3357
:members:
3458
:inherited-members:
59+
:exclude-members: Item, View, fix_up
3560

36-
.. automodule:: splunklib.searchcommands.validators
37-
38-
.. autoclass:: splunklib.searchcommands.validators.Boolean
61+
.. autoclass:: Boolean
3962
:members:
4063
:inherited-members:
4164

42-
.. autoclass:: splunklib.searchcommands.validators.Duration
65+
.. autoclass:: Duration
4366
:members:
4467
:inherited-members:
4568

46-
.. autoclass:: splunklib.searchcommands.validators.Fieldname
69+
.. autoclass:: Fieldname
4770
:members:
4871
:inherited-members:
4972

50-
.. autoclass:: splunklib.searchcommands.validators.File
73+
.. autoclass:: File
5174
:members:
5275
:inherited-members:
5376

54-
.. autoclass:: splunklib.searchcommands.validators.Integer
77+
.. autoclass:: Integer
5578
:members:
5679
:inherited-members:
5780

58-
.. autoclass:: splunklib.searchcommands.validators.RegularExpression
81+
.. autoclass:: RegularExpression
5982
:members:
6083
:inherited-members:
6184

62-
.. autoclass:: splunklib.searchcommands.validators.Set
85+
.. autoclass:: Set
6386
:members:
6487
:inherited-members:
6588

66-
.. autoclass:: splunklib.searchcommands.validators.Validator
89+
.. autoclass:: Validator
6790
:members:
6891
:inherited-members:

examples/abc/a.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011-2013 Splunk, Inc.
1+
# Copyright 2011-2014 Splunk, Inc.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"): you may
44
# not use this file except in compliance with the License. You may obtain

examples/abc/b.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011-2013 Splunk, Inc.
1+
# Copyright 2011-2014 Splunk, Inc.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"): you may
44
# not use this file except in compliance with the License. You may obtain

examples/abc/c.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011-2013 Splunk, Inc.
1+
# Copyright 2011-2014 Splunk, Inc.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"): you may
44
# not use this file except in compliance with the License. You may obtain

examples/analytics/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
#
3-
# Copyright 2011-2013 Splunk, Inc.
3+
# Copyright 2011-2014 Splunk, Inc.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License"): you may
66
# not use this file except in compliance with the License. You may obtain

examples/analytics/input.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
#
3-
# Copyright 2011-2013 Splunk, Inc.
3+
# Copyright 2011-2014 Splunk, Inc.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License"): you may
66
# not use this file except in compliance with the License. You may obtain

examples/analytics/output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
#
3-
# Copyright 2011-2013 Splunk, Inc.
3+
# Copyright 2011-2014 Splunk, Inc.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License"): you may
66
# not use this file except in compliance with the License. You may obtain

examples/analytics/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
#
3-
# Copyright 2011-2013 Splunk, Inc.
3+
# Copyright 2011-2014 Splunk, Inc.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License"): you may
66
# not use this file except in compliance with the License. You may obtain

0 commit comments

Comments
 (0)