On Fri, Oct 26, 2012 at 12:24:47PM -0700, Rich Lane wrote:
> Would it be ok if I added dummy.py (as platforms/ovs-dummy.py) to the
> OFTest repository? In the future I want to support maintaining platform
> modules separately from OFTest, but the DataPlanePort interface is going to
> change quite a bit before then. If ovs-dummy.py is versioned with the rest
> of OFTest I will keep it up to date.

That's OK with me.

Feel free to rename DataPlanePortUnix to something more OVS-specific
if you like.

Here's a separate patch that I applied to suppress the "Missing
pypcap" warning when the DataPlanePortUnix is used (since it doesn't
need pypcap).

diff --git a/src/python/oftest/dataplane.py b/src/python/oftest/dataplane.py
index 828f584..e23251f 100644
--- a/src/python/oftest/dataplane.py
+++ b/src/python/oftest/dataplane.py
@@ -314,17 +314,6 @@ class DataPlane:
 
         ############################################################
         #
-        # We use the DataPlanePort class defined here by 
-        # default for all port traffic:
-        #
-        if have_pypcap:
-            self.dppclass = DataPlanePortPcap
-        else:
-            self.logger.warning("Missing pypcap, VLAN tests may fail. See 
README for installation instructions.")
-            self.dppclass = DataPlanePort
-
-        ############################################################
-        #
         # The platform/config can provide a custom DataPlanePort class
         # here if you have a custom implementation with different
         # behavior. 
@@ -336,6 +325,11 @@ class DataPlane:
         if "dataplane" in self.config:
             if "portclass" in self.config["dataplane"]:
                 self.dppclass = self.config["dataplane"]["portclass"]
+        elif have_pypcap:
+            self.dppclass = DataPlanePortPcap
+        else:
+            self.logger.warning("Missing pypcap, VLAN tests may fail. See 
README for installation instructions.")
+            self.dppclass = DataPlanePort
 
         if self.dppclass == None:
             raise Exception("Problem determining DataPlanePort class.")
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to