Add graceful ONOS restart test case.
New cli command to shutdown ONOS gracefully.
Changes to cluster tests to avoid restarting by name since with async restarts,
ip to container name map cannot be mapped to nodes status output.
Add robot cluster controller test case to gracefully restart controllers.

Change-Id: I1b2006e06e876c4456e24aa9237db5b2ea0ae795
diff --git a/src/test/cli/onosclidriver.py b/src/test/cli/onosclidriver.py
index eb64194..ca43f7a 100644
--- a/src/test/cli/onosclidriver.py
+++ b/src/test/cli/onosclidriver.py
@@ -487,6 +487,31 @@
             main.cleanup()
             main.exit()
 
+    def shutdown( self, timeout = 5):
+        """
+        Shuts down ONOS
+        """
+        try:
+            self.handle.sendline("shutdown now")
+            self.handle.expect("yes/no", timeout = timeout)
+            self.handle.sendline("yes")
+            return main.TRUE
+        except AssertionError:
+            main.log.exception( "" )
+            return None
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
+        except pexpect.EOF:
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
+            main.cleanup()
+            main.exit()
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
     # IMPORTANT NOTE:
     # For all cli commands, naming convention should match
     # the cli command changing 'a:b' with 'aB'.