Debian Codegraph @

magnum/conf/quota.py

raw
1 # Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 # use this file except in compliance with the License. You may obtain a copy
3 # 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,
9 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 # See the License for the specific language governing permissions and
11 # limitations under the License.
12
13 from oslo_config import cfg
14
15 from magnum.i18n import _
16
17 quotas_group = cfg.OptGroup(name='quotas',
18 title='Options for quota configuration')
19
20 quotas_def_opts = [
21 cfg.IntOpt('max_clusters_per_project',
22 default=20,
23 help=_('Max number of clusters allowed per project. Admin can '
24 'override this default quota for a project by setting '
25 'explicit limit in quotas DB table (using /quotas REST '
26 'API endpoint).')),
27 ]
28
29
30 def register_opts(conf):
31 conf.register_group(quotas_group)
32 conf.register_opts(quotas_def_opts, group=quotas_group)
33
34
35 def list_opts():
36 return {
37 quotas_group: quotas_def_opts
38 }