diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2012-06-09 19:43:45 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2012-06-09 20:07:43 +0900 |
commit | c9f6b1b992fbd0078a266f74affa1ed4aa803b5f (patch) | |
tree | df1a46cba7b8dc050246badcf5c9b8848cbfca09 /bin | |
parent | 63cc49360e89a337faa6f76d4d143d34de9fdf9f (diff) |
support commandline application initialization
You can run your Ryu applicaiton in the following way:
$ ryu-manager yourapp.py
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reviewed-by: Isaku Yamahata <yamahata@valinux.co.jp>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ryu-manager | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/ryu-manager b/bin/ryu-manager index 43e0cba4..bb945570 100755 --- a/bin/ryu-manager +++ b/bin/ryu-manager @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright (C) 2011 Nippon Telegraph and Telephone Corporation. +# Copyright (C) 2011, 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2011 Isaku Yamahata <yamahata at valinux co jp> # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -35,17 +35,18 @@ from ryu.controller import controller FLAGS = gflags.FLAGS gflags.DEFINE_multistring('app_lists', - ['ryu.app.simple_isolation', - 'ryu.app.rest', - ], + [], 'application module name to run') def main(): utils.find_flagfile() - _args = FLAGS(sys.argv) + args = FLAGS(sys.argv) log.init_log() + if len(args) > 1: + FLAGS.app_lists += args[1:] + app_mgr = AppManager() app_mgr.load_apps(FLAGS.app_lists) contexts = app_mgr.create_contexts() |