diff options
| author | Josh Kearney <josh@jk0.org> | 2011-07-08 17:12:14 -0500 |
|---|---|---|
| committer | Josh Kearney <josh@jk0.org> | 2011-07-08 17:12:14 -0500 |
| commit | 209bf1ef495d2d599ef51e207e8de0694dec9790 (patch) | |
| tree | 329b98caafc342d45c6e7e7fff86cade5ce96a21 /bin | |
| parent | 42765b2763260a9cae702585df1f0b9343937284 (diff) | |
Add a flag to disable ec2 or osapi.
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/nova-api | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/nova-api b/bin/nova-api index 4c5164ea1..fe8e83366 100755 --- a/bin/nova-api +++ b/bin/nova-api @@ -36,17 +36,21 @@ if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")): import nova.service import nova.utils +from nova import flags + + +FLAGS = flags.FLAGS + def main(): """Launch EC2 and OSAPI services.""" nova.utils.Bootstrapper.bootstrap_binary(sys.argv) - ec2 = nova.service.WSGIService("ec2") - osapi = nova.service.WSGIService("osapi") - launcher = nova.service.Launcher() - launcher.launch_service(ec2) - launcher.launch_service(osapi) + + for api in FLAGS.enabled_apis: + service = nova.service.WSGIService(api) + launcher.launch_service(service) signal.signal(signal.SIGTERM, lambda *_: launcher.stop()) |
