summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/nova-api8
-rwxr-xr-xbin/nova-combined20
2 files changed, 16 insertions, 12 deletions
diff --git a/bin/nova-api b/bin/nova-api
index 46f695248..8d47a656e 100755
--- a/bin/nova-api
+++ b/bin/nova-api
@@ -44,9 +44,9 @@ FLAGS = flags.FLAGS
API_ENDPOINTS = ['ec2', 'osapi']
for api in API_ENDPOINTS:
- flags.DEFINE_string("%s_api_listen" % api, "0.0.0.0",
+ flags.DEFINE_string("%s_listen" % api, "0.0.0.0",
"IP address to listen to for API %s" % api)
- flags.DEFINE_integer("%s_api_listen_port" % api,
+ flags.DEFINE_integer("%s_listen_port" % api,
getattr(FLAGS, "%s_port" % api),
"Port to listen to for API %s" % api)
@@ -61,8 +61,8 @@ def run_app(paste_config_file):
LOG.debug(_("App Config: %(api)s\n%(config)r") % locals())
LOG.info(_("Running %s API"), api)
app = wsgi.load_paste_app(paste_config_file, api)
- apps.append((app, getattr(FLAGS, "%s_api_listen_port" % api),
- getattr(FLAGS, "%s_api_listen" % api)))
+ apps.append((app, getattr(FLAGS, "%s_listen_port" % api),
+ getattr(FLAGS, "%s_listen" % api)))
if len(apps) == 0:
LOG.error(_("No known API applications configured in %s."),
paste_config_file)
diff --git a/bin/nova-combined b/bin/nova-combined
index 889600eb7..40dc2945d 100755
--- a/bin/nova-combined
+++ b/bin/nova-combined
@@ -45,6 +45,14 @@ from nova import wsgi
FLAGS = flags.FLAGS
+API_ENDPOINTS = ['ec2', 'osapi']
+
+for api in API_ENDPOINTS:
+ flags.DEFINE_string("%s_listen" % api, "0.0.0.0",
+ "IP address to listen to for API %s" % api)
+ flags.DEFINE_integer("%s_listen_port" % api,
+ getattr(FLAGS, "%s_port" % api),
+ "Port to listen to for API %s" % api)
if __name__ == '__main__':
utils.default_flagfile()
@@ -57,21 +65,17 @@ if __name__ == '__main__':
scheduler = service.Service.create(binary='nova-scheduler')
#objectstore = service.Service.create(binary='nova-objectstore')
- service.serve(compute, network, volume, scheduler)
+# service.serve(compute, network, volume, scheduler)
apps = []
paste_config_file = wsgi.paste_config_file('nova-api.conf')
- for api in ['osapi', 'ec2']:
+ for api in API_ENDPOINTS:
config = wsgi.load_paste_configuration(paste_config_file, api)
if config is None:
continue
- wsgi.paste_config_to_flags(config, {
- "verbose": FLAGS.verbose,
- "%s_host" % api: getattr(FLAGS, "%s_host" % api),
- "%s_port" % api: getattr(FLAGS, "%s_port" % api)})
app = wsgi.load_paste_app(paste_config_file, api)
- apps.append((app, getattr(FLAGS, "%s_port" % api),
- config.get('listen', '0.0.0.0')))
+ apps.append((app, getattr(FLAGS, "%s_listen_port" % api),
+ getattr(FLAGS, "%s_listen" % api)))
if len(apps) > 0:
logging.basicConfig()
server = wsgi.Server()