Record events scheduled in CHOTestMonkey and enable replay from
recorded event file

Change-Id: If73eb743e19565ff8a91ac0b54eb18d8706be831
diff --git a/TestON/tests/CHOTestMonkey/dependencies/events/ONOSEvent.py b/TestON/tests/CHOTestMonkey/dependencies/events/ONOSEvent.py
index f4e2a89..28960d2 100644
--- a/TestON/tests/CHOTestMonkey/dependencies/events/ONOSEvent.py
+++ b/TestON/tests/CHOTestMonkey/dependencies/events/ONOSEvent.py
@@ -11,7 +11,7 @@
 
     def startEvent( self, args ):
         with self.eventLock:
-            main.log.info( "%s - starting event" % ( self.typeString ) )
+            #main.log.info( "%s - starting event" % ( self.typeString ) )
             result = EventStates().PASS
             if self.typeIndex == EventType().ONOS_ONOS_DOWN or self.typeIndex == EventType().ONOS_ONOS_UP:
                 if len( args ) < 1:
@@ -42,6 +42,7 @@
             if not main.controllers[ self.ONOSIndex - 1 ].isUp():
                 main.log.warn( "ONOS Down - ONOS already down" )
                 return EventStates().ABORT
+        main.log.info( "Event recorded: {} {} {}".format( self.typeIndex, self.typeString, self.ONOSIndex ) )
         with main.ONOSbenchLock:
             result = main.ONOSbench.onosStop( main.controllers[ self.ONOSIndex - 1 ].ip )
         if not result:
@@ -63,6 +64,7 @@
             if main.controllers[ self.ONOSIndex - 1 ].isUp():
                 main.log.warn( "ONOS Up - ONOS already up" )
                 return EventStates().ABORT
+        main.log.info( "Event recorded: {} {} {}".format( self.typeIndex, self.typeString, self.ONOSIndex ) )
         with main.ONOSbenchLock:
             startResult = main.ONOSbench.onosStart( main.controllers[ self.ONOSIndex - 1 ].ip )
         if not startResult:
@@ -92,7 +94,7 @@
 
     def startEvent( self, args ):
         with self.eventLock:
-            main.log.info( "%s - starting event" % ( self.typeString ) )
+            #main.log.info( "%s - starting event" % ( self.typeString ) )
             result = self.startCfgEvent( args )
             return result
 
@@ -121,6 +123,7 @@
         if index == -1:
             main.log.warn( "%s - No available controllers" %s ( self.typeString ) )
             return EventStates().ABORT
+        main.log.info( "Event recorded: {} {} {} {} {}".format( self.typeIndex, self.typeString, self.component, self.propName, self.value ) )
         controller = main.controllers[ index - 1 ]
         with controller.CLILock:
             result = controller.CLI.setCfg( component=self.component,
@@ -158,6 +161,7 @@
         if index == -1:
             main.log.warn( "%s - No available controllers" %s ( self.typeString ) )
             return EventStates().ABORT
+        main.log.info( "Event recorded: {} {} {} {} {}".format( self.typeIndex, self.typeString, self.component, self.propName, self.value ) )
         controller = main.controllers[ index - 1 ]
         with controller.CLILock:
             result = controller.CLI.setCfg( component=self.component,
@@ -184,6 +188,7 @@
             if index == -1:
                 main.log.warn( "%s - No available controllers" %s ( self.typeString ) )
                 return EventStates().ABORT
+            main.log.info( "Event recorded: {} {}".format( self.typeIndex, self.typeString ) )
             controller = main.controllers[ index - 1 ]
             with controller.CLILock:
                 result = controller.CLI.balanceMasters()