Enabling vlan in flow spec in backend 22/2322/4
authorAlessandro Boch <aboch@cisco.com>
Fri, 1 Nov 2013 18:17:05 +0000 (11:17 -0700)
committerGiovanni Meo <gmeo@cisco.com>
Tue, 5 Nov 2013 12:21:56 +0000 (13:21 +0100)
Change-Id: Idfc779b7f0b6b583b96566b1b0aeb321feb394d1
Signed-off-by: Alessandro Boch <aboch@cisco.com>
opendaylight/containermanager/api/src/main/java/org/opendaylight/controller/containermanager/ContainerFlowConfig.java

index c9b5dab8080f36d96a301db894845abafa1ca028..baa2c782538255b6da9dfff772d10406e9eabf47 100644 (file)
@@ -707,6 +707,9 @@ public class ContainerFlowConfig implements Serializable {
         List<Match> matches = new ArrayList<Match>();
         Match match = new Match();
 
+        if (this.dlVlan != null && !this.dlVlan.isEmpty()) {
+            match.setField(MatchType.DL_VLAN, this.getVlanId());
+        }
         if (this.nwSrc != null && !this.nwSrc.trim().isEmpty()) {
             String parts[] = this.nwSrc.split("/");
             InetAddress ip = NetUtils.parseInetAddress(parts[0]);
@@ -760,7 +763,7 @@ public class ContainerFlowConfig implements Serializable {
      */
     @Override
     public String toString() {
-        return "Container Flow={name:" + name + " nwSrc:" + nwSrc + " nwDst:" + nwDst + " " + "protocol:" + protocol
+        return "Container Flow={name:" + name + " dlVlan:" + dlVlan + " nwSrc:" + nwSrc + " nwDst:" + nwDst + " " + "protocol:" + protocol
                 + " tpSrc:" + tpSrc + " tpDst:" + tpDst + "}";
     }
 }