diff options
author | Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com> | 2018-08-16 08:40:04 +0100 |
---|---|---|
committer | Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com> | 2018-08-16 10:26:02 +0100 |
commit | eed1b9cca960e7c7a3980d0a94b3589cf6b81eab (patch) | |
tree | 40bccad2af6878f5e7dc3c557226361afab5d433 /yardstick/benchmark/scenarios | |
parent | f32d9e5e452429905c8099db9b5d4a0fa14dff13 (diff) |
Fix setting `flow` configuration in TC yaml
The `flow` configuration is not applied to the traffic
profile if `seed` or `count` option is missing in the
TC definition.
- Fix `seed` backward compatibility.
JIRA: YARDSTICK-1383
Change-Id: Ic874fb2be1c13009f94eb3a80194bfe81d7a923b
Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
Diffstat (limited to 'yardstick/benchmark/scenarios')
-rw-r--r-- | yardstick/benchmark/scenarios/networking/vnf_generic.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/yardstick/benchmark/scenarios/networking/vnf_generic.py b/yardstick/benchmark/scenarios/networking/vnf_generic.py index 10f10d4e6..4884e57a8 100644 --- a/yardstick/benchmark/scenarios/networking/vnf_generic.py +++ b/yardstick/benchmark/scenarios/networking/vnf_generic.py @@ -117,8 +117,12 @@ class NetworkServiceTestCase(scenario_base.Scenario): for index, dst_port in enumerate(fflow.get("dst_port", [])): flow["dst_port_{}".format(index)] = dst_port - flow["count"] = fflow["count"] - flow["seed"] = fflow["seed"] + if "count" in fflow: + flow["count"] = fflow["count"] + + if "seed" in fflow: + flow["seed"] = fflow["seed"] + except KeyError: flow = {} return {"flow": flow} |