Archive the onos logs by first checking for the presence of shared cluster volumes for karaf logs.
Archive everything if it exists.
Otherwise fall back to ssh to each onos instance like before to collect and zip karaf.log.

Change-Id: Ied6d9a38394ede50984fab3c10cfe2d1737b1cbb
diff --git a/src/test/cluster/clusterTest.py b/src/test/cluster/clusterTest.py
index b1b62c8..926b4f2 100644
--- a/src/test/cluster/clusterTest.py
+++ b/src/test/cluster/clusterTest.py
@@ -373,6 +373,9 @@
                     if failed:
                         log.info('Leaders command failed on nodes: %s' %failed)
                         log.error('Test failed on ITERATION %d' %iteration)
+                        CordLogger.archive_results(self._testMethodName,
+                                                   controllers = controllers,
+                                                   iteration = 'FAILED')
                         assert_equal(len(failed), 0)
                     return controller
 
@@ -466,6 +469,9 @@
                 if storage_exceptions:
                     log.info('Storage exception seen on nodes: %s' %storage_exceptions)
                     log.error('Test failed on ITERATION %d' %iteration)
+                    CordLogger.archive_results('test_cluster_single_controller_restarts',
+                                               controllers = controllers,
+                                               iteration = 'FAILED')
                     assert_equal(len(failed), 0)
                     return controller
 
@@ -542,6 +548,9 @@
                 if storage_exceptions:
                     log.info('Storage exception seen on nodes: %s' %storage_exceptions)
                     log.error('Test failed on ITERATION %d' %iteration)
+                    CordLogger.archive_results('test_cluster_restarts',
+                                               controllers = controllers,
+                                               iteration = 'FAILED')
                     assert_equal(len(failed), 0)
                     return
 
@@ -552,6 +561,9 @@
                 log.info('ONOS cluster on node %s formed with controllers: %s' %(ctlr, ips))
                 if len(ips) != len(controllers):
                     log.error('Test failed on ITERATION %d' %iteration)
+                    CordLogger.archive_results('test_cluster_restarts',
+                                               controllers = controllers,
+                                               iteration = 'FAILED')
                 assert_equal(len(ips), len(controllers))
 
         tries = 10