Merge "Move config options from nova/cert directory"

This commit is contained in:
Jenkins 2016-01-27 12:49:38 +00:00 committed by Gerrit Code Review
commit a242a1d584
5 changed files with 39 additions and 19 deletions

View File

@ -16,23 +16,12 @@
Client side of the cert manager RPC API.
"""
from oslo_config import cfg
import oslo_messaging as messaging
import nova.conf
from nova import rpc
rpcapi_opts = [
cfg.StrOpt('cert_topic',
default='cert',
help='The topic cert nodes listen on'),
]
CONF = cfg.CONF
CONF.register_opts(rpcapi_opts)
rpcapi_cap_opt = cfg.StrOpt('cert',
help='Set a version cap for messages sent to cert services')
CONF.register_opt(rpcapi_cap_opt, 'upgrade_levels')
CONF = nova.conf.CONF
class CertAPI(object):

View File

@ -16,18 +16,17 @@
import sys
from oslo_config import cfg
from oslo_log import log as logging
from oslo_reports import guru_meditation_report as gmr
import nova.conf
from nova import config
from nova import objects
from nova import service
from nova import utils
from nova import version
CONF = cfg.CONF
CONF.import_opt('cert_topic', 'nova.cert.rpcapi')
CONF = nova.conf.CONF
def main():

View File

@ -26,6 +26,7 @@ from oslo_config import cfg
# from nova.conf import barbican
# from nova.conf import base
# from nova.conf import cells
from nova.conf import cert
# from nova.conf import cinder
# from nova.conf import cloudpipe
from nova.conf import compute
@ -85,6 +86,7 @@ CONF = cfg.CONF
# barbican.register_opts(CONF)
# base.register_opts(CONF)
# cells.register_opts(CONF)
cert.register_opts(CONF)
# cinder.register_opts(CONF)
# cloudpipe.register_opts(CONF)
compute.register_opts(CONF)

33
nova/conf/cert.py Normal file
View File

@ -0,0 +1,33 @@
# Copyright 2016 IBM Corp.
# 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
cert_topic_opt = cfg.StrOpt("cert_topic",
default="cert",
help="The topic cert nodes listen on")
rpcapi_cap_opt = cfg.StrOpt("cert",
help="Set a version cap for messages sent to cert services")
def register_opts(conf):
conf.register_opts([cert_topic_opt])
conf.register_opt(rpcapi_cap_opt, "upgrade_levels")
def list_opts():
return {"DEFAULT": [cert_topic_opt],
"upgrade_levels": [rpcapi_cap_opt]}

View File

@ -14,7 +14,6 @@ import itertools
import nova.availability_zones
import nova.baserpc
import nova.cert.rpcapi
import nova.cloudpipe.pipelib
import nova.cmd.novnc
import nova.cmd.novncproxy
@ -70,7 +69,6 @@ def list_opts():
[nova.ipv6.api.ipv6_backend_opt],
[nova.servicegroup.api.servicegroup_driver_opt],
nova.availability_zones.availability_zone_opts,
nova.cert.rpcapi.rpcapi_opts,
nova.cloudpipe.pipelib.cloudpipe_opts,
nova.cmd.novnc.opts,
nova.cmd.novncproxy.opts,
@ -116,7 +114,6 @@ def list_opts():
('upgrade_levels',
itertools.chain(
[nova.baserpc.rpcapi_cap_opt],
[nova.cert.rpcapi.rpcapi_cap_opt],
[nova.conductor.rpcapi.rpcapi_cap_opt],
[nova.console.rpcapi.rpcapi_cap_opt],
[nova.consoleauth.rpcapi.rpcapi_cap_opt],