From 08c6664d8f36ef48f28bed9afbd4aae21f6eb2d5 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Wed, 9 Oct 2013 11:51:42 -0400 Subject: 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 --- nova/cmd/api_ec2.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'nova/cmd/api_ec2.py') diff --git a/nova/cmd/api_ec2.py b/nova/cmd/api_ec2.py index 2b3b942c8e..754d65d1a0 100644 --- a/nova/cmd/api_ec2.py +++ b/nova/cmd/api_ec2.py @@ -20,16 +20,24 @@ 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('ec2', max_url_len=16384) + should_use_ssl = 'ec2' in CONF.enabled_ssl_apis + server = service.WSGIService('ec2', use_ssl=should_use_ssl, + max_url_len=16384) service.serve(server, workers=server.workers) service.wait() -- cgit v1.2.1