summaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2012-06-28 12:55:05 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2012-06-28 22:54:05 +0900
commit1262ead05ce575328799da217866a8f38a26ed3e (patch)
tree278a01e3b7f628f298c2b2f6d81feecc793caf51 /bin
parentbead388d470925f3475c9a79840ef017017d1df4 (diff)
add '--version' command line option
Just output version information and exit. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ryu-manager7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/ryu-manager b/bin/ryu-manager
index bb945570..cfa56a0a 100755
--- a/bin/ryu-manager
+++ b/bin/ryu-manager
@@ -27,6 +27,7 @@ monkey.patch_all()
from ryu import log
log.early_init_log(logging.DEBUG)
+from ryu import version
from ryu import utils
from ryu.app import wsgi
from ryu.base.app_manager import AppManager
@@ -34,6 +35,7 @@ from ryu.controller import controller
FLAGS = gflags.FLAGS
+gflags.DEFINE_bool('version', False, 'output version information and exit')
gflags.DEFINE_multistring('app_lists',
[],
'application module name to run')
@@ -42,6 +44,11 @@ gflags.DEFINE_multistring('app_lists',
def main():
utils.find_flagfile()
args = FLAGS(sys.argv)
+
+ if FLAGS.version:
+ print 'ryu-manager %s' % version
+ sys.exit(0)
+
log.init_log()
if len(args) > 1: