summaryrefslogtreecommitdiff
path: root/designate/conf/mdns.py
blob: 0d481fd7aa81579c0e721d31d6e82feacf5eae7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Author: Kiall Mac Innes <kiall@hpe.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg

from designate.utils import DEFAULT_MDNS_PORT

MDNS_GROUP = cfg.OptGroup(
    name='service:mdns', title="Configuration for mDNS Service"
)

MDNS_OPTS = [
    cfg.IntOpt('workers',
               help='Number of mdns worker processes to spawn'),
    cfg.IntOpt('threads', default=1000,
               help='Number of mdns greenthreads to spawn'),
    cfg.IPOpt('host',
              deprecated_for_removal=True,
              deprecated_reason="Replaced by 'listen' option",
              help='mDNS Bind Host'),
    cfg.PortOpt('port',
                deprecated_for_removal=True,
                deprecated_reason="Replaced by 'listen' option",
                help='mDNS Port Number'),
    cfg.ListOpt('listen',
                default=['0.0.0.0:%d' % DEFAULT_MDNS_PORT],
                help='mDNS host:port pairs to listen on'),
    cfg.IntOpt('tcp_backlog', default=100,
               help='mDNS TCP Backlog'),
    cfg.FloatOpt('tcp_recv_timeout', default=0.5,
                 help='mDNS TCP Receive Timeout'),
    cfg.BoolOpt('all_tcp', default=False,
                help='Send all traffic over TCP'),
    cfg.BoolOpt('query_enforce_tsig', default=False,
                help='Enforce all incoming queries (including AXFR) are TSIG '
                     'signed'),
    cfg.StrOpt('storage_driver', default='sqlalchemy',
               help='The storage driver to use'),
    cfg.IntOpt('max_message_size', default=65535,
               help='Maximum message size to emit'),
    cfg.StrOpt('topic', default='mdns',
               help='RPC topic name for mdns'),
    cfg.IntOpt('xfr_timeout', help="Timeout in seconds for XFR's.",
               default=10),
]


def register_opts(conf):
    conf.register_group(MDNS_GROUP)
    conf.register_opts(MDNS_OPTS, group=MDNS_GROUP)


def list_opts():
    return {
        MDNS_GROUP: MDNS_OPTS
    }