Deleting a User Associated with a Reservation #1459
Quali-Community
started this conversation in
Idea Box
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Opening on behalf of Customer...(Re. Support Ticket 49972)
Customer has thousands upon thousands of stale users' in the database that need to be removed.
Currently, Customer will use the "DeleteUser" API to delete users, but 99.9 percent of the time get the following result:
Result:
>>> test = cs_session.DeleteUser(username)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.9/site-packages/cloudshell/api/cloudshell_api.py", line 2688, in DeleteUser
return self.generateAPIRequest(OrderedDict([('method_name', 'DeleteUser'), ('username', username)]))
File "/usr/local/lib/python3.9/site-packages/cloudshell/api/common_cloudshell_api.py", line 434, in generateAPIRequest
result = self._handle_api_response(self._sendRequest(method_name, message))
File "/usr/local/lib/python3.9/site-packages/cloudshell/api/common_cloudshell_api.py", line 449, in _handle_api_response
raise CloudShellAPIError(api_response.error_code, api_response.error, response_str)
cloudshell.api.common_cloudshell_api.CloudShellAPIError: CloudShell API error 100: User named <username> currently owns reservations/topologies.
Customer then will need to find the reservation / reservation ID via Portal to find what reservation the user is associated with. Once found, they will use the "DeleteReservation" API to delete the reservation and then be able to successfully delete the stale user.
ASK: need to be able to delete stale users for the purposes of data security and retention easier, with minimal steps. Can we delete the User and Reservation in one step?
Recording of the issue in in the Support Ticket.
Jason Roager ([email protected]) - 03/24/2022 06:22 PM
· 5623 ·
Beta Was this translation helpful? Give feedback.
All reactions