splunk / splunk-sdk-python

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

`service.storage_passwords.list` misses space in `username` field #400

Closed ghost closed 2 years ago

ghost commented 3 years ago

Describe the bug service.storage_passwords.list misses space in username field.

To Reproduce Steps to reproduce the behavior:

  1. Install https://splunkbase.splunk.com/app/2731/
  2. Add
    [ test]
    account_name = ucspe
    account_password = ucspe
    disable_ssl_verification = True
    server_url = 10.141.36.107

    to local/splunk_ta_cisco_ucs_servers.conf.

  3. Go to Splunk, open Cisco UCS app and refresh the page.
  4. Run this Python script
    
    from splunklib.client import connect

service = connect(username="admin", password="")

all_passwords = service.storage_passwords.list(count=-1, search="")

for p in all_passwords: print(p.state)


5. See that username field does not have space, but the stanza that we add in step 2 has.

**Expected behavior**
Username field should have space in it.

**Splunk (please complete the following information):**
- Version: 8.2.2.1
- OS: MacOS 11.6
- Deployment: single-instance

**SDK (please complete the following information):**
 - Version: 1.6.16
 - Language Runtime Version: Python 3.7
 - OS: MacOS 11.6
akaila-splunk commented 2 years ago

Hi @arys-splunk , We have fixed the issue, and the changes will be available in the next release. PR for reference - #416

ashah-splunk commented 2 years ago

@arys-splunk please refer the latest python-sdk release 1.6.19, and please let us know if the issue still exists.