Adds the PATCH method to extensions

The URLs registered in extensions support methods like
POST, PUT, GET, DELETE but do not support PATCH method.

Added the PATCH method extensions to the supported
method by via "edit" action.

Change-Id: I7f2386010ab01309cf04084a1f9930fcac478d07
Closes-Bug: #1467500
This commit is contained in:
Sushil Kumar 2015-06-22 12:48:18 +00:00 committed by Sushil Kumar
parent 67b68a9bcc
commit 1cff63bd16
1 changed files with 5 additions and 0 deletions

View File

@ -545,6 +545,11 @@ class TroveExtensionMiddleware(ExtensionMiddleware):
mapper.resource(resource_ext.collection,
resource_ext.collection, **kargs)
mapper.connect(("/%s/{id}" % resource_ext.collection),
controller=controller_resource,
action='edit',
conditions={'method': ['PATCH']})
# extended actions
action_resources = self._action_ext_resources(application, ext_mgr,
mapper)