~ubuntu-branches/ubuntu/vivid/neutron/vivid-updates

« back to all changes in this revision

Viewing changes to neutron/plugins/nec/common/config.py

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-03-30 11:17:19 UTC
  • mfrom: (1.1.21)
  • Revision ID: package-import@ubuntu.com-20150330111719-h0gx7233p4jkkgfh
Tags: 1:2015.1~b3-0ubuntu1
* New upstream milestone release:
  - d/control: Align version requirements with upstream.
  - d/control: Add new dependency on oslo-log.
  - d/p/*: Rebase.
  - d/control,d/neutron-plugin-hyperv*: Dropped, decomposed into
    separate project upstream.
  - d/control,d/neutron-plugin-openflow*: Dropped, decomposed into
    separate project upstream.
  - d/neutron-common.install: Add neutron-rootwrap-daemon and 
    neutron-keepalived-state-change binaries.
  - d/rules: Ignore neutron-hyperv-agent when installing; only for Windows.
  - d/neutron-plugin-cisco.install: Drop neutron-cisco-cfg-agent as
    decomposed into separate project upstream.
  - d/neutron-plugin-vmware.install: Drop neutron-check-nsx-config and
    neutron-nsx-manage as decomposed into separate project upstream.
  - d/control: Add dependency on python-neutron-fwaas to neutron-l3-agent.
* d/pydist-overrides: Add overrides for oslo packages.
* d/control: Fixup type in package description (LP: #1263539).
* d/p/fixup-driver-test-execution.patch: Cherry pick fix from upstream VCS
  to support unit test exection in out-of-tree vendor drivers.
* d/neutron-common.postinst: Allow general access to /etc/neutron but limit
  access to root/neutron to /etc/neutron/neutron.conf to support execution
  of unit tests in decomposed vendor drivers.
* d/control: Add dependency on python-neutron-fwaas to neutron-l3-agent
  package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2012 NEC Corporation.  All rights reserved.
2
 
#
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
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, WITHOUT
11
 
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12
 
#    License for the specific language governing permissions and limitations
13
 
#    under the License.
14
 
 
15
 
from oslo.config import cfg
16
 
 
17
 
from neutron.agent.common import config
18
 
from neutron.plugins.nec.common import constants as nconst
19
 
 
20
 
 
21
 
ovs_opts = [
22
 
    cfg.StrOpt('integration_bridge', default='br-int',
23
 
               help=_("Integration bridge to use.")),
24
 
]
25
 
 
26
 
agent_opts = [
27
 
    cfg.IntOpt('polling_interval', default=2,
28
 
               help=_("The number of seconds the agent will wait between "
29
 
                      "polling for local device changes.")),
30
 
]
31
 
 
32
 
ofc_opts = [
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.")),
59
 
]
60
 
 
61
 
provider_opts = [
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.'))
68
 
]
69
 
 
70
 
 
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)
77
 
 
78
 
# shortcuts
79
 
CONF = cfg.CONF
80
 
OVS = cfg.CONF.OVS
81
 
AGENT = cfg.CONF.AGENT
82
 
OFC = cfg.CONF.OFC
83
 
PROVIDER = cfg.CONF.PROVIDER