use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.ParentRefs in project genius by opendaylight.
the class HwVTEPConfigListener method remove.
@Override
public void remove(@Nonnull Interface removedInterface) {
// HwVTEPs support only VXLAN
IfTunnel ifTunnel = removedInterface.getAugmentation(IfTunnel.class);
if (ifTunnel != null && ifTunnel.getTunnelInterfaceType().isAssignableFrom(TunnelTypeVxlan.class)) {
ParentRefs parentRefs = removedInterface.getAugmentation(ParentRefs.class);
if (parentRefs != null && parentRefs.getNodeIdentifier() != null) {
LOG.debug("Received HwVTEP Interface Remove Event: {}", removedInterface.getName());
LOG.trace("Received HwVTEP Interface Remove Event: {}", removedInterface);
for (NodeIdentifier nodeIdentifier : parentRefs.getNodeIdentifier()) {
if (SouthboundUtils.HWVTEP_TOPOLOGY.equals(nodeIdentifier.getTopologyId())) {
coordinator.enqueueJob(removedInterface.getName(), () -> HwVTEPConfigRemoveHelper.removeConfiguration(txRunner, removedInterface, createPhysicalSwitchInstanceIdentifier(nodeIdentifier.getNodeId()), createGlobalNodeInstanceIdentifier(nodeIdentifier.getNodeId())), IfmConstants.JOB_MAX_RETRIES);
}
}
}
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.ParentRefs in project genius by opendaylight.
the class InterfaceConfigListener method remove.
@Override
protected void remove(InstanceIdentifier<Interface> key, Interface interfaceOld) {
interfaceManagerCommonUtils.removeFromInterfaceCache(interfaceOld);
if (!entityOwnershipUtils.isEntityOwner(IfmConstants.INTERFACE_CONFIG_ENTITY, IfmConstants.INTERFACE_CONFIG_ENTITY)) {
return;
}
LOG.debug("Received Interface Remove Event: {}, {}", key, interfaceOld);
ParentRefs parentRefs = interfaceOld.getAugmentation(ParentRefs.class);
if (parentRefs == null || parentRefs.getDatapathNodeIdentifier() == null && parentRefs.getParentInterface() == null) {
LOG.debug("parent refs not specified for {}", interfaceOld.getName());
return;
}
boolean isTunnelInterface = InterfaceManagerCommonUtils.isTunnelInterface(interfaceOld);
RendererConfigRemoveWorker configWorker = new RendererConfigRemoveWorker(key, interfaceOld, interfaceOld.getName(), parentRefs);
String synchronizationKey = isTunnelInterface ? parentRefs.getDatapathNodeIdentifier().toString() : parentRefs.getParentInterface();
coordinator.enqueueJob(synchronizationKey, configWorker, IfmConstants.JOB_MAX_RETRIES);
}
Aggregations