X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsal%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fcore%2FContainerFlow.java;h=468313c164384befcc5f9477f4a5670609d95caf;hb=f39d905d65a6cbf23990f8c680a22402f19213ea;hp=ebf623b7b00ff8bcf9dd784530b61de735bb0839;hpb=8398f3adb544427642694be13abe9c3bc1a4e192;p=controller.git diff --git a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/ContainerFlow.java b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/ContainerFlow.java index ebf623b7b0..468313c164 100644 --- a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/ContainerFlow.java +++ b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/ContainerFlow.java @@ -17,6 +17,7 @@ import org.opendaylight.controller.sal.action.SetNwDst; import org.opendaylight.controller.sal.action.SetNwSrc; import org.opendaylight.controller.sal.action.SetTpDst; import org.opendaylight.controller.sal.action.SetTpSrc; +import org.opendaylight.controller.sal.action.SetVlanId; import org.opendaylight.controller.sal.flowprogrammer.Flow; import org.opendaylight.controller.sal.match.Match; import org.opendaylight.controller.sal.match.MatchType; @@ -54,18 +55,23 @@ public class ContainerFlow implements Serializable { @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } ContainerFlow other = (ContainerFlow) obj; if (match == null) { - if (other.match != null) + if (other.match != null) { return false; - } else if (!match.equals(other.match)) + } + } else if (!match.equals(other.match)) { return false; + } return true; } @@ -95,6 +101,11 @@ public class ContainerFlow implements Serializable { Match actionMatch = new Match(); for (Action action : flow.getActions()) { switch (action.getType()) { + case SET_VLAN_ID: + actionMatch.setField(MatchType.DL_VLAN, + ((Integer) ((SetVlanId) action).getVlanId()) + .shortValue()); + break; case SET_DL_TYPE: actionMatch.setField(MatchType.DL_TYPE, ((Integer) ((SetDlType) action).getDlType())