Debian Codegraph @

masakarimonitors/conf/instance.py

raw
1 # Copyright(c) 2016 Nippon Telegraph and Telephone Corporation
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 from oslo_config import cfg
15
16
17 monitor_callback_opts = [
18 cfg.IntOpt('retry_max',
19 default=12,
20 help='Number of retries when the notification processing'
21 ' is error.'),
22 cfg.IntOpt('retry_interval',
23 default=10,
24 help='Trial interval of time of the notification processing'
25 ' is error(in seconds).'),
26 ]
27
28 libvirt_opts = [
29 cfg.StrOpt('connection_uri',
30 default='qemu:///system',
31 help='Override the default libvirt URI.')
32 ]
33
34
35 def register_opts(conf):
36 conf.register_opts(monitor_callback_opts, group='callback')
37 conf.register_opts(libvirt_opts, group='libvirt')
38
39
40 def list_opts():
41 return {
42 'callback': monitor_callback_opts,
43 'libvirt': libvirt_opts
44 }