hotfix for get model - does not work on regression 53/5253/1
authorHanoh Haim <[email protected]>
Sun, 15 Jan 2017 17:48:36 +0000 (19:48 +0200)
committerHanoh Haim <[email protected]>
Sun, 15 Jan 2017 17:48:36 +0000 (19:48 +0200)
Signed-off-by: Hanoh Haim <[email protected]>
scripts/automation/regression/stateful_tests/trex_general_test.py

index 24c3878..64f2714 100755 (executable)
@@ -97,9 +97,11 @@ class CTRexGeneral_Test(unittest.TestCase):
                 CTRexScenario.router.load_platform_data_from_file(device_cfg)
                 CTRexScenario.router.launch_connection(device_cfg)
                 if CTRexScenario.router_cfg['forceImageReload']:
-                    running_image = CTRexScenario.router.get_running_image_details()['image']
-                    setup['dut'] =CTRexScenario.router.get_running_image_details()['model']
+                    image_d=CTRexScenario.router.get_running_image_details();
+                    running_image = image_d['image']
+                    setup['dut'] =image_d.get('model','router');
                     print('Current router image: %s' % running_image)
+                    print('Current router model : %s' % setup['dut'])
                     needed_image = device_cfg.get_image_name()
                     if not CTRexScenario.router.is_image_matches(needed_image):
                         print('Setting router image: %s' % needed_image)