Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Fix some issues
This fixes some issues pointed out by @ansman and
@holdensmagicalunicorn.

Fixes issues #1, #3, #4, #5
  • Loading branch information
itay committed Nov 1, 2011
commit f002516371e8a1fa18e62c5a5a0d6732d7bcf38e
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ command line, for example:
password=changeme

The `.splunkrc` file is a feature of the SDK examples and unit tests and not
the Splunk platform or SDK libraries and is indended simply as convenience for
the Splunk platform or SDK libraries and is intended simply as convenience for
developers using the SDK.

The `.splunkrc` file should not be used for storing user credentials for apps
Expand Down
5 changes: 3 additions & 2 deletions splunk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,12 +557,13 @@ def summary(self, **kwargs):
def timeline(self, **kwargs):
return self.get("timeline", **kwargs).body

def touch(self,):
def touch(self):
self.post("control", action="touch")
return self

def setttl(self, value):
def set_ttl(self, value):
self.post("control", action="setttl", ttl=value)
return self

def unpause(self):
self.post("control", action="unpause")
Expand Down
2 changes: 1 addition & 1 deletion tests/splunk.baseline
Original file line number Diff line number Diff line change
@@ -1 +1 @@
['__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', '__version__', '__version_info__', 'binding', 'data']
['__builtins__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__version__', '__version_info__', 'binding', 'data']
2 changes: 1 addition & 1 deletion tests/splunk.binding.baseline
Original file line number Diff line number Diff line change
@@ -1 +1 @@
['Context', 'DEFAULT_HOST', 'DEFAULT_PORT', 'DEFAULT_SCHEME', 'HTTPError', 'HttpLib', 'ResponseReader', 'XML', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 'connect', 'encode', 'handler', 'httplib', 'prefix', 'read_error_message', 'record', 'socket', 'spliturl', 'ssl', 'urllib']
['Context', 'DEFAULT_HOST', 'DEFAULT_PORT', 'DEFAULT_SCHEME', 'HTTPError', 'HttpLib', 'ResponseReader', 'XML', '__all__', '__builtins__', '__doc__', '__file__', '__loader__', '__name__', '__package__', 'connect', 'encode', 'handler', 'httplib', 'prefix', 'read_error_message', 'record', 'socket', 'spliturl', 'ssl', 'urllib']
2 changes: 1 addition & 1 deletion tests/splunk.client.baseline
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
['Collection', 'Conf', 'Context', 'Endpoint', 'Entity', 'HTTPError', 'INPUT_KINDMAP', 'Index', 'Input', 'Inputs', 'Job', 'Jobs', 'MATCH_ENTRY_CONTENT', 'Message', 'NotSupportedError', 'PATH_APPS', 'PATH_CAPABILITIES', 'PATH_CONF', 'PATH_CONFS', 'PATH_INDEXES', 'PATH_INPUTS', 'PATH_JOBS', 'PATH_LOGGER', 'PATH_MESSAGES', 'PATH_ROLES', 'PATH_STANZA', 'PATH_USERS', 'Service', 'SplunkError', 'XNAMEF_ATOM', 'XNAME_CONTENT', 'XNAME_ENTRY', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '_filter_content', '_path_stanza', 'connect', 'data', 'load', 'quote_plus', 'record', 'sleep', 'urlencode', 'urlparse']
['Collection', 'Conf', 'Context', 'Endpoint', 'Entity', 'HTTPError', 'INPUT_KINDMAP', 'Index', 'Input', 'Inputs', 'Job', 'Jobs', 'MATCH_ENTRY_CONTENT', 'Message', 'NotSupportedError', 'PATH_APPS', 'PATH_CAPABILITIES', 'PATH_CONF', 'PATH_CONFS', 'PATH_INDEXES', 'PATH_INPUTS', 'PATH_JOBS', 'PATH_LOGGER', 'PATH_MESSAGES', 'PATH_ROLES', 'PATH_STANZA', 'PATH_USERS', 'Service', 'SplunkError', 'XNAMEF_ATOM', 'XNAME_CONTENT', 'XNAME_ENTRY', '__all__', '__builtins__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '_filter_content', '_path_stanza', 'connect', 'data', 'load', 'quote_plus', 'record', 'sleep', 'urlencode', 'urlparse']

2 changes: 1 addition & 1 deletion tests/splunk.data.baseline
Original file line number Diff line number Diff line change
@@ -1 +1 @@
['LNAME_DICT', 'LNAME_ITEM', 'LNAME_KEY', 'LNAME_LIST', 'Record', 'XML', 'XNAMEF_REST', 'XNAME_DICT', 'XNAME_ITEM', 'XNAME_KEY', 'XNAME_LIST', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 'hasattrs', 'isdict', 'isitem', 'iskey', 'islist', 'load', 'load_attrs', 'load_dict', 'load_elem', 'load_list', 'load_root', 'load_value', 'localname', 'record', 'sys']
['LNAME_DICT', 'LNAME_ITEM', 'LNAME_KEY', 'LNAME_LIST', 'Record', 'XML', 'XNAMEF_REST', 'XNAME_DICT', 'XNAME_ITEM', 'XNAME_KEY', 'XNAME_LIST', '__all__', '__builtins__', '__doc__', '__file__', '__loader__', '__name__', '__package__', 'hasattrs', 'isdict', 'isitem', 'iskey', 'islist', 'load', 'load_attrs', 'load_dict', 'load_elem', 'load_list', 'load_root', 'load_value', 'localname', 'record', 'sys']
2 changes: 1 addition & 1 deletion tests/splunk.results.baseline
Original file line number Diff line number Diff line change
@@ -1 +1 @@
['END', 'ListStream', 'MESSAGE', 'RESULT', 'RESULTS', 'ResultsReader', 'StringIO', 'TAG', 'VAL', 'XMLReader', 'XMLStream', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 'pulldom']
['END', 'ListStream', 'MESSAGE', 'RESULT', 'RESULTS', 'ResultsReader', 'StringIO', 'TAG', 'VAL', 'XMLReader', 'XMLStream', '__all__', '__builtins__', '__doc__', '__file__', '__loader__', '__name__', '__package__', 'pulldom']
2 changes: 1 addition & 1 deletion tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def test_jobs(self):
# Set various properties on it
job.disable_preview()
job.pause()
job.setttl(1000)
job.set_ttl(1000)
job.setpriority(5)
job.touch()

Expand Down