Skip to content

Commit

Permalink
Merge "Remove the inherits parameter for the Resource object"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Jan 31, 2018
2 parents d6cd6f1 + 4e00999 commit c1442d3
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions nova/api/openstack/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,13 +438,9 @@ class Resource(wsgi.Application):
"""
support_api_request_version = True

def __init__(self, controller, inherits=None):
def __init__(self, controller):
""":param controller: object that implement methods created by routes
lib
:param inherits: another resource object that this resource should
inherit extensions from. Any action extensions that
are applied to the parent resource will also apply
to this resource.
"""

self.controller = controller
Expand All @@ -459,7 +455,6 @@ def __init__(self, controller, inherits=None):
# Save a mapping of extensions
self.wsgi_extensions = {}
self.wsgi_action_extensions = {}
self.inherits = inherits

def register_actions(self, controller):
"""Registers controller actions with this resource."""
Expand Down Expand Up @@ -696,12 +691,6 @@ def get_method(self, request, action, content_type, body):
action,
content_type,
body)
if self.inherits:
_meth, parent_ext = self.inherits.get_method(request,
action,
content_type,
body)
extensions.extend(parent_ext)
return meth, extensions

def _get_method(self, request, action, content_type, body):
Expand Down

0 comments on commit c1442d3

Please sign in to comment.