Convert /v3/users to flask native dispatching

Convert /v3/users to use flask native dispatching.

The following test changes were required:

* Application Credentials did not have the plural form
  in the JSON Home document. The JSON Home document was
  corrected both in code and in tests.

* Application Credentials "patch" test needed to be
  refactored to look for METHOD_NOT_ALLOWED instead
  of NOT FOUND for invalid/unimplemented methods.
  The "assertValidErrorResponse" method was
  insufficient and the test now uses the flask
  test_client mechanism instead.

Change-Id: Iedaf405d11450b11e2d1fcdfae45ccb8eeb6f255
Partial-Bug: #1776504
This commit is contained in:
Morgan Fainberg
2018-10-08 14:40:56 -07:00
parent f872a40290
commit 86f968163e
21 changed files with 769 additions and 850 deletions

View File

@@ -24,13 +24,10 @@ import routes
import werkzeug.wsgi
import keystone.api
from keystone.application_credential import routers as app_cred_routers
from keystone.assignment import routers as assignment_routers
from keystone.common import wsgi as keystone_wsgi
from keystone.contrib.ec2 import routers as ec2_routers
from keystone.contrib.s3 import routers as s3_routers
from keystone.identity import routers as identity_routers
from keystone.oauth1 import routers as oauth1_routers
from keystone.resource import routers as resource_routers
# TODO(morgan): _MOVED_API_PREFIXES to be removed when the legacy dispatch
@@ -57,6 +54,7 @@ _MOVED_API_PREFIXES = frozenset(
'roles',
'services',
'system',
'users',
]
)
@@ -64,10 +62,7 @@ LOG = log.getLogger(__name__)
ALL_API_ROUTERS = [assignment_routers,
identity_routers,
app_cred_routers,
resource_routers,
oauth1_routers,
ec2_routers,
s3_routers]