Add failNode and recoverNode methods to Experiment class

refs: #3085

Change-Id: Ib99edc1c7a201f16c993aa0e0c4791c2eea15a35
diff --git a/ndn/experiments/failure_experiment.py b/ndn/experiments/failure_experiment.py
index 3f34789..8bca445 100644
--- a/ndn/experiments/failure_experiment.py
+++ b/ndn/experiments/failure_experiment.py
@@ -44,8 +44,7 @@
         # Bring down CSU
         for host in self.net.hosts:
             if host.name == "csu":
-                print("Bringing CSU down")
-                host.nfd.stop()
+                self.failNode(host)
                 break
 
         # CSU is down for 2 minutes
@@ -54,11 +53,7 @@
         # Bring CSU back up
         for host in self.net.hosts:
             if host.name == "csu":
-                print("Bringing CSU up")
-                host.nfd.start()
-                host.nlsr.start()
-                host.nfd.setStrategy("/ndn/edu", self.strategy)
-                host.cmd("ndnpingserver /ndn/edu/" + str(host) + " > ping-server &")
+                self.recoverNode(host)
 
                 for other in self.net.hosts:
                     if host.name != other.name: