Generate and register ssl config

Change-Id: I6e6603a53c529675f50907f95fd0c438817b2399
Related-Bug: #1614596
This commit is contained in:
Hongbin Lu 2017-02-22 15:53:00 -06:00
parent e35701be4b
commit 2f4305eea4
2 changed files with 29 additions and 0 deletions

View File

@ -25,6 +25,7 @@ from zun.conf import nova_client
from zun.conf import path
from zun.conf import scheduler
from zun.conf import services
from zun.conf import ssl
from zun.conf import zun_client
CONF = cfg.CONF
@ -41,3 +42,4 @@ path.register_opts(CONF)
scheduler.register_opts(CONF)
services.register_opts(CONF)
zun_client.register_opts(CONF)
ssl.register_opts(CONF)

27
zun/conf/ssl.py Normal file
View File

@ -0,0 +1,27 @@
# 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
from oslo_service import sslutils
def register_opts(conf):
sslutils.register_opts(conf)
def list_opts():
group_name, ssl_opts = sslutils.list_opts()[0]
ssl_group = cfg.OptGroup(name=group_name,
title='Options for the ssl')
return {
ssl_group: ssl_opts
}