From 50c1a91b2cb7441475f3cd2aae659b62210bcf1b Mon Sep 17 00:00:00 2001 From: Orest Voznyy Date: Mon, 8 Oct 2018 20:06:02 +0300 Subject: Add traffic duration support in test case Implement code to support traffic_duration field in test case options. This updates the 'duration' in Landslide session profile. traffic_duration should always be much less than runner duration/timeout. JIRA: YARDSTICK-1427 Change-Id: I51094bade683ca8758136ccb619e8894a2ecef72 Signed-off-by: Orest Voznyy (cherry picked from commit ae2ceba66519555749c67eefe2170ea716a1411b) --- yardstick/network_services/vnf_generic/vnf/tg_landslide.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'yardstick/network_services') diff --git a/yardstick/network_services/vnf_generic/vnf/tg_landslide.py b/yardstick/network_services/vnf_generic/vnf/tg_landslide.py index a146b72ca..157568618 100644 --- a/yardstick/network_services/vnf_generic/vnf/tg_landslide.py +++ b/yardstick/network_services/vnf_generic/vnf/tg_landslide.py @@ -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) -- cgit 1.2.3-korg