splunk / splunk-sdk-python

Splunk Software Development Kit for Python
http://dev.splunk.com
Apache License 2.0
698 stars 370 forks source link

KV Store Collection API - dict Type Issue #356

Closed malvidin closed 3 years ago

malvidin commented 4 years ago

Describe the bug The **query in KV Store Data API functions have an error in typing or in usage in the function. https://github.com/splunk/splunk-sdk-python/blob/9f6b2e041e7e4d09c70cc32c02d25c694842bce7/splunklib/client.py#L3633 https://github.com/splunk/splunk-sdk-python/blob/9f6b2e041e7e4d09c70cc32c02d25c694842bce7/splunklib/client.py#L3643

To Reproduce Use the KVStoreCollectionData query with the dict type prescribed in the docstrings collection.data.query(query={"id": {"$gt": 24}}) or collection.data.query({"id": {"$gt": 24}})

Expected behavior The previous queries should succeed, as documented. https://docs.splunk.com/Documentation/Splunk/8.1.0/RESTREF/RESTkvstore

Splunk Version

splunklib Version

akaila-splunk commented 3 years ago

Hi @malvidin , Thanks for bringing it up. We have considered your suggestion and added dictionary support for KVStore "query" methods. Also updated the KVStore example file for reference. Changes will be available in the next release.

ashah-splunk commented 3 years ago

Hi @malvidin , we have a new SDK release 1.6.17 with the proposed changes. Would request you to try with the latest SDK version. Let us know in case if you face any issue with the change implemented.