X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=interfacemgr%2Finterfacemgr-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fvpnservice%2Finterfacemgr%2Fcommons%2FInterfaceMetaUtils.java;h=797e5597c73e737e9f1bd36b8b61af0a3781727a;hb=ee7fecc255770fcd4665b44da355df969bc8df4e;hp=3ce243cde34db7a59ef4ef89ba134d25c9db7286;hpb=658da81929c5b966b2261033339d0399e3436b49;p=vpnservice.git diff --git a/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/commons/InterfaceMetaUtils.java b/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/commons/InterfaceMetaUtils.java index 3ce243cd..797e5597 100644 --- a/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/commons/InterfaceMetaUtils.java +++ b/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/commons/InterfaceMetaUtils.java @@ -41,12 +41,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.met import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.meta.rev151007.bridge.ref.info.BridgeRefEntryKey; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.math.BigInteger; import java.util.ArrayList; import java.util.List; public class InterfaceMetaUtils { + private static final Logger LOG = LoggerFactory.getLogger(InterfaceMetaUtils.class); public static InstanceIdentifier getBridgeRefEntryIdentifier(BridgeRefEntryKey bridgeRefEntryKey) { InstanceIdentifier.InstanceIdentifierBuilder bridgeRefEntryInstanceIdentifierBuilder = InstanceIdentifier.builder(BridgeRefInfo.class) @@ -165,6 +168,7 @@ public class InterfaceMetaUtils { } public static void createLportTagInterfaceMap(WriteTransaction t, String infName, Integer ifIndex) { + LOG.debug("creating lport tag to interface map for {}",infName); InstanceIdentifier id = InstanceIdentifier.builder(IfIndexesInterfaceMap.class).child(IfIndexInterface.class, new IfIndexInterfaceKey(ifIndex)).build(); IfIndexInterface ifIndexInterface = new IfIndexInterfaceBuilder().setIfIndex(ifIndex).setKey(new IfIndexInterfaceKey(ifIndex)).setInterfaceName(infName).build(); t.put(LogicalDatastoreType.OPERATIONAL, id, ifIndexInterface, true); @@ -174,6 +178,7 @@ public class InterfaceMetaUtils { InstanceIdentifier id = InstanceIdentifier.builder(IfIndexesInterfaceMap.class).child(IfIndexInterface.class, new IfIndexInterfaceKey(ifIndex)).build(); Optional ifIndexesInterface = IfmUtil.read(LogicalDatastoreType.OPERATIONAL, id, broker); if(ifIndexesInterface.isPresent()) { + LOG.debug("removing lport tag to interface map for {}",infName); t.delete(LogicalDatastoreType.OPERATIONAL, id); } IfmUtil.releaseId(idManager, IfmConstants.IFM_IDPOOL_NAME, infName);