Skip to content

Commit

Permalink
removed comments and updated changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
ashah-splunk committed Sep 12, 2022
1 parent 137a0ef commit ea198c0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Version 1.7.2

### Minor changes
* [#482](https://github.com/splunk/splunk-sdk-python/pull/482) updated version checks for enabling v2 search APIs
* [#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

## Version 1.7.1

Expand Down
6 changes: 0 additions & 6 deletions splunklib/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,6 @@ def parse(self, query, **kwargs):
:type kwargs: ``dict``
:return: A semantic map of the parsed search query.
"""
# if self.splunk_version >= (9,0,2):
if not self.disable_v2_api:
return self.post("search/v2/parser", q=query, **kwargs)
return self.get("search/parser", q=query, **kwargs)
Expand Down Expand Up @@ -2740,7 +2739,6 @@ def __init__(self, service, sid, **kwargs):
# Default to v2 in Splunk Version 9+
path = "{path}{sid}"
# Formatting path based on the Splunk Version
#if service.splunk_version < (9,0,2):
if service.disable_v2_api:
path = path.format(path=PATH_JOBS, sid=sid)
else:
Expand Down Expand Up @@ -2801,7 +2799,6 @@ def events(self, **kwargs):
kwargs['segmentation'] = kwargs.get('segmentation', 'none')

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

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

# Search API v1(GET) and v2(POST)
# if self.service.splunk_version < (9,0,2):
if self.service.disable_v2_api:
return self.get("results_preview", **query_params).body
return self.post("results_preview", **query_params).body
Expand Down Expand Up @@ -3033,7 +3028,6 @@ class Jobs(Collection):
collection using :meth:`Service.jobs`."""
def __init__(self, service):
# Splunk 9 introduces the v2 endpoint
# if service.splunk_version >= (9,0,2):
if not service.disable_v2_api:
path = PATH_JOBS_V2
else:
Expand Down

0 comments on commit ea198c0

Please sign in to comment.