Coverage for nova/conf/base.py: 83%
6 statements
« prev ^ index » next coverage.py v7.6.12, created at 2025-04-17 15:08 +0000
« prev ^ index » next coverage.py v7.6.12, created at 2025-04-17 15:08 +0000
1# Copyright 2010 United States Government as represented by the
2# Administrator of the National Aeronautics and Space Administration.
3# Copyright 2011 Justin Santa Barbara
4# All Rights Reserved.
5#
6# Licensed under the Apache License, Version 2.0 (the "License"); you may
7# not use this file except in compliance with the License. You may obtain
8# a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15# License for the specific language governing permissions and limitations
16# under the License.
18from oslo_config import cfg
20base_options = [
21 cfg.IntOpt(
22 'password_length',
23 default=12,
24 min=0,
25 help='Length of generated instance admin passwords.'),
26 cfg.StrOpt(
27 'instance_usage_audit_period',
28 default='month',
29 regex='^(hour|month|day|year)(@([0-9]+))?$',
30 help='''
31Time period to generate instance usages for. It is possible to define optional
32offset to given period by appending @ character followed by a number defining
33offset.
35Possible values:
37* period, example: ``hour``, ``day``, ``month` or ``year``
38* period with offset, example: ``month@15`` will result in monthly audits
39 starting on 15th day of month.
40'''),
41 cfg.BoolOpt(
42 'use_rootwrap_daemon',
43 default=False,
44 help='''
45Start and use a daemon that can run the commands that need to be run with
46root privileges. This option is usually enabled on nodes that run nova compute
47processes.
48'''),
49 cfg.StrOpt(
50 'rootwrap_config',
51 default="/etc/nova/rootwrap.conf",
52 help='''
53Path to the rootwrap configuration file.
55Goal of the root wrapper is to allow a service-specific unprivileged user to
56run a number of actions as the root user in the safest manner possible.
57The configuration file used here must match the one defined in the sudoers
58entry.
59'''),
60 cfg.StrOpt(
61 'tempdir',
62 help='Explicitly specify the temporary working directory.'),
63 cfg.IntOpt(
64 'default_green_pool_size',
65 default=1000,
66 min=100,
67 help='''
68The total number of coroutines that can be run via nova's default
69greenthread pool concurrently, defaults to 1000, min value is 100.
70'''),
71]
74def register_opts(conf):
75 conf.register_opts(base_options)
78def list_opts():
79 return {'DEFAULT': base_options}