Dumping flows on each test now
Change-Id: Iec628582c76b287868d7ee405dbed128d93cc3fe
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index 4b28e8e..118563c 100644
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -1609,6 +1609,30 @@
main.cleanup()
main.exit()
+ def dumpFlows(self,ONOSIp, destDir, filename="flows" ):
+ """
+ Dump Flow Tables to a desired directory.
+ For debugging purposes, you may want to use
+ this function to capture flows at a given point in time.
+ Localtime will be attached to the filename
+
+ Required:
+ * ONOSIp: the IP of the target ONOS instance
+ * destDir: specify directory to copy to.
+ ex ) /tmp/
+ Optional:
+ * fileName: Name of the file
+ """
+
+ localtime = time.strftime( '%x %X' )
+ localtime = localtime.replace( "/", "" )
+ localtime = localtime.replace( " ", "_" )
+ localtime = localtime.replace( ":", "" )
+ if destDir[ -1: ] != "/":
+ destDir += "/"
+ cmd="flows > "+ str( destDir ) + str( filename ) + localtime
+ return self.onosCli(ONOSIp,cmd)
+
def cpLogsToDir( self, logToCopy,
destDir, copyFileName="" ):
"""