@@ -572,7 +572,7 @@ def parse(self, query, **kwargs):
572572 :type kwargs: ``dict``
573573 :return: A semantic map of the parsed search query.
574574 """
575- if self .splunk_version >= (9 ,):
575+ if self .splunk_version >= (9 ,0 , 2 ):
576576 return self .post ("search/v2/parser" , q = query , ** kwargs )
577577 return self .get ("search/parser" , q = query , ** kwargs )
578578
@@ -2722,7 +2722,7 @@ def __init__(self, service, sid, **kwargs):
27222722 # Default to v2 in Splunk Version 9+
27232723 path = "{path}{sid}"
27242724 # Formatting path based on the Splunk Version
2725- if service .splunk_version < (9 ,):
2725+ if service .splunk_version < (9 ,0 , 2 ):
27262726 path = path .format (path = PATH_JOBS , sid = sid )
27272727 else :
27282728 path = path .format (path = PATH_JOBS_V2 , sid = sid )
@@ -2782,7 +2782,7 @@ def events(self, **kwargs):
27822782 kwargs ['segmentation' ] = kwargs .get ('segmentation' , 'none' )
27832783
27842784 # Search API v1(GET) and v2(POST)
2785- if self .service .splunk_version < (9 ,):
2785+ if self .service .splunk_version < (9 ,0 , 2 ):
27862786 return self .get ("events" , ** kwargs ).body
27872787 return self .post ("events" , ** kwargs ).body
27882788
@@ -2874,7 +2874,7 @@ def results(self, **query_params):
28742874 query_params ['segmentation' ] = query_params .get ('segmentation' , 'none' )
28752875
28762876 # Search API v1(GET) and v2(POST)
2877- if self .service .splunk_version < (9 ,):
2877+ if self .service .splunk_version < (9 ,0 , 2 ):
28782878 return self .get ("results" , ** query_params ).body
28792879 return self .post ("results" , ** query_params ).body
28802880
@@ -2919,7 +2919,7 @@ def preview(self, **query_params):
29192919 query_params ['segmentation' ] = query_params .get ('segmentation' , 'none' )
29202920
29212921 # Search API v1(GET) and v2(POST)
2922- if self .service .splunk_version < (9 ,):
2922+ if self .service .splunk_version < (9 ,0 , 2 ):
29232923 return self .get ("results_preview" , ** query_params ).body
29242924 return self .post ("results_preview" , ** query_params ).body
29252925
@@ -3011,7 +3011,7 @@ class Jobs(Collection):
30113011 collection using :meth:`Service.jobs`."""
30123012 def __init__ (self , service ):
30133013 # Splunk 9 introduces the v2 endpoint
3014- if service .splunk_version >= (9 ,):
3014+ if service .splunk_version >= (9 ,0 , 2 ):
30153015 path = PATH_JOBS_V2
30163016 else :
30173017 path = PATH_JOBS
0 commit comments