Remove comments on API policy, remove core param

After e03cfed720
the comments are not corrected , so this patch
removes old comments for temporary usage.

Also, removes 'core' param because there is no
core or extension at all.

Partially implements bp v3-api-policy

Change-Id: I09eda7c8462fc658b063901080371d9ffb030dc8
This commit is contained in:
jichenjc 2015-03-20 05:13:39 +08:00
parent 37a6c601f3
commit 5924fa4d7d
2 changed files with 4 additions and 11 deletions

View File

@ -54,7 +54,7 @@ CONF.import_opt('extensions_blacklist', 'nova.api.openstack', group='osapi_v3')
CONF.import_opt('extensions_whitelist', 'nova.api.openstack', group='osapi_v3')
LOG = logging.getLogger(__name__)
authorize = extensions.os_compute_authorizer(ALIAS, True)
authorize = extensions.os_compute_authorizer(ALIAS)
class ServersController(wsgi.Controller):

View File

@ -385,21 +385,14 @@ def check_compute_policy(context, action, target, scope='compute'):
# NOTE(alex_xu): The functions os_compute_authorizer and
# os_compute_soft_authorizer are used to policy enforcement for Openstack
# Compute API, now Nova V2.1 REST API will invoke it. Currently this function
# still uses the old policy rule name style as below:
# core api: 'compute:v3:[extension]:[action]'
# extension api: 'compute_extension:v3:[extension]:[action]'
# Compute API, now Nova V2.1 REST API will invoke it.
#
# After the policy cleanup is finished, the policy rule name will be renamed
# to 'os_compute_api:[extension]:[action]'. And the parameter 'core' will be
# deleted, because there isn't distinguish between core or extension API in
# the future.
def os_compute_authorizer(extension_name, core=False):
def os_compute_authorizer(extension_name):
return core_authorizer('os_compute_api', extension_name)
def os_compute_soft_authorizer(extension_name, core=False):
def os_compute_soft_authorizer(extension_name):
return soft_core_authorizer('os_compute_api', extension_name)