Config options: Centralize ipv6 options
The config options of the section "nova/ipv6" got moved to the new central location "nova/conf/ipv6.py". Change-Id: Ia53dd8f72755a645eb535e1866b8b662d159debd Implements: blueprint centralize-config-options-newton
This commit is contained in:
parent
a1d0fc0ff5
commit
8407f33ef1
@ -48,6 +48,7 @@ from nova.conf import hyperv
|
|||||||
# from nova.conf import image
|
# from nova.conf import image
|
||||||
# from nova.conf import imagecache
|
# from nova.conf import imagecache
|
||||||
from nova.conf import image_file_url
|
from nova.conf import image_file_url
|
||||||
|
from nova.conf import ipv6
|
||||||
from nova.conf import ironic
|
from nova.conf import ironic
|
||||||
from nova.conf import keymgr
|
from nova.conf import keymgr
|
||||||
# from nova.conf import keystone_authtoken
|
# from nova.conf import keystone_authtoken
|
||||||
@ -114,6 +115,7 @@ mks.register_opts(CONF)
|
|||||||
# image.register_opts(CONF)
|
# image.register_opts(CONF)
|
||||||
# imagecache.register_opts(CONF)
|
# imagecache.register_opts(CONF)
|
||||||
image_file_url.register_opts(CONF)
|
image_file_url.register_opts(CONF)
|
||||||
|
ipv6.register_opts(CONF)
|
||||||
ironic.register_opts(CONF)
|
ironic.register_opts(CONF)
|
||||||
keymgr.register_opts(CONF)
|
keymgr.register_opts(CONF)
|
||||||
# keystone_authtoken.register_opts(CONF)
|
# keystone_authtoken.register_opts(CONF)
|
||||||
|
32
nova/conf/ipv6.py
Normal file
32
nova/conf/ipv6.py
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# Copyright (c) 2016 Intel, Inc.
|
||||||
|
# Copyright (c) 2013 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
|
||||||
|
|
||||||
|
|
||||||
|
ipv6_backend = cfg.StrOpt('ipv6_backend',
|
||||||
|
default='rfc2462',
|
||||||
|
help='Backend to use for IPv6 generation')
|
||||||
|
|
||||||
|
IPV6_OPTS = [ipv6_backend]
|
||||||
|
|
||||||
|
|
||||||
|
def register_opts(conf):
|
||||||
|
conf.register_opts(IPV6_OPTS)
|
||||||
|
|
||||||
|
|
||||||
|
def list_opts():
|
||||||
|
return {'DEFAULT': IPV6_OPTS}
|
@ -12,16 +12,11 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo_config import cfg
|
|
||||||
from stevedore import driver
|
from stevedore import driver
|
||||||
|
|
||||||
|
import nova.conf
|
||||||
|
|
||||||
ipv6_backend_opt = cfg.StrOpt('ipv6_backend',
|
CONF = nova.conf.CONF
|
||||||
default='rfc2462',
|
|
||||||
help='Backend to use for IPv6 generation')
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
|
||||||
CONF.register_opt(ipv6_backend_opt)
|
|
||||||
IMPL = None
|
IMPL = None
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,7 +30,6 @@ import nova.db.base
|
|||||||
import nova.db.sqlalchemy.api
|
import nova.db.sqlalchemy.api
|
||||||
import nova.exception
|
import nova.exception
|
||||||
import nova.image.download.file
|
import nova.image.download.file
|
||||||
import nova.ipv6.api
|
|
||||||
import nova.netconf
|
import nova.netconf
|
||||||
import nova.notifications
|
import nova.notifications
|
||||||
import nova.paths
|
import nova.paths
|
||||||
@ -47,7 +46,6 @@ def list_opts():
|
|||||||
itertools.chain(
|
itertools.chain(
|
||||||
[nova.conductor.tasks.live_migrate.migrate_opt],
|
[nova.conductor.tasks.live_migrate.migrate_opt],
|
||||||
[nova.db.base.db_driver_opt],
|
[nova.db.base.db_driver_opt],
|
||||||
[nova.ipv6.api.ipv6_backend_opt],
|
|
||||||
[nova.servicegroup.api.servicegroup_driver_opt],
|
[nova.servicegroup.api.servicegroup_driver_opt],
|
||||||
nova.cmd.novnc.opts,
|
nova.cmd.novnc.opts,
|
||||||
nova.console.manager.console_manager_opts,
|
nova.console.manager.console_manager_opts,
|
||||||
|
Loading…
Reference in New Issue
Block a user