specify interface option for monitoring command
[osm/vim-emu.git] / src / emuvim / cli / monitor.py
index 6885a3c..2caca2c 100755 (executable)
@@ -7,6 +7,7 @@ import argparse
 import pprint\r
 from tabulate import tabulate\r
 import zerorpc\r
+import time\r
 \r
 \r
 pp = pprint.PrettyPrinter(indent=4)\r
@@ -28,10 +29,12 @@ class ZeroRpcClient(object):
             print "Command not implemented."\r
 \r
     def get_rate(self, args):\r
-        r = self.c.monitor_get_rate(\r
-            args.get("vnf_name"),\r
-            args.get("direction"))\r
-        pp.pprint(r)\r
+        while True:\r
+            r = self.c.monitor_get_rate(\r
+                args.get("vnf_name"),\r
+                args.get("direction"))\r
+            pp.pprint(r)\r
+            time.sleep(1)\r
 \r
 \r
 parser = argparse.ArgumentParser(description='son-emu network')\r