Commiting improvements to Collector. Local_dir added to ExperimentController
[nepi.git] / examples / linux / ccn / two_nodes_file_retrieval.py
index 8e40c3b..10814ae 100644 (file)
@@ -34,8 +34,10 @@ import os
 ssh_key = ####### <<< ASSING the absolute path to the private SSH key to login into the remote host >>>
 ssh_user = ####### <<< ASSING the SSH username >>>
 
+results_dir = "/tmp/demo_CCN_results"
+
 ## Create the experiment controller
-ec = ExperimentController(exp_id = "demo_CCN")
+ec = ExperimentController(exp_id = "demo_CCN", local_dir = results_dir)
 
 ## Register node 1
 node1 = ec.register_resource("LinuxNode")
@@ -113,16 +115,13 @@ ec.register_connection(app, ccnd2)
 
 # Register a collector to automatically collect the ccnd logs
 # to a local directory
-results_dir = "/tmp/demo_CCN_results"
 col1 = ec.register_resource("Collector")
 ec.set(col1, "traceName", "stderr")
-ec.set(col1, "storeDir", results_dir)
 ec.set(col1, "subDir", hostname1)
 ec.register_connection(col1, ccnd1)
 
 col2 = ec.register_resource("Collector")
 ec.set(col2, "traceName", "stderr")
-ec.set(col2, "storeDir", results_dir)
 ec.set(col2, "subDir", hostname2)
 ec.register_connection(col2, ccnd2)