Merge "Config options: Centralize neutron options"
This commit is contained in:
commit
492ee36e16
@ -57,7 +57,7 @@ from nova.conf import mks
|
|||||||
# from nova.conf import metadata
|
# from nova.conf import metadata
|
||||||
# from nova.conf import metrics
|
# from nova.conf import metrics
|
||||||
from nova.conf import network
|
from nova.conf import network
|
||||||
# from nova.conf import neutron
|
from nova.conf import neutron
|
||||||
# from nova.conf import notification
|
# from nova.conf import notification
|
||||||
# from nova.conf import osapi_v21
|
# from nova.conf import osapi_v21
|
||||||
from nova.conf import pci
|
from nova.conf import pci
|
||||||
@ -122,7 +122,7 @@ keymgr.register_opts(CONF)
|
|||||||
# metadata.register_opts(CONF)
|
# metadata.register_opts(CONF)
|
||||||
# metrics.register_opts(CONF)
|
# metrics.register_opts(CONF)
|
||||||
network.register_opts(CONF)
|
network.register_opts(CONF)
|
||||||
# neutron.register_opts(CONF)
|
neutron.register_opts(CONF)
|
||||||
# notification.register_opts(CONF)
|
# notification.register_opts(CONF)
|
||||||
# osapi_v21.register_opts(CONF)
|
# osapi_v21.register_opts(CONF)
|
||||||
pci.register_opts(CONF)
|
pci.register_opts(CONF)
|
||||||
|
44
nova/conf/neutron.py
Normal file
44
nova/conf/neutron.py
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# Copyright 2016 OpenStack Foundation
|
||||||
|
# All Rights Reserved.
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
|
||||||
|
neutron_group = cfg.OptGroup('neutron', title='Neutron Options')
|
||||||
|
|
||||||
|
neutron_opts = [
|
||||||
|
cfg.StrOpt('url',
|
||||||
|
default='http://127.0.0.1:9696',
|
||||||
|
help='URL for connecting to neutron'),
|
||||||
|
cfg.StrOpt('region_name',
|
||||||
|
help='Region name for connecting to neutron in admin context'),
|
||||||
|
cfg.StrOpt('ovs_bridge',
|
||||||
|
default='br-int',
|
||||||
|
help='Default OVS bridge name to use if not specified '
|
||||||
|
'by Neutron'),
|
||||||
|
cfg.IntOpt('extension_sync_interval',
|
||||||
|
default=600,
|
||||||
|
help='Number of seconds before querying neutron for'
|
||||||
|
' extensions'),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def register_opts(conf):
|
||||||
|
conf.register_group(neutron_group)
|
||||||
|
conf.register_opts(neutron_opts, group=neutron_group)
|
||||||
|
|
||||||
|
|
||||||
|
def list_opts():
|
||||||
|
return {neutron_group: neutron_opts}
|
@ -43,26 +43,10 @@ from nova.pci import request as pci_request
|
|||||||
from nova.pci import utils as pci_utils
|
from nova.pci import utils as pci_utils
|
||||||
from nova.pci import whitelist as pci_whitelist
|
from nova.pci import whitelist as pci_whitelist
|
||||||
|
|
||||||
neutron_opts = [
|
|
||||||
cfg.StrOpt('url',
|
|
||||||
default='http://127.0.0.1:9696',
|
|
||||||
help='URL for connecting to neutron'),
|
|
||||||
cfg.StrOpt('region_name',
|
|
||||||
help='Region name for connecting to neutron in admin context'),
|
|
||||||
cfg.StrOpt('ovs_bridge',
|
|
||||||
default='br-int',
|
|
||||||
help='Default OVS bridge name to use if not specified '
|
|
||||||
'by Neutron'),
|
|
||||||
cfg.IntOpt('extension_sync_interval',
|
|
||||||
default=600,
|
|
||||||
help='Number of seconds before querying neutron for'
|
|
||||||
' extensions'),
|
|
||||||
]
|
|
||||||
|
|
||||||
NEUTRON_GROUP = 'neutron'
|
NEUTRON_GROUP = 'neutron'
|
||||||
|
|
||||||
CONF = nova.conf.CONF
|
CONF = nova.conf.CONF
|
||||||
CONF.register_opts(neutron_opts, NEUTRON_GROUP)
|
|
||||||
|
|
||||||
deprecations = {'cafile': [cfg.DeprecatedOpt('ca_certificates_file',
|
deprecations = {'cafile': [cfg.DeprecatedOpt('ca_certificates_file',
|
||||||
group=NEUTRON_GROUP)],
|
group=NEUTRON_GROUP)],
|
||||||
|
@ -16,7 +16,6 @@ import nova.network
|
|||||||
import nova.network.driver
|
import nova.network.driver
|
||||||
import nova.network.floating_ips
|
import nova.network.floating_ips
|
||||||
import nova.network.linux_net
|
import nova.network.linux_net
|
||||||
import nova.network.neutronv2.api
|
|
||||||
import nova.network.rpcapi
|
import nova.network.rpcapi
|
||||||
import nova.network.security_group.openstack_driver
|
import nova.network.security_group.openstack_driver
|
||||||
|
|
||||||
@ -30,6 +29,5 @@ def list_opts():
|
|||||||
nova.network.linux_net.linux_net_opts,
|
nova.network.linux_net.linux_net_opts,
|
||||||
nova.network.rpcapi.rpcapi_opts,
|
nova.network.rpcapi.rpcapi_opts,
|
||||||
nova.network.security_group.openstack_driver.security_group_opts,
|
nova.network.security_group.openstack_driver.security_group_opts,
|
||||||
)),
|
))
|
||||||
('neutron', nova.network.neutronv2.api.neutron_opts),
|
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user