Remove unused functions from api/extensions.py

Change-Id: I0fb453669df4cd167e5c1c484a3e1f84dbd6b1ec
This commit is contained in:
dongdongpei 2017-11-17 18:46:53 +08:00
parent ca1b09967d
commit 79e4e167cb
1 changed files with 0 additions and 15 deletions

View File

@ -128,9 +128,6 @@ class ExtensionManager(object):
self.extensions = {}
self._load_extensions()
def is_loaded(self, alias):
return alias in self.extensions
def register(self, ext):
# Do nothing if the extension doesn't check out
if not self._check_extension(ext):
@ -340,15 +337,3 @@ def extension_authorizer(api_name, extension_name):
act = '%s_extension:%s:%s' % (api_name, extension_name, action)
manila.policy.enforce(context, act, target)
return authorize
def soft_extension_authorizer(api_name, extension_name):
hard_authorize = extension_authorizer(api_name, extension_name)
def authorize(context):
try:
hard_authorize(context)
return True
except exception.NotAuthorized:
return False
return authorize