Coverage for watcher/conf/placement_client.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.8.2, created at 2025-06-17 12:22 +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. 

12 

13from oslo_config import cfg 

14 

15 

16placement_group = cfg.OptGroup( 

17 'placement_client', 

18 title='Placement Service Options', 

19 help="Configuration options for connecting to the placement API service") 

20 

21placement_opts = [ 

22 cfg.StrOpt('api_version', 

23 default='1.29', 

24 help='microversion of placement API when using ' 

25 'placement service.'), 

26 cfg.StrOpt('interface', 

27 default='public', 

28 choices=['internal', 'public', 'admin'], 

29 help='Type of endpoint when using placement service.'), 

30 cfg.StrOpt('region_name', 

31 help='Region in Identity service catalog to use for ' 

32 'communication with the OpenStack service.')] 

33 

34 

35def register_opts(conf): 

36 conf.register_group(placement_group) 

37 conf.register_opts(placement_opts, group=placement_group) 

38 

39 

40def list_opts(): 

41 return [(placement_group, placement_opts)]