Merge "Add traffic duration support in test case"
[yardstick.git] / yardstick / network_services / vnf_generic / vnf / tg_landslide.py
index d4222c1..1575686 100644 (file)
@@ -600,6 +600,13 @@ class LandslideResourceHelper(sample_vnf.ClientResourceHelper):
     def create_test_session(self, test_session):
         # Use tcl client to create session
         test_session['library'] = self._user_id
+
+        # If no traffic duration set in test case, use predefined default value
+        # in session profile
+        test_session['duration'] = self.scenario_helper.all_options.get(
+            'traffic_duration',
+            test_session['duration'])
+
         LOG.debug("Creating session='%s'", test_session['name'])
         self._tcl.create_test_session(test_session)
 
@@ -754,7 +761,7 @@ class LandslideTclClient(object):
     TEST_NODE_CMD = \
         'ls::create -TestNode-{} -under $p_ -Type "eth"' \
         ' -Phy "{phy}" -Ip "{ip}" -NumLinksOrNodes {numLinksOrNodes}' \
-        ' -NextHop "{nextHop}" -Mac "{mac}" -MTU {mtu} ' \
+        ' -NextHop "{nextHop}" -Mac "{mac}" -MTU {mtu}' \
         ' -ForcedEthInterface "{forcedEthInterface}"' \
         ' -EthStatsEnabled {ethStatsEnabled}' \
         ' -VlanId {vlanId} -VlanUserPriority {vlanUserPriority}' \