test: add start_tcpdump()

Signed-off-by: ISHIDA Wataru <[email protected]>
This commit is contained in:
ISHIDA Wataru
2016-05-11 18:49:03 +09:00
committed by FUJITA Tomonori
parent 292a61b9cc
commit c2d4b6992c
+6
View File
@@ -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):