From 5532029bf02543a83450d86e7453e181d5ca43a7 Mon Sep 17 00:00:00 2001 From: Andy Botting Date: Wed, 21 Aug 2019 08:35:57 +1000 Subject: [PATCH] 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 c238b519f3e10ba6aa119b5ebc2bf30b2610bf16) --- openstack_dashboard/api/keystone.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/openstack_dashboard/api/keystone.py b/openstack_dashboard/api/keystone.py index e99f8c1ba3..c2fdc51b28 100644 --- a/openstack_dashboard/api/keystone.py +++ b/openstack_dashboard/api/keystone.py @@ -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)