Merge pull request #31 from eswierk/master
Various changes
diff --git a/src/python/oftest/testutils.py b/src/python/oftest/testutils.py
index 480604d..32fa86c 100644
--- a/src/python/oftest/testutils.py
+++ b/src/python/oftest/testutils.py
@@ -338,17 +338,19 @@
if reply is None:
return -1
logging.debug(reply.show())
+ p = None
for idx in range(len(reply.ports)):
if reply.ports[idx].port_no == port_no:
+ p = reply.ports[idx]
break
- if idx >= len(reply.ports):
- return -1
mod = message.port_mod()
mod.port_no = port_no
- mod.hw_addr = reply.ports[idx].hw_addr
+ if p:
+ mod.hw_addr = p.hw_addr
mod.config = config
mod.mask = mask
- mod.advertise = reply.ports[idx].advertised
+ if p:
+ mod.advertise = p.advertised
controller.message_send(mod)
return 0
@@ -714,6 +716,8 @@
logging.info("Ran " + str(test_count) + " tests; exiting")
break
+ if not test_param_get('pktout_actions', default=True):
+ return
ingress_port = of_ports[0]
egr_ports = get_egr_list(parent, of_ports, egr_count,
diff --git a/tests/cxn.py b/tests/cxn.py
index 4b3ee59..34bacad 100644
--- a/tests/cxn.py
+++ b/tests/cxn.py
@@ -25,9 +25,6 @@
Base handshake case to set up controller, but do not send hello.
"""
- controllers = []
- default_timeout = 2
-
def controllerSetup(self, host, port):
con = controller.Controller(host=host,port=port)
@@ -42,6 +39,7 @@
def setUp(self):
logging.info("** START TEST CASE " + str(self))
+ self.controllers = []
self.default_timeout = test_param_get('default_timeout',
default=2)