Coverage for nova/conf/placement.py: 90%
10 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# 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.
13from keystoneauth1 import loading as ks_loading
14from oslo_config import cfg
16from nova.conf import utils as confutils
19DEFAULT_SERVICE_TYPE = 'placement'
22placement_group = cfg.OptGroup(
23 'placement',
24 title='Placement Service Options',
25 help="Configuration options for connecting to the placement API service")
28def register_opts(conf):
29 conf.register_group(placement_group)
30 confutils.register_ksa_opts(conf, placement_group, DEFAULT_SERVICE_TYPE)
33def list_opts():
34 return {
35 placement_group.name: (
36 ks_loading.get_session_conf_options() +
37 ks_loading.get_auth_common_conf_options() +
38 ks_loading.get_auth_plugin_conf_options('password') +
39 ks_loading.get_auth_plugin_conf_options('v2password') +
40 ks_loading.get_auth_plugin_conf_options('v3password') +
41 confutils.get_ksa_adapter_opts(DEFAULT_SERVICE_TYPE))
42 }