/*
- * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
+ * Copyright (c) 2015 - 2016 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
WriteTransaction transaction = dataBroker.newWriteOnlyTransaction();
InstanceIdentifier<Interface> ifStateId = IfmUtil.buildStateInterfaceId(portName);
- /* Remove entry from if-index-interface-name map and deallocate Id from Idmanager. */
+
+ // delete the port entry from interface operational DS
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface interfaceState =
InterfaceManagerCommonUtils.getInterfaceStateFromOperDS(portName, dataBroker);
- if(interfaceState != null) {
- InterfaceMetaUtils.removeLportTagInterfaceMap(transaction, idManager, dataBroker, interfaceState.getName(), interfaceState.getIfIndex());
- }
-
transaction.delete(LogicalDatastoreType.OPERATIONAL, ifStateId);
InterfaceKey interfaceKey = new InterfaceKey(portName);
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) {
- InterfaceMetaUtils.removeLportTagInterfaceMap(transaction, idManager, dataBroker, higherLayerIfChildState.getName(),
- higherLayerIfChildState.getIfIndex());
+ if (interfaceState != null && higherLayerIfChildState != null) {
transaction.delete(LogicalDatastoreType.OPERATIONAL, higerLayerChildIfStateId);
FlowBasedServicesUtils.removeIngressFlow(higherLayerIfChildState.getName(), dpId, transaction);
}
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 (interfaceState != null) {
- InterfaceMetaUtils.removeLportTagInterfaceMap(transaction, idManager, dataBroker, childInterfaceState.getName(), childInterfaceState.getIfIndex());
+ if (childInterfaceState != null) {
transaction.delete(LogicalDatastoreType.OPERATIONAL, ifChildStateId);
FlowBasedServicesUtils.removeIngressFlow(childInterfaceState.getName(), dpId, transaction);
}
futures.add(transaction.submit());
return futures;
}
-}
\ No newline at end of file
+}