Merge "Remove unused argument v3mode"

This commit is contained in:
Jenkins 2016-04-04 11:03:39 +00:00 committed by Gerrit Code Review
commit 4f2096dba8
1 changed files with 2 additions and 7 deletions

View File

@ -340,12 +340,10 @@ class APIRouterV21(base_wsgi.Router):
def api_extension_namespace(): def api_extension_namespace():
return 'nova.api.v21.extensions' return 'nova.api.v21.extensions'
def __init__(self, init_only=None, v3mode=False): def __init__(self, init_only=None):
# TODO(cyeoh): bp v3-api-extension-framework. Currently load # TODO(cyeoh): bp v3-api-extension-framework. Currently load
# all extensions but eventually should be able to exclude # all extensions but eventually should be able to exclude
# based on a config file # based on a config file
# TODO(oomichi): We can remove v3mode argument after moving all v3 APIs
# to v2.1.
def _check_load_extension(ext): def _check_load_extension(ext):
if (self.init_only is None or ext.obj.alias in if (self.init_only is None or ext.obj.alias in
self.init_only) and isinstance(ext.obj, self.init_only) and isinstance(ext.obj,
@ -388,10 +386,7 @@ class APIRouterV21(base_wsgi.Router):
invoke_on_load=True, invoke_on_load=True,
invoke_kwds={"extension_info": self.loaded_extension_info}) invoke_kwds={"extension_info": self.loaded_extension_info})
if v3mode: mapper = ProjectMapper()
mapper = PlainMapper()
else:
mapper = ProjectMapper()
self.resources = {} self.resources = {}