Coverage for watcher/conf/planner.py: 100%
9 statements
« prev ^ index » next coverage.py v7.8.2, created at 2025-06-17 12:22 +0000
« prev ^ index » next coverage.py v7.8.2, created at 2025-06-17 12:22 +0000
1# -*- encoding: utf-8 -*-
2# Copyright (c) 2016 Intel Corp
3#
4# Authors: Prudhvi Rao Shedimbi <prudhvi.rao.shedimbi@intel.com>
5#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain 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,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15# implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
19from oslo_config import cfg
21watcher_planner = cfg.OptGroup(name='watcher_planner',
22 title='Defines the parameters of '
23 'the planner')
25default_planner = 'weight'
27WATCHER_PLANNER_OPTS = {
28 cfg.StrOpt('planner',
29 default=default_planner,
30 required=True,
31 help='The selected planner used to schedule the actions')
32}
35def register_opts(conf):
36 conf.register_group(watcher_planner)
37 conf.register_opts(WATCHER_PLANNER_OPTS, group=watcher_planner)
40def list_opts():
41 return [(watcher_planner, WATCHER_PLANNER_OPTS)]