if-index should not be released when port is removed on the switch 23/36123/1
authorFaseela K <faseela.k@ericsson.com>
Thu, 3 Mar 2016 08:02:01 +0000 (13:32 +0530)
committerFaseela K <faseela.k@ericsson.com>
Fri, 11 Mar 2016 12:37:40 +0000 (18:07 +0530)
Change-Id: I95956f34ae4f87c2b12eb155dda3a9b2883a4b28
Signed-off-by: Faseela K <faseela.k@ericsson.com>
interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/renderer/ovs/statehelpers/OvsInterfaceStateRemoveHelper.java

index e44694eae42deea6e85e664fac7ea7c0f1352baa..6947f4026a1ad25f441feec86da9bdf4f689ca1c 100644 (file)
@@ -96,11 +96,8 @@ public class OvsInterfaceStateRemoveHelper {
         InterfaceChildEntry higherlayerChild = interfaceParentEntry.getInterfaceChildEntry().get(0);
         InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface>
                 higerLayerChildIfStateId = IfmUtil.buildStateInterfaceId(higherlayerChild.getChildInterface());
         InterfaceChildEntry higherlayerChild = interfaceParentEntry.getInterfaceChildEntry().get(0);
         InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface>
                 higerLayerChildIfStateId = IfmUtil.buildStateInterfaceId(higherlayerChild.getChildInterface());
-                /* Remove entry from if-index-interface-name map and deallocate Id from Idmanager. */
         Interface higherLayerIfChildState = InterfaceManagerCommonUtils.getInterfaceStateFromOperDS(higherlayerChild.getChildInterface(), dataBroker);
         if (interfaceState != null) {
         Interface higherLayerIfChildState = InterfaceManagerCommonUtils.getInterfaceStateFromOperDS(higherlayerChild.getChildInterface(), dataBroker);
         if (interfaceState != null) {
-            InterfaceMetaUtils.removeLportTagInterfaceMap(transaction, idManager, dataBroker, higherLayerIfChildState.getName(),
-                    higherLayerIfChildState.getIfIndex());
             transaction.delete(LogicalDatastoreType.OPERATIONAL, higerLayerChildIfStateId);
             FlowBasedServicesUtils.removeIngressFlow(higherLayerIfChildState.getName(), dpId, transaction);
         }
             transaction.delete(LogicalDatastoreType.OPERATIONAL, higerLayerChildIfStateId);
             FlowBasedServicesUtils.removeIngressFlow(higherLayerIfChildState.getName(), dpId, transaction);
         }
@@ -114,10 +111,8 @@ public class OvsInterfaceStateRemoveHelper {
             for (InterfaceChildEntry interfaceChildEntry : higherLayerParent.getInterfaceChildEntry()) {
                 InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface> ifChildStateId =
                         IfmUtil.buildStateInterfaceId(interfaceChildEntry.getChildInterface());
             for (InterfaceChildEntry interfaceChildEntry : higherLayerParent.getInterfaceChildEntry()) {
                 InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface> ifChildStateId =
                         IfmUtil.buildStateInterfaceId(interfaceChildEntry.getChildInterface());
-                /* Remove entry from if-index-interface-name map and deallocate Id from Idmanager. */
                 Interface childInterfaceState = InterfaceManagerCommonUtils.getInterfaceStateFromOperDS(interfaceChildEntry.getChildInterface(), dataBroker);
                 if (childInterfaceState != null) {
                 Interface childInterfaceState = InterfaceManagerCommonUtils.getInterfaceStateFromOperDS(interfaceChildEntry.getChildInterface(), dataBroker);
                 if (childInterfaceState != null) {
-                    InterfaceMetaUtils.removeLportTagInterfaceMap(transaction, idManager, dataBroker, childInterfaceState.getName(), childInterfaceState.getIfIndex());
                     transaction.delete(LogicalDatastoreType.OPERATIONAL, ifChildStateId);
                     FlowBasedServicesUtils.removeIngressFlow(childInterfaceState.getName(), dpId, transaction);
                 }
                     transaction.delete(LogicalDatastoreType.OPERATIONAL, ifChildStateId);
                     FlowBasedServicesUtils.removeIngressFlow(childInterfaceState.getName(), dpId, transaction);
                 }