Enabling vlan in flow spec in backend
[controller.git] / 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 + "}";
     }
 }