Revert "Raise NotFound error when retrieved by not uuid"
In the early days of OpenStack, user and project ids were not
uuids, but auto-incremented integers.
Since those early days, many operators fought long battles
against the unrelenting OpenStack behemoth.
Only those heroic operators who emerged victorious from the
brutal upgrade battles can show the scars of those integer
user and project ids like badges of honour.
Closes-Bug: #1842004
Change-Id: I0c3e3465e8e7499c94d1a82b7295aeec13955e55
(cherry picked from commit c238b519f3
)
This commit is contained in:
parent
6a6f64860c
commit
5532029bf0
|
@ -20,8 +20,6 @@
|
|||
import collections
|
||||
import logging
|
||||
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
import six
|
||||
|
@ -351,9 +349,6 @@ def is_domain_admin(request):
|
|||
# tenant commands.
|
||||
@profiler.trace
|
||||
def tenant_get(request, project, admin=True):
|
||||
if not uuidutils.is_uuid_like(project):
|
||||
raise keystone_exceptions.NotFound()
|
||||
|
||||
manager = VERSIONS.get_project_manager(request, admin=admin)
|
||||
try:
|
||||
return manager.get(project)
|
||||
|
@ -473,9 +468,6 @@ def user_delete(request, user_id):
|
|||
|
||||
@profiler.trace
|
||||
def user_get(request, user_id, admin=True):
|
||||
if not uuidutils.is_uuid_like(user_id):
|
||||
raise keystone_exceptions.NotFound()
|
||||
|
||||
user = keystoneclient(request, admin=admin).users.get(user_id)
|
||||
return VERSIONS.upgrade_v2_user(user)
|
||||
|
||||
|
|
Loading…
Reference in New Issue