Fixed client interactive example of the Python API
authorDan Klein <[email protected]>
Wed, 15 Jul 2015 07:00:39 +0000 (10:00 +0300)
committerDan Klein <[email protected]>
Wed, 15 Jul 2015 07:00:39 +0000 (10:00 +0300)
scripts/automation/trex_control_plane/examples/client_interactive_example.py
scripts/automation/trex_control_plane/python_lib/termstyle/__init__.py [new file with mode: 0644]

index e8d358a..d40d08c 100755 (executable)
@@ -30,7 +30,7 @@ class InteractiveTRexClient(cmd.Cmd):
                                         d = 100,   
                                         f = 'avl/sfr_delay_10_1g.yaml',
                                         l = 1000)
-        self.run_params = self.DEFAULT_RUN_PARAMS
+        self.run_params = dict(self.DEFAULT_RUN_PARAMS)
         self.decoder = json.JSONDecoder()
 
 
@@ -112,7 +112,7 @@ class InteractiveTRexClient(cmd.Cmd):
 
     def do_restore_run_default (self, line):
         """Restores original T-Rex running configuration"""
-        self.run_params = self.DEFAULT_RUN_PARAMS
+        self.run_params = dict(self.DEFAULT_RUN_PARAMS)
         print termstyle.green("*** End of restoring default run parameters ***")
 
     def do_run_until_finish (self, sample_rate):
diff --git a/scripts/automation/trex_control_plane/python_lib/termstyle/__init__.py b/scripts/automation/trex_control_plane/python_lib/termstyle/__init__.py
new file mode 100644 (file)
index 0000000..e69de29