diff options
author | Moshe <moshehoa@amdocs.com> | 2018-03-25 17:00:40 +0300 |
---|---|---|
committer | Moshe <moshehoa@amdocs.com> | 2018-03-25 18:07:32 +0300 |
commit | ea90f9ba9d0e317dfc5521dda9946844b7336abd (patch) | |
tree | 24b8d699b7d8166f9b8597d1f72c4557db3906bf /vnftest/core/task.py | |
parent | 583448a180e36b5b406fa9542392ea0400914700 (diff) |
Add unit tests and handle coverage
Issue-ID: VNFSDK-183
Change-Id: I228576f5c06b371164bcd653d23cf169098436a8
Signed-off-by: Moshe <moshehoa@amdocs.com>
handle coverage
Issue-ID: VNFSDK-183
Change-Id: I3d78293fdf5cb8bc57caa4078ab8fa5baa429a0d
Signed-off-by: Moshe <moshehoa@amdocs.com>
Diffstat (limited to 'vnftest/core/task.py')
-rw-r--r-- | vnftest/core/task.py | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/vnftest/core/task.py b/vnftest/core/task.py index a2963a5..8ce897b 100644 --- a/vnftest/core/task.py +++ b/vnftest/core/task.py @@ -258,7 +258,8 @@ class Task(object): # pragma: no cover def _run(self, steps, run_in_parallel, output_file): """Deploys context and calls runners""" - self.context.deploy() + if self.context: + self.context.deploy() background_runners = [] result = [] @@ -547,31 +548,6 @@ def _is_background_step(step): return False -def parse_nodes_with_context(step_cfg): - """parse the 'nodes' fields in step """ - # ensure consistency in node instantiation order - return OrderedDict((nodename, Context.get_server(step_cfg["nodes"][nodename])) - for nodename in sorted(step_cfg["nodes"])) - - -def get_networks_from_nodes(nodes): - """parse the 'nodes' fields in step """ - networks = {} - for node in nodes.values(): - if not node: - continue - interfaces = node.get('interfaces', {}) - for interface in interfaces.values(): - # vld_id is network_name - network_name = interface.get('network_name') - if not network_name: - continue - network = Context.get_network(network_name) - if network: - networks[network['name']] = network - return networks - - def runner_join(runner, background_runners, outputs, result): """join (wait for) a runner, exit process at runner failure :param background_runners: |