Changes to ONOS cluster tests.
Wait for sometime before ONOS restart.
Handle leaders command exception in the cluster restart test before failing the test.

Change-Id: If8afbef1e09657619e7230ddadd818a7598442d7
diff --git a/src/test/utils/CordContainer.py b/src/test/utils/CordContainer.py
index a228819..a5dbdc6 100644
--- a/src/test/utils/CordContainer.py
+++ b/src/test/utils/CordContainer.py
@@ -570,7 +570,7 @@
             onos.remove_container(onos.name, force=True)
 
     @classmethod
-    def restart_node(cls, node = None, network_cfg = None):
+    def restart_node(cls, node = None, network_cfg = None, timeout = 10):
         if node is None:
             cls(restart = True, network_cfg = network_cfg, image = cls.IMAGE, tag = cls.TAG)
         else:
@@ -581,6 +581,8 @@
                 if onos.exists():
                     onos.kill()
                 onos.remove_container(onos.name, force=True)
+                if timeout > 0:
+                    time.sleep(timeout)
                 print('Restarting ONOS container %s' %onos.name)
                 onos.start(ports = onos.ports, environment = onos.env,
                            host_config = onos.host_config, volumes = onos.volumes, tty = True)