Bug 5184 - Datapath not working for single ELAN in single DPN when binding VLAN inter... 64/33964/1
authorFaseela K <faseela.k@ericsson.com>
Tue, 2 Feb 2016 12:31:33 +0000 (18:01 +0530)
committerFaseela K <faseela.k@ericsson.com>
Wed, 3 Feb 2016 11:27:31 +0000 (11:27 +0000)
Change-Id: I6c5c1ea66391065f1fc78c900aec492fc04f594b
Signed-off-by: Faseela K <faseela.k@ericsson.com>
(cherry picked from commit dd528be97ed5c59dc9f33465cee6c22eac587dbe)

interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/renderer/ovs/utilities/SouthboundUtils.java
interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/servicebindings/flowbased/utilities/FlowBasedServicesUtils.java

index 4bf4d42f30ca91a8003280e7e032c8a931ad773b..9cb7c1b831c9f87a6f6fddf0cf2a88b2b87a6e66 100644 (file)
@@ -106,7 +106,7 @@ public class SouthboundUtils {
 
         int vlanId = 0;
         IfL2vlan ifL2vlan = iface.getAugmentation(IfL2vlan.class);
-        if (ifL2vlan != null) {
+        if (ifL2vlan != null && ifL2vlan.getVlanId() != null) {
             vlanId = ifL2vlan.getVlanId().getValue();
         }
 
index 1624b0b593caf40a1b93505cf55a401f14393d6f..a9da21e276a5d8c0f8fdfcb83083c308b51dae6e 100644 (file)
@@ -76,11 +76,10 @@ public class FlowBasedServicesUtils {
         matches.add(new MatchInfo(MatchFieldType.in_port, new BigInteger[] {dpId, BigInteger.valueOf(portNo)}));
         int vlanId = 0;
         IfL2vlan l2vlan = iface.getAugmentation(IfL2vlan.class);
-        if(l2vlan != null){
+        if(l2vlan != null && l2vlan.getVlanId() != null){
             vlanId = l2vlan.getVlanId().getValue();
         }
         if (vlanId > 0) {
-            LOG.error("VlanId matching support is not fully available in Be.");
             matches.add(new MatchInfo(MatchFieldType.vlan_vid, new long[]{vlanId}));
         }
         return matches;
@@ -132,7 +131,7 @@ public class FlowBasedServicesUtils {
         List<Instruction> instructionSet = new ArrayList<Instruction>();
         int vlanId = 0;
         IfL2vlan l2vlan = iface.getAugmentation(IfL2vlan.class);
-        if(l2vlan != null){
+        if(l2vlan != null && l2vlan.getVlanId() != null){
             vlanId = l2vlan.getVlanId().getValue();
         }
         if (vlanId != 0) {