Remove arbitrary arguments in favor of parsing arguments from experiment files.

refs: #4611

Change-Id: Ic668b58766fef8a1e537ccaacf82230b3fb50923
diff --git a/ndn/experiment_manager.py b/ndn/experiment_manager.py
index 5f2a174..d8ec0eb 100644
--- a/ndn/experiment_manager.py
+++ b/ndn/experiment_manager.py
@@ -35,7 +35,6 @@
 
     def __init__(self):
         self.experiments = {}
-        self.expArgs = {}
 
     def loadModules(self):
         currentDir = os.path.dirname(__file__)
@@ -52,12 +51,6 @@
     def register(self, name, experimentClass):
         if name not in self.experiments:
             self.experiments[name] = experimentClass
-            try:
-                helpStr = experimentClass.arguments()
-                if type(helpStr) is str:
-                    self.expArgs[name] = experimentClass.arguments()
-            except:
-                pass
         else:
             raise _ExperimentManager.Error("Experiment '%s' has already been registered" % name)
 
@@ -92,7 +85,9 @@
 
     return experimentNames
 
-def getExperimentArgs():
+def addExperimentArgs(parser):
+    # Find all experiment command line arguments and parse them.
     manager = __getInstance()
-
-    return manager.expArgs
+    for name in manager.experiments:
+        if hasattr(manager.experiments[name], "parseArguments"):
+            manager.experiments[name].parseArguments(parser)
\ No newline at end of file