diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-05-11 08:49:36 +0000 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-05-11 18:49:03 +0900 |
commit | c2d4b6992c563bd992c08f9cd78df11a4c12eaf7 (patch) | |
tree | 869896ee2970e210a27f1ca9245bda45cab051e1 /test | |
parent | 292a61b9cc0e8cd0732f43f71661ac6ae0f441cd (diff) |
test: add start_tcpdump()
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test')
-rw-r--r-- | test/lib/base.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/lib/base.py b/test/lib/base.py index d64afdae..d31ec14b 100644 --- a/test/lib/base.py +++ b/test/lib/base.py @@ -224,6 +224,12 @@ class Container(object): return int(local(cmd, capture=True)) return -1 + def start_tcpdump(self, interface=None, filename=None): + if not interface: + interface = "eth0" + if not filename: + filename = "{0}/{1}.dump".format(self.shared_volumes[0][1], interface) + self.local("tcpdump -i {0} -w {1}".format(interface, filename), detach=True) class BGPContainer(Container): |