Limit enforcement library to assist with quota calculation.
Go to file
Dan Smith a49f3a04d0 Make calculate_usage() work if limits are missing
The calculate_usage interface was added recently to allow consumers
to probe limits and usage without requiring the enforce behavior
workflow. If a limit was passed to it that was not registered in
keystone, get_project_limits() would raise a ProjectOverLimit
exception itself to abort the process immediately, providing the
"unregistered means zero" behavior. This works fine for the enforce
workflow, but not the calculate one.

This changes get_project_limits() to just return a zero limit for
a missing one, which will be considered by the enforce workflow in
the same way, keeping the existing behavior. It will merely be
reported by the calculate workflow, which is the desired change.

Change-Id: Iaab1f0d5eb0da9a667267537d86f6c70bc8db51d
2022-01-10 13:44:01 -08:00
doc Make calculate_usage() work if limits are missing 2022-01-10 13:44:01 -08:00
oslo_limit Make calculate_usage() work if limits are missing 2022-01-10 13:44:01 -08:00
releasenotes Merge "Add caching of limits in Enforcer" 2022-01-10 13:11:46 +00:00
.coveragerc Init repo 2018-05-17 18:06:06 +08:00
.gitignore ignore reno generated artifacts 2020-03-03 14:52:45 +01:00
.gitreview OpenDev Migration Patch 2019-04-19 19:29:49 +00:00
.mailmap Init repo 2018-05-17 18:06:06 +08:00
.pre-commit-config.yaml Upgrade the pre-commit-hooks version 2021-05-18 11:11:24 +08:00
.stestr.conf Init repo 2018-05-17 18:06:06 +08:00
.zuul.yaml Add Python3 yoga unit tests 2021-09-10 14:34:52 +00:00
CONTRIBUTING.rst Align contributing doc with oslo's policy 2020-05-04 18:24:13 +02:00
HACKING.rst Update url in HACKING.rst 2018-06-21 21:39:22 +08:00
LICENSE Init repo 2018-05-17 18:06:06 +08:00
README.rst Replace git.openstack.org URLs with opendev.org URLs 2019-04-23 06:30:33 +00:00
requirements.txt drop use of six 2020-03-02 14:58:28 +01:00
setup.cfg setup.cfg: Replace dashes with underscores 2021-08-13 01:06:07 +00:00
setup.py remove outdated header 2020-02-11 18:53:20 +01:00
test-requirements.txt Add a test fixture 2021-06-09 08:04:01 -07:00
tox.ini Changed minversion in tox to 3.18.0 2021-08-12 11:12:28 +08:00

Team and repository tags

image

oslo.limit

Latest Version

Downloads

Oslo.limit is the limit enforcement library to assist with quota calculation. It aims to provide support for quota enforcement across all OpenStack services.