projects
/
osm
/
vim-emu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
specify interface option for monitoring command
[osm/vim-emu.git]
/
src
/
emuvim
/
cli
/
monitor.py
diff --git
a/src/emuvim/cli/monitor.py
b/src/emuvim/cli/monitor.py
index
6885a3c
..
2caca2c
100755
(executable)
--- a/
src/emuvim/cli/monitor.py
+++ b/
src/emuvim/cli/monitor.py
@@
-7,6
+7,7
@@
import argparse
import pprint
\r
from tabulate import tabulate
\r
import zerorpc
\r
import pprint
\r
from tabulate import tabulate
\r
import zerorpc
\r
+import time
\r
\r
\r
pp = pprint.PrettyPrinter(indent=4)
\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
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
\r
\r
parser = argparse.ArgumentParser(description='son-emu network')
\r