aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/vnf_controller.py9
-rw-r--r--core/vswitch_controller_pvp.py2
-rw-r--r--core/vswitch_controller_pvvp.py2
3 files changed, 9 insertions, 4 deletions
diff --git a/core/vnf_controller.py b/core/vnf_controller.py
index 39a63044..8800ccaf 100644
--- a/core/vnf_controller.py
+++ b/core/vnf_controller.py
@@ -15,6 +15,7 @@
"""
import logging
+import pexpect
from vnfs.vnf.vnf import IVnf
class VnfController(object):
@@ -68,8 +69,12 @@ class VnfController(object):
"""
self._logger.debug('start ' + str(len(self._vnfs)) +
' VNF[s] with ' + ' '.join(map(str, self._vnfs)))
- for vnf in self._vnfs:
- vnf.start()
+ try:
+ for vnf in self._vnfs:
+ vnf.start()
+ except pexpect.TIMEOUT:
+ self.stop()
+ raise
def stop(self):
"""Stops all VNFs set-up by __init__.
diff --git a/core/vswitch_controller_pvp.py b/core/vswitch_controller_pvp.py
index 0c98cc7f..a4f61961 100644
--- a/core/vswitch_controller_pvp.py
+++ b/core/vswitch_controller_pvp.py
@@ -77,7 +77,7 @@ class VswitchControllerPVP(IVswitchController):
self._vswitch.add_flow(bridge, flow1)
self._vswitch.add_flow(bridge, flow2)
- if self._traffic['bidir']:
+ if self._traffic['bidir'] == 'True':
flow3 = add_ports_to_flow(flow_template, phy2_number,
vport2_number)
flow4 = add_ports_to_flow(flow_template, vport1_number,
diff --git a/core/vswitch_controller_pvvp.py b/core/vswitch_controller_pvvp.py
index c79ad9a3..729aca3f 100644
--- a/core/vswitch_controller_pvvp.py
+++ b/core/vswitch_controller_pvvp.py
@@ -82,7 +82,7 @@ class VswitchControllerPVVP(IVswitchController):
self._vswitch.add_flow(bridge, flow2)
self._vswitch.add_flow(bridge, flow3)
- if self._traffic['bidir']:
+ if self._traffic['bidir'] == 'True':
flow4 = add_ports_to_flow(flow_template, phy2_number,
vport4_number)
flow5 = add_ports_to_flow(flow_template, vport3_number,