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
This commit is contained in:
parent
000c071379
commit
b8e8a8b550
|
@ -47,6 +47,17 @@ be useful to tune if you have a large number of unified limits in your
|
||||||
deployment.
|
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]
|
GROUP_NAME = __name__.split('.')[-1]
|
||||||
ALL_OPTS = [
|
ALL_OPTS = [
|
||||||
|
@ -54,6 +65,7 @@ ALL_OPTS = [
|
||||||
caching,
|
caching,
|
||||||
cache_time,
|
cache_time,
|
||||||
list_limit,
|
list_limit,
|
||||||
|
enforcement_model,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue