Fix all scripts to honor the enabled_ssl_apis flag

Add logic to allow configuration of SSL for all the cmd scripts
that start a WSGIService

Change-Id: I921013d113081a91a3fe9bb574bae5cd7bb06bcc
Closes-Bug: 1237126
This commit is contained in:
Davanum Srinivas
2013-10-09 11:51:42 -04:00
committed by Gerrit Code Review
parent 7c68f0e787
commit 08c6664d8f
4 changed files with 28 additions and 4 deletions

View File

@@ -20,16 +20,23 @@
import sys
from oslo.config import cfg
from nova import config
from nova.openstack.common import log as logging
from nova import service
from nova import utils
CONF = cfg.CONF
CONF.import_opt('enabled_ssl_apis', 'nova.service')
def main():
config.parse_args(sys.argv)
logging.setup("nova")
utils.monkey_patch()
server = service.WSGIService('osapi_compute')
should_use_ssl = 'osapi_compute' in CONF.enabled_ssl_apis
server = service.WSGIService('osapi_compute', use_ssl=should_use_ssl)
service.serve(server, workers=server.workers)
service.wait()