-
Notifications
You must be signed in to change notification settings - Fork 385
Closed
Description
When trying to create a role and assign default properties, the response is: splunklib.binding.HTTPError: HTTP 404 Not Found -- Could not find object id=XXXXXXXX
However, the role appears to have been created correctly.
To Reproduce
>>> import splunklib.client as client
>>> service = client.connect(host="XXXXXXXX", port=8089, username="XXXXXXXX", password="XXXXXXXX", token=None, app="search")
>>> service.roles.create("bugreport-role-name", imported_roles=["XXXXXXXX"], srchIndexesAllowed=["XXXXXXXX"])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/conor/Code/splunk/.env_python3.6/lib/python3.6/site-packages/splunklib/client.py", line 3510, in create
response = self.get(name)
File "/home/conor/Code/splunk/.env_python3.6/lib/python3.6/site-packages/splunklib/client.py", line 1668, in get
return super(Collection, self).get(name, owner, app, sharing, **query)
File "/home/conor/Code/splunk/.env_python3.6/lib/python3.6/site-packages/splunklib/client.py", line 766, in get
**query)
File "/home/conor/Code/splunk/.env_python3.6/lib/python3.6/site-packages/splunklib/binding.py", line 290, in wrapper
return request_fun(self, *args, **kwargs)
File "/home/conor/Code/splunk/.env_python3.6/lib/python3.6/site-packages/splunklib/binding.py", line 71, in new_f
val = f(*args, **kwargs)
File "/home/conor/Code/splunk/.env_python3.6/lib/python3.6/site-packages/splunklib/binding.py", line 686, in get
response = self.http.get(path, all_headers, **query)
File "/home/conor/Code/splunk/.env_python3.6/lib/python3.6/site-packages/splunklib/binding.py", line 1194, in get
return self.request(url, { 'method': "GET", 'headers': headers })
File "/home/conor/Code/splunk/.env_python3.6/lib/python3.6/site-packages/splunklib/binding.py", line 1255, in request
raise HTTPError(response)
splunklib.binding.HTTPError: HTTP 404 Not Found -- Could not find object id=bugreport-role-name
Expected behavior
No error and the Role is returned.
Splunk:
- Version: 8.0.3
- OS: Ubuntu 20.04
- Deployment: Distributed
SDK:
- Version: 1.6.14
- Language Runtime Version: Python 3.6
- OS: Ubuntu 20.04
Additional context
Pretty sure this also happens when creating users too. And some other resources
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels