@@ -56,7 +56,7 @@ class GeneratingCommand(SearchCommand):
5656 +==========+=====================================+============================================+
5757 | streams | streaming=True[,local=[True|False]] | type='streaming'[,distributed=[true|false] |
5858 +----------+-------------------------------------+--------------------------------------------+
59- | events | retainsevents=True, streaming=False | type='eventing' |
59+ | events | retainsevents=True, streaming=False | type='events' |
6060 +----------+-------------------------------------+--------------------------------------------+
6161 | reports | streaming=False | type='reporting' |
6262 +----------+-------------------------------------+--------------------------------------------+
@@ -112,7 +112,7 @@ class StreamingGeneratingCommand(GeneratingCommand)
112112 | | settings to your command class: | setting to your command class: |
113113 | | | |
114114 | | .. code-block:: python | .. code-block:: python |
115- | | @Configuration( | @Configuration(type='eventing') |
115+ | | @Configuration( | @Configuration(type='events') |
116116 | | retainsevents=True, streaming=False) | class SomeCommand(GeneratingCommand) |
117117 | | class SomeCommand(GeneratingCommand) | ... |
118118 | | ... | |
@@ -127,7 +127,7 @@ class StreamingGeneratingCommand(GeneratingCommand)
127127 Configure your command class like this, if you wish to support both protocols:
128128
129129 .. code-block:: python
130- @Configuration(type='eventing ', retainsevents=True, streaming=False)
130+ @Configuration(type='events ', retainsevents=True, streaming=False)
131131 class SomeCommand(GeneratingCommand)
132132 ...
133133
@@ -193,6 +193,18 @@ def _execute(self, ifile, process):
193193 :return: `None`.
194194
195195 """
196+ if self ._protocol_version == 2 :
197+ result = self ._read_chunk (ifile )
198+
199+ if not result :
200+ return
201+
202+ metadata , body = result
203+ action = getattr (metadata , 'action' , None )
204+
205+ if action != 'execute' :
206+ raise RuntimeError ('Expected execute action, not {}' .format (action ))
207+
196208 self ._record_writer .write_records (self .generate ())
197209 self .finish ()
198210
@@ -280,7 +292,7 @@ class ConfigurationSettings(SearchCommand.ConfigurationSettings):
280292 ==================== ======================================================================================
281293 Value Description
282294 -------------------- --------------------------------------------------------------------------------------
283- :const:`'eventing'` Runs as the first command in the Splunk events pipeline. Cannot be distributed.
295+ :const:`'events'` Runs as the first command in the Splunk events pipeline. Cannot be distributed.
284296 :const:`'reporting'` Runs as the first command in the Splunk reports pipeline. Cannot be distributed.
285297 :const:`'streaming'` Runs as the first command in the Splunk streams pipeline. May be distributed.
286298 ==================== ======================================================================================
0 commit comments