splunk / splunk-sdk-python

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

Named parameters (Option) unavailable when using raw_arguments=true #477

Open dominiquevocat opened 2 years ago

dominiquevocat commented 2 years ago

Describe the bug

when a command uses support_rawargs named parameters are not passed. Used to work with splunklib 1.6.12, doesn't seem to work with splunklib 1.7.0

To reproduce

commands.conf: [xx] passauth = true chunked=true supports_rawargs = true local = true

code snippet: @Configuration(local=True) class xx(GeneratingCommand): splunk_server = Option(require=False, default="*" )

results in always being the value "*" and changing it to require=True causes it to fail with "A value for "splunk_server" is required" but it is in the splunk search.

Expected behaviour

Named parameters are available when using raw_arguments = true and the above mentioned settings in commands.conf - i can reproduce it as working with splunklib 1.6.12

Splunk Version: 8.2.5 Deployment: searchhead

SDK Version 1.7.0 Language Version Runtime: Python 3.7.11 OS: RHEL 8

dominiquevocat commented 2 years ago

splunklib 1.6.16 also causes the same issue