keystone  18.0.0
About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Victoria" series (maintained release).
  Fossies Dox: keystone-18.0.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

unified_limit.py
Go to the documentation of this file.
1 # Licensed under the Apache License, Version 2.0 (the "License"); you may
2 # not use this file except in compliance with the License. You may obtain
3 # a copy of the License at
4 #
5 # http://www.apache.org/licenses/LICENSE-2.0
6 #
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 # License for the specific language governing permissions and limitations
11 # under the License.
12 
13 from oslo_config import cfg
14 
15 from keystone.conf import utils
16 
17 
18 driver = cfg.StrOpt(
19  'driver',
20  default='sql',
21  help=utils.fmt("""
22 Entry point for the unified limit backend driver in the
23 `keystone.unified_limit` namespace. Keystone only provides a `sql` driver, so
24 there's no reason to change this unless you are providing a custom entry point.
25 """))
26 
27 caching = cfg.BoolOpt(
28  'caching',
29  default=True,
30  help=utils.fmt("""
31 Toggle for unified limit caching. This has no effect unless global caching is
32 enabled. In a typical deployment, there is no reason to disable this.
33 """))
34 
35 cache_time = cfg.IntOpt(
36  'cache_time',
37  help=utils.fmt("""
38 Time to cache unified limit data, in seconds. This has no effect unless both
39 global caching and `[unified_limit] caching` are enabled.
40 """))
41 
42 list_limit = cfg.IntOpt(
43  'list_limit',
44  help=utils.fmt("""
45 Maximum number of entities that will be returned in a unified limit
46 collection. This may be useful to tune if you have a large number of
47 unified limits in your deployment.
48 """))
49 
50 enforcement_model = cfg.StrOpt(
51  'enforcement_model',
52  default='flat',
53  choices=['flat', 'strict_two_level'],
54  help=utils.fmt("""
55 The enforcement model to use when validating limits associated to projects.
56 Enforcement models will behave differently depending on the existing limits,
57 which may result in backwards incompatible changes if a model is switched in a
58 running deployment.
59 """))
60 
61 
62 GROUP_NAME = __name__.split('.')[-1]
63 ALL_OPTS = [
64  driver,
65  caching,
66  cache_time,
67  list_limit,
68  enforcement_model,
69 ]
70 
71 
72 def register_opts(conf):
73  conf.register_opts(ALL_OPTS, group=GROUP_NAME)
74 
75 
76 def list_opts():
77  return {GROUP_NAME: ALL_OPTS}
keystone.conf.unified_limit.register_opts
def register_opts(conf)
Definition: unified_limit.py:72
keystone.conf.unified_limit.list_opts
def list_opts()
Definition: unified_limit.py:76
keystone.conf
Definition: __init__.py:1