Bug 679549
| Summary: | Need a better error message when trying to create role with the same name as an existing role | ||
|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | Preethi Thomas <pthomas> |
| Component: | z_other | Assignee: | Sayli Karmarkar <skarmark> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | cperry, skarmark |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-08-16 12:07:57 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 647488 | ||
Build: 0.141 fails_qa No error message on duplicate role name [root@preethi ~]# pulp-admin -u admin -p admin role create --role=role123 Role [ role123 ] created [root@preethi ~]# pulp-admin -u admin -p admin role create --role=role123 [root@preethi ~]# $ sudo pulp-admin -u admin -p admin role create --role=role123 PulpException: 'role role123 already exists' verified [root@preethi ~]# pulp-admin role create --role=role123 Role [ role123 ] created [root@preethi ~]# pulp-admin role create --role=role123 PulpException: 'role role123 already exists' Closing with Community Release 15 pulp-0.0.223-4. Closing with Community Release 15 pulp-0.0.223-4. |
Description of problem: [root@preethi ~]# rpm -q pulp pulp-0.0.140-1.fc14.noarch [root@preethi ~]# pulp-admin -u admin -p redhat role create --role=role123 Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/base.py", line 52, in report_error return method(self, *args, **kwargs) File "/usr/lib/python2.7/site-packages/pulp/server/compat.py", line 40, in _decorator return decorator(*args,**kwargs) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/base.py", line 131, in _auth_decorator value = method(self, *args, **kwargs) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/roles.py", line 48, in POST role = authorization.create_role(role_name) File "/usr/lib/python2.7/site-packages/pulp/server/auth/authorization.py", line 354, in create_role return _role_api.create(role_name) File "/usr/lib/python2.7/site-packages/pulp/server/compat.py", line 40, in _decorator return decorator(*args,**kwargs) File "/usr/lib/python2.7/site-packages/pulp/server/auditing.py", line 207, in _audit result = method(*args, **kwargs) File "/usr/lib/python2.7/site-packages/pulp/server/api/role.py", line 42, in create raise PulpException('role %s already exists' % name) PulpException: 'role role123 already exists'