1
# Copyright 2012 NEC Corporation. All rights reserved.
3
# Licensed under the Apache License, Version 2.0 (the "License"); you may
4
# not use this file except in compliance with the License. You may obtain
5
# a copy of the License at
7
# http://www.apache.org/licenses/LICENSE-2.0
9
# Unless required by applicable law or agreed to in writing, software
10
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12
# License for the specific language governing permissions and limitations
15
from oslo.config import cfg
17
from neutron.agent.common import config
18
from neutron.plugins.nec.common import constants as nconst
22
cfg.StrOpt('integration_bridge', default='br-int',
23
help=_("Integration bridge to use.")),
27
cfg.IntOpt('polling_interval', default=2,
28
help=_("The number of seconds the agent will wait between "
29
"polling for local device changes.")),
33
cfg.StrOpt('host', default='127.0.0.1',
34
help=_("Host to connect to.")),
35
cfg.StrOpt('path_prefix', default='',
36
help=_("Base URL of OFC REST API. "
37
"It is prepended to each API request.")),
38
cfg.StrOpt('port', default='8888',
39
help=_("Port to connect to.")),
40
cfg.StrOpt('driver', default='trema',
41
help=_("Driver to use.")),
42
cfg.BoolOpt('enable_packet_filter', default=True,
43
help=_("Enable packet filter.")),
44
cfg.BoolOpt('support_packet_filter_on_ofc_router', default=True,
45
help=_("Support packet filter on OFC router interface.")),
46
cfg.BoolOpt('use_ssl', default=False,
47
help=_("Use SSL to connect.")),
48
cfg.StrOpt('key_file',
49
help=_("Location of key file.")),
50
cfg.StrOpt('cert_file',
51
help=_("Location of certificate file.")),
52
cfg.BoolOpt('insecure_ssl', default=False,
53
help=_("Disable SSL certificate verification.")),
54
cfg.IntOpt('api_max_attempts', default=3,
55
help=_("Maximum attempts per OFC API request. "
56
"NEC plugin retries API request to OFC "
57
"when OFC returns ServiceUnavailable (503). "
58
"The value must be greater than 0.")),
62
cfg.StrOpt('default_router_provider',
63
default=nconst.DEFAULT_ROUTER_PROVIDER,
64
help=_('Default router provider to use.')),
65
cfg.ListOpt('router_providers',
66
default=nconst.DEFAULT_ROUTER_PROVIDERS,
67
help=_('List of enabled router providers.'))
71
cfg.CONF.register_opts(ovs_opts, "OVS")
72
cfg.CONF.register_opts(agent_opts, "AGENT")
73
cfg.CONF.register_opts(ofc_opts, "OFC")
74
cfg.CONF.register_opts(provider_opts, "PROVIDER")
75
config.register_agent_state_opts_helper(cfg.CONF)
76
config.register_root_helper(cfg.CONF)
81
AGENT = cfg.CONF.AGENT
83
PROVIDER = cfg.CONF.PROVIDER