[ONOS-2276] Flow Test Suite
- tests flows with MAC address selectors
- tests flows with IPv4 selectors
- tests flows with vlan selector

Change-Id: I2c38a3449068b220742879b6b952b36e5572b3d3
diff --git a/TestON/tests/FUNCflow/Dependency/topo-flow.py b/TestON/tests/FUNCflow/Dependency/topo-flow.py
index 2299d9e..f9d58c1 100755
--- a/TestON/tests/FUNCflow/Dependency/topo-flow.py
+++ b/TestON/tests/FUNCflow/Dependency/topo-flow.py
@@ -14,24 +14,47 @@
 from mininet.util import dumpNodeConnections
 from mininet.node import ( UserSwitch, OVSSwitch, IVSSwitch )
 
+class VLANHost( Host ):
+    def config( self, vlan=100, **params ):
+        r = super( Host, self ).config( **params )
+        intf = self.defaultIntf()
+        self.cmd( 'ifconfig %s inet 0' % intf )
+        self.cmd( 'vconfig add %s %d' % ( intf, vlan ) )
+        self.cmd( 'ifconfig %s.%d inet %s' % ( intf, vlan, params['ip'] ) )
+        newName = '%s.%d' % ( intf, vlan )
+        intf.name = newName
+        self.nameToIntf[ newName ] = intf
+        return r
+
+class IPv6Host( Host ):
+    def config( self, v6Addr='1000:1/64', **params ):
+        r = super( Host, self ).config( **params )
+        intf = self.defaultIntf()
+        self.cmd( 'ifconfig %s inet 0' % intf )
+        self.cmd( 'ip -6 addr add %s dev %s' % ( v6Addr, intf ) )
+        return r
+
 class MyTopo( Topo ):
 
-    def __init__( self ):
+    def __init__( self, **opts ):
         # Initialize topology
-        Topo.__init__( self )
-        # Switch S5 Hosts
-        host1=self.addHost( 'h1', ip='10.1.0.1/24' )
-        host2=self.addHost( 'h2', ip='10.1.0.2/24' )
-        #host3=self.addHost( 'h3', ip='10.1.0.3/24', v6Addr='1000::3/64' )
-        #host4=self.addHost( 'h4', ip='10.1.0.4/24', v6Addr='1000::4/64' )
+        Topo.__init__( self, **opts)
+
+        # IPv4 hosts
+        host1=self.addHost( 'h1', ip='10.0.0.1/24' )
+        host2=self.addHost( 'h2', ip='10.0.0.2/24' )
+
+        # VLAN hosts
+        host3=self.addHost( 'h3', ip='10.0.0.3/24', cls=VLANHost, vlan=10 )
+        host4=self.addHost( 'h4', ip='10.0.0.4/24', cls=VLANHost, vlan=10 )
+
 
         s1 = self.addSwitch( 's1' )
-        #s2 = self.addSwitch( 's2' )
 
         self.addLink(s1, host1)
         self.addLink(s1, host2)
-        #self.addLink(s1, host3)
-        #self.addLink(s1, host4)
+        self.addLink(s1, host3)
+        self.addLink(s1, host4)
 
 
         topos = { 'mytopo': ( lambda: MyTopo() ) }
@@ -39,7 +62,7 @@
 def setupNetwork():
     "Create network"
     topo = MyTopo()
-    network = Mininet(topo=topo, autoSetMacs=True, controller=None)
+    network = Mininet(topo=topo, autoSetMacs=True, autoStaticArp=True, controller=None)
     network.start()
     CLI( network )
     network.stop()