From b8e8a8b55071f13be89d282c36e949b9f306e5e0 Mon Sep 17 00:00:00 2001 From: Lance Bragstad Date: Thu, 19 Apr 2018 15:13:47 +0000 Subject: [PATCH] Add configuration option for enforcement models We eventually want deployers to be able to choose which enforcement model they want for their deployment. This commit adds a new configuration options that exposes the enforcement model via config. This will dictate how project limits are validated. Change-Id: Ied398b92fef09f3a446960b0757c68a21ba50ed6 Related-Bug: 1765193 --- keystone/conf/unified_limit.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/keystone/conf/unified_limit.py b/keystone/conf/unified_limit.py index 1783e83d48..1f9559a828 100644 --- a/keystone/conf/unified_limit.py +++ b/keystone/conf/unified_limit.py @@ -47,6 +47,17 @@ be useful to tune if you have a large number of unified limits in your deployment. """)) +enforcement_model = cfg.StrOpt( + 'enforcement_model', + default='flat', + choices=['flat'], + help=utils.fmt(""" +The enforcement model to use when validating limits associated to projects. +Enforcement models will behave differently depending on the existing limits, +which may result in backwards incompatible changes if a model is switched in a +running deployment. +""")) + GROUP_NAME = __name__.split('.')[-1] ALL_OPTS = [ @@ -54,6 +65,7 @@ ALL_OPTS = [ caching, cache_time, list_limit, + enforcement_model, ]