Skip to content

Commit 8d5c666

Browse files
author
David Noble
committed
Unit test improvements + Configuration settings bug fixes
+ All in-isolation tests--those tests that don't run against splunk--are complete + All configuration settings are consistent with Commands.conf.spec.xslx + Commands.conf.spec.xslx has been handed off to Matt for user documentation
1 parent 160a1ba commit 8d5c666

25 files changed

+946
-75
lines changed

examples/searchcommands_app/bin/simulate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
dispatch, GeneratingCommand, Configuration, Option, validators
2424

2525

26-
@Configuration(streaming=True)
26+
@Configuration()
2727
class SimulateCommand(GeneratingCommand):
2828
""" Generates a sequence of events drawn from a CSV file using repeated
2929
random sampling
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

examples/searchcommands_scaffolding/default/commands.conf renamed to examples/searchcommands_template/default/commands.conf

File renamed without changes.

examples/searchcommands_scaffolding/default/data/ui/nav/default.xml renamed to examples/searchcommands_template/default/data/ui/nav/default.xml

File renamed without changes.

examples/searchcommands_scaffolding/default/logging.conf renamed to examples/searchcommands_template/default/logging.conf

File renamed without changes.

splunklib/searchcommands/generating_command.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,24 +125,22 @@ def retainsevents(self):
125125
"""
126126
return type(self)._retainsevents
127127

128-
_retainsevents = False
128+
_retainsevents = True
129129

130130
@property
131131
def streaming(self):
132-
""" Specifies whether this search command is streamable
132+
""" Specifies that this command is streamable
133133
134134
By default streamable search commands may be run on the search head
135135
or one or more indexers, depending on performance and scheduling
136136
considerations. This behavior may be overridden by setting
137137
`local=True`. This forces a streamable command to be run on the
138138
search head.
139139
140-
Default: False.
140+
Fixed: True.
141141
142142
"""
143-
return type(self)._streaming
144-
145-
_streaming = False
143+
return True
146144

147145
#endregion
148146

splunklib/searchcommands/reporting_command.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,23 @@ class ConfigurationSettings(SearchCommand.ConfigurationSettings):
9292
9393
"""
9494
#region Properties
95+
@property
96+
def clear_required_fields(self):
97+
""" Specifies whether `required_fields` are the only fields required
98+
by subsequent commands
99+
100+
If `True`, `required_fields` are the *only* fields required by
101+
subsequent commands. If `False`, required_fields are additive to any
102+
fields that may be required by subsequent commands. In most cases
103+
`False` is appropriate for streaming commands and `True` is
104+
appropriate for reporting commands.
105+
106+
Default: True
107+
108+
"""
109+
return type(self)._clear_required_fields
110+
111+
_clear_required_fields = True
95112

96113
@property
97114
def requires_preop(self):

0 commit comments

Comments
 (0)