Skip to content

Commit ea198c0

Browse files
committed
removed comments and updated changelog
1 parent 137a0ef commit ea198c0

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Version 1.7.2
44

55
### Minor changes
6-
* [#482](https://github.com/splunk/splunk-sdk-python/pull/482) updated version checks for enabling v2 search APIs
6+
* [#482](https://github.com/splunk/splunk-sdk-python/pull/482) Special handling related to the semantic versioning of specific Search APIs functional in Splunk Enterprise 9.0.2 and (Splunk Cloud 9.0.2209). These SDK changes will enable seamless transition between the APIs based on the version of the Splunk Enterprise in use
77

88
## Version 1.7.1
99

splunklib/client.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,6 @@ def parse(self, query, **kwargs):
573573
:type kwargs: ``dict``
574574
:return: A semantic map of the parsed search query.
575575
"""
576-
# if self.splunk_version >= (9,0,2):
577576
if not self.disable_v2_api:
578577
return self.post("search/v2/parser", q=query, **kwargs)
579578
return self.get("search/parser", q=query, **kwargs)
@@ -2740,7 +2739,6 @@ def __init__(self, service, sid, **kwargs):
27402739
# Default to v2 in Splunk Version 9+
27412740
path = "{path}{sid}"
27422741
# Formatting path based on the Splunk Version
2743-
#if service.splunk_version < (9,0,2):
27442742
if service.disable_v2_api:
27452743
path = path.format(path=PATH_JOBS, sid=sid)
27462744
else:
@@ -2801,7 +2799,6 @@ def events(self, **kwargs):
28012799
kwargs['segmentation'] = kwargs.get('segmentation', 'none')
28022800

28032801
# Search API v1(GET) and v2(POST)
2804-
# if self.service.splunk_version < (9,0,2):
28052802
if self.service.disable_v2_api:
28062803
return self.get("events", **kwargs).body
28072804
return self.post("events", **kwargs).body
@@ -2894,7 +2891,6 @@ def results(self, **query_params):
28942891
query_params['segmentation'] = query_params.get('segmentation', 'none')
28952892

28962893
# Search API v1(GET) and v2(POST)
2897-
# if self.service.splunk_version < (9,0,2):
28982894
if self.service.disable_v2_api:
28992895
return self.get("results", **query_params).body
29002896
return self.post("results", **query_params).body
@@ -2940,7 +2936,6 @@ def preview(self, **query_params):
29402936
query_params['segmentation'] = query_params.get('segmentation', 'none')
29412937

29422938
# Search API v1(GET) and v2(POST)
2943-
# if self.service.splunk_version < (9,0,2):
29442939
if self.service.disable_v2_api:
29452940
return self.get("results_preview", **query_params).body
29462941
return self.post("results_preview", **query_params).body
@@ -3033,7 +3028,6 @@ class Jobs(Collection):
30333028
collection using :meth:`Service.jobs`."""
30343029
def __init__(self, service):
30353030
# Splunk 9 introduces the v2 endpoint
3036-
# if service.splunk_version >= (9,0,2):
30373031
if not service.disable_v2_api:
30383032
path = PATH_JOBS_V2
30393033
else:

0 commit comments

Comments
 (0)