diff options
author | Martin Banszel <martinx.banszel@intel.com> | 2017-07-19 19:35:02 +0000 |
---|---|---|
committer | Ross Brattain <ross.b.brattain@intel.com> | 2017-09-05 17:48:02 -0700 |
commit | d3ee35dc0015e073b7138f3b02508b40fc6288b1 (patch) | |
tree | d5350f427a7ba6dcea8d36b00ae217d0074f0511 /yardstick/network_services/vnf_generic/vnf/sample_vnf.py | |
parent | 79e811f096f8640189fc75862535f1f0cc4773c5 (diff) |
Add fixes for heat deployed UDP_Replay and TRex
- Added a PROTOCOL_MAP to map the protocol names to codes -- the scapy
requires the code, it fails if the proto is set e.g. to 'udp'
- ip addresses must be str, not unicode -- explicit conversion to str
added
- removed unittest for setup_vnf_environment in test_tg_trex.py as
it is the same function as already tested in test_sample_vnf.py
- traffic_profile refactored -- code repetition decreased, unittest
adapted
Known issues:
- there is a an attempt to stop already stopped trex. It fires an
exception that stop command is issued on the disconnected client.
Change-Id: I87e9029630f48b30e8f5b4f9d88ab3b25fd65f03
Signed-off-by: Martin Banszel <martinx.banszel@intel.com>
Diffstat (limited to 'yardstick/network_services/vnf_generic/vnf/sample_vnf.py')
-rw-r--r-- | yardstick/network_services/vnf_generic/vnf/sample_vnf.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py index 9a7d39913..1b2533aad 100644 --- a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py +++ b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py @@ -680,19 +680,19 @@ class ScenarioHelper(object): @property def task_path(self): - return self.scenario_cfg["task_path"] + return self.scenario_cfg['task_path'] @property def nodes(self): - return self.scenario_cfg['nodes'] + return self.scenario_cfg.get('nodes') @property def all_options(self): - return self.scenario_cfg["options"] + return self.scenario_cfg.get('options', {}) @property def options(self): - return self.all_options[self.name] + return self.all_options.get(self.name, {}) @property def vnf_cfg(self): @@ -742,7 +742,6 @@ class SampleVNF(GenericVNF): self.q_out = Queue() self.queue_wrapper = None self.run_kwargs = {} - self.scenario_cfg = None self.tg_port_pairs = None self.used_drivers = {} self.vnf_port_pairs = None @@ -937,7 +936,6 @@ class SampleVNFTrafficGen(GenericTrafficGen): def instantiate(self, scenario_cfg, context_cfg): self.scenario_helper.scenario_cfg = scenario_cfg self.resource_helper.generate_cfg() - self.setup_helper.setup_vnf_environment() self.resource_helper.setup() LOG.info("Starting %s server...", self.APP_NAME) |