Refactor HAminorityRestart

- Split into two tests, one that kills ONOS and one that stops the
  service
- Check ONOS between brining some ONOS nodes down and up
- Set "gossip" time to be a function of # of nodes

Change-Id: I389164c8225b2e496db433552a7ba5a5a3e5c2bb
diff --git a/TestON/tests/HAsingleInstanceRestart/HAsingleInstanceRestart.params b/TestON/tests/HAsingleInstanceRestart/HAsingleInstanceRestart.params
index 3e31402..990bef4 100644
--- a/TestON/tests/HAsingleInstanceRestart/HAsingleInstanceRestart.params
+++ b/TestON/tests/HAsingleInstanceRestart/HAsingleInstanceRestart.params
@@ -60,6 +60,7 @@
     <timers>
         <LinkDiscovery>12</LinkDiscovery>
         <SwitchDiscovery>12</SwitchDiscovery>
+        <gossip>5</gossip>
     </timers>
     <kill>
         <switch> s5 </switch>
diff --git a/TestON/tests/HAsingleInstanceRestart/HAsingleInstanceRestart.py b/TestON/tests/HAsingleInstanceRestart/HAsingleInstanceRestart.py
index bdcf969..0883484 100644
--- a/TestON/tests/HAsingleInstanceRestart/HAsingleInstanceRestart.py
+++ b/TestON/tests/HAsingleInstanceRestart/HAsingleInstanceRestart.py
@@ -609,14 +609,16 @@
         gossipTime = intentStop - intentStart
         main.log.info( "It took about " + str( gossipTime ) +
                         " seconds for all intents to appear in each node" )
-        # FIXME: make this time configurable/calculate based off of number of
-        #        nodes and gossip rounds
+        gossipPeriod = int( main.params['timers']['gossip'] )
+        maxGossipTime = gossipPeriod * len( main.nodes )
         utilities.assert_greater_equals(
-                expect=40, actual=gossipTime,
+                expect=maxGossipTime, actual=gossipTime,
                 onpass="ECM anti-entropy for intents worked within " +
                        "expected time",
-                onfail="Intent ECM anti-entropy took too long" )
-        if gossipTime <= 40:
+                onfail="Intent ECM anti-entropy took too long. " +
+                       "Expected time:{}, Actual time:{}".format( maxGossipTime,
+                                                                  gossipTime ) )
+        if gossipTime <= maxGossipTime:
             intentAddResult = True
 
         if not intentAddResult or "key" in pendingMap:
diff --git a/TestON/tests/HAsingleInstanceRestart/dependencies/obelisk.py b/TestON/tests/HAsingleInstanceRestart/dependencies/obelisk.py
index 4378a9b..d613806 100755
--- a/TestON/tests/HAsingleInstanceRestart/dependencies/obelisk.py
+++ b/TestON/tests/HAsingleInstanceRestart/dependencies/obelisk.py
@@ -67,4 +67,3 @@
 if __name__ == '__main__':
     setLogLevel( 'info' )
     run()
-