Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion examples/searchcommands_app/package/default/searchbnf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ comment1 = \
example1 = \
| generatetext text="Hello world! How the heck are you?" count=6 \
| filter predicate="(long(_serial) & 1) == 0" map="_raw = _raw.replace('world', 'Splunk')"
category = eventing
category = events
appears-in = 1.5
maintainer = dnoble
usage = public
Expand Down
4 changes: 2 additions & 2 deletions splunklib/searchcommands/eventing_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ class ConfigurationSettings(SearchCommand.ConfigurationSettings):

''')

type = ConfigurationSetting(readonly=True, value='eventing', doc='''
type = ConfigurationSetting(readonly=True, value='events', doc='''
Command type

Fixed: :const:`'eventing'`.
Fixed: :const:`'events'`.

Supported by: SCP 2

Expand Down
8 changes: 4 additions & 4 deletions splunklib/searchcommands/generating_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class GeneratingCommand(SearchCommand):
+==========+=====================================+============================================+
| streams | streaming=True[,local=[True|False]] | type='streaming'[,distributed=[true|false] |
+----------+-------------------------------------+--------------------------------------------+
| events | retainsevents=True, streaming=False | type='eventing' |
| events | retainsevents=True, streaming=False | type='events' |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this just a typo on our end?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope..not a type..we were actually expecting 'eventing', whereas in splunk code we were expecting 'events'.

+----------+-------------------------------------+--------------------------------------------+
| reports | streaming=False | type='reporting' |
+----------+-------------------------------------+--------------------------------------------+
Expand Down Expand Up @@ -112,7 +112,7 @@ class StreamingGeneratingCommand(GeneratingCommand)
| | settings to your command class: | setting to your command class: |
| | | |
| | .. code-block:: python | .. code-block:: python |
| | @Configuration( | @Configuration(type='eventing') |
| | @Configuration( | @Configuration(type='events') |
| | retainsevents=True, streaming=False) | class SomeCommand(GeneratingCommand) |
| | class SomeCommand(GeneratingCommand) | ... |
| | ... | |
Expand All @@ -127,7 +127,7 @@ class StreamingGeneratingCommand(GeneratingCommand)
Configure your command class like this, if you wish to support both protocols:

.. code-block:: python
@Configuration(type='eventing', retainsevents=True, streaming=False)
@Configuration(type='events', retainsevents=True, streaming=False)
class SomeCommand(GeneratingCommand)
...

Expand Down Expand Up @@ -280,7 +280,7 @@ class ConfigurationSettings(SearchCommand.ConfigurationSettings):
==================== ======================================================================================
Value Description
-------------------- --------------------------------------------------------------------------------------
:const:`'eventing'` Runs as the first command in the Splunk events pipeline. Cannot be distributed.
:const:`'events'` Runs as the first command in the Splunk events pipeline. Cannot be distributed.
:const:`'reporting'` Runs as the first command in the Splunk reports pipeline. Cannot be distributed.
:const:`'streaming'` Runs as the first command in the Splunk streams pipeline. May be distributed.
==================== ======================================================================================
Expand Down
2 changes: 1 addition & 1 deletion splunklib/searchcommands/internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def validate_configuration_setting(specification, name, value):
supporting_protocols=[1, 2]),
'type': specification(
type=(bytes, unicode),
constraint=lambda value: value in ('eventing', 'reporting', 'streaming'),
constraint=lambda value: value in ('events', 'reporting', 'streaming'),
supporting_protocols=[2])}


Expand Down
2 changes: 1 addition & 1 deletion tests/searchcommands/test_configuration_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def stream(self, records):
command.configuration.required_fields = ['field_1', 'field_2', 'field_3']

try:
command.configuration.type = 'eventing'
command.configuration.type = 'events'
except AttributeError:
pass
except Exception as error:
Expand Down
4 changes: 2 additions & 2 deletions tests/searchcommands/test_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ def fix_up(cls, command_class):
('some unicode string', b'some byte string'),
(None, 0xdead)),
('type',
('eventing', 'reporting', 'streaming', b'eventing', b'reporting', b'streaming'),
('events', 0xdead))):
('events', 'reporting', 'streaming', b'events', b'reporting', b'streaming'),
('eventing', 0xdead))):

for value in values:

Expand Down