Closed vergeev closed 1 year ago
Hi Pavel,
I think this is reasonable. The UserAlreadyExists
goes back at least to the 12.x.x version of Ceph as the exception in the code. Please provide a pull request and I will be happy to merge.
Here's the PR: https://github.com/UMIACS/rgwadmin/pull/67. Please let me know if you want me to add anything.
This was released as part of https://github.com/UMIACS/rgwadmin/releases/tag/2.4.4 and is available on PyPI now.
Steps to reproduce:
Expected result: the last line throws
rgwadmin.exceptions.UserExists
.Actual result: the last line throws
rgwadmin.exceptions.RGWAdminException
withcode="UserAlreadyExists"
.Why I think this is happening: the docs say the error response is
UserExists
, but the rgw code actually producesUserAlreadyExists
.Solution I propose:
UserAlreadyExists
exception, replace with itUserExists
here: https://github.com/UMIACS/rgwadmin/blob/4f90b6a53d680abd441f52606c2317719d2fe06d/rgwadmin/rgw.py#L131UserExists
an alias ofUserAlreadyExists
in order to maintain backwards compatibility.Can I go ahead and open a pull request with a fix?