From c78226284255269e87cc21e103b8e5e6b0a014a1 Mon Sep 17 00:00:00 2001 From: Lance Bragstad Date: Tue, 24 Jul 2018 14:32:26 +0000 Subject: [PATCH] Address nits in strict-two-level implementation There were a couple really minor things that needed to be addressed in: https://review.openstack.org/#/c/580331/ This patch addresses those issues. Change-Id: I68d39ef06efef08ed986e6525b13f2d2a09b193c --- keystone/limit/core.py | 2 +- keystone/limit/models/base.py | 7 +++---- releasenotes/notes/bp-strict-two-level-model.yaml | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/keystone/limit/core.py b/keystone/limit/core.py index 6f798dec81..315e69eb80 100644 --- a/keystone/limit/core.py +++ b/keystone/limit/core.py @@ -40,7 +40,7 @@ class Manager(manager.Manager): CONF.unified_limit.enforcement_model) def check_project_depth(self): - """Check project depth if satisfy current enforcement model or not.""" + """Check if project depth satisfies current enforcement model.""" PROVIDERS.resource_api.check_project_depth( self.enforcement_model.MAX_PROJECT_TREE_DEPTH) diff --git a/keystone/limit/models/base.py b/keystone/limit/models/base.py index 1b3aaaf872..a2d5af2d60 100644 --- a/keystone/limit/models/base.py +++ b/keystone/limit/models/base.py @@ -44,10 +44,9 @@ class ModelBase(object): def check_limit(self, limits): """Check the new creating or updating limits if satisfy the model. - :param limits: A list of the limit objects need to be check. - :type limits: A list of the limits. Each limit is a dict that contains - "resource_limit", "resource_name", "project_id", "service_id" and - optional "region_id", "description". + :param limits: A list of the limit references to be checked. + :type limits: A list of the limits. Each limit is a dictionary + reference containing all limit attributes. :raises keystone.exception.InvalidLimit: If any of the input limits doesn't satisfy the limit model. diff --git a/releasenotes/notes/bp-strict-two-level-model.yaml b/releasenotes/notes/bp-strict-two-level-model.yaml index bc830c708e..0564bde45c 100644 --- a/releasenotes/notes/bp-strict-two-level-model.yaml +++ b/releasenotes/notes/bp-strict-two-level-model.yaml @@ -9,7 +9,7 @@ features: In this [`model `_]: 1. The project depth is force limited to 2 level. - 2. Any child project's limit can not exceed his parent's. + 2. Any child project's limit can not exceed the parent's. Please ensure that the previous project and limit structure deployment in your Keystone won't break this model before starting to use it. @@ -18,7 +18,7 @@ features: `403 Forbidden` error will be raised. When try to use this model but the project depth exceed 2 already, Keystone - process will fail to start. Operators should chose another available model + process will fail to start. Operators should choose another available model to fix the issue first. - >