@Test public void testRemoveGlobalNodeLabel() { testAddGlobalNodeLabel(); assertThat(distrPceStore.removeGlobalNodeLabel(deviceId1), is(true)); assertThat(distrPceStore.removeGlobalNodeLabel(deviceId2), is(true)); }
@Override public boolean removeGlobalNodeLabel(DeviceId id) { checkNotNull(id, DEVICE_ID_NULL); if (globalNodeLabelMap.remove(id) == null) { log.error("SR-TE node label deletion for device {} has failed.", id.toString()); return false; } return true; }
DistributedPceStore implements PceStore { @Override public boolean removeGlobalNodeLabel(DeviceId id) { checkNotNull(id, DEVICE_ID_NULL); if (globalNodeLabelMap.remove(id) == null) { log.error("SR-TE node label deletion for device {} has failed.", id.toString()); return false; } return true; } }
DistributedPceStore implements PceStore { @Override public boolean removeGlobalNodeLabel(DeviceId id) { checkNotNull(id, DEVICE_ID_NULL); if (globalNodeLabelMap.remove(id) == null) { log.error("SR-TE node label deletion for device {} has failed.", id.toString()); return false; } return true; }  }
DistributedPceStore implements PceStore { @Override public boolean removeGlobalNodeLabel(DeviceId id) { checkNotNull(id, DEVICE_ID_NULL); if (globalNodeLabelMap.remove(id) == null) { log.error("SR-TE node label deletion for device {} has failed.", id.toString()); return false; } return true; }  @Override boolean existsGlobalNodeLabel(DeviceId id); @Override boolean existsAdjLabel(Link link); @Override boolean existsTunnelInfo(TunnelId tunnelId); @Override boolean existsFailedPathInfo(PcePathInfo failedPathInfo); @Override int getGlobalNodeLabelCount(); @Override int getAdjLabelCount(); @Override int getTunnelInfoCount(); @Override int getFailedPathInfoCount(); @Override Map<DeviceId, LabelResourceId> getGlobalNodeLabels(); @Override Map<Link, LabelResourceId> getAdjLabels(); @Override Map<TunnelId, PceccTunnelInfo> getTunnelInfos(); @Override Iterable<PcePathInfo> getFailedPathInfos(); @Override LabelResourceId getGlobalNodeLabel(DeviceId id); @Override LabelResourceId getAdjLabel(Link link); @Override PceccTunnelInfo getTunnelInfo(TunnelId tunnelId); @Override void addGlobalNodeLabel(DeviceId deviceId, LabelResourceId labelId); @Override void addAdjLabel(Link link, LabelResourceId labelId); @Override void addTunnelInfo(TunnelId tunnelId, PceccTunnelInfo pceccTunnelInfo); @Override void addFailedPathInfo(PcePathInfo failedPathInfo); @Override boolean updateTunnelInfo(TunnelId tunnelId, List<LspLocalLabelInfo> lspLocalLabelInfoList); @Override boolean updateTunnelInfo(TunnelId tunnelId, ResourceConsumer tunnelConsumerId); @Override boolean removeGlobalNodeLabel(DeviceId id); @Override boolean removeAdjLabel(Link link); @Override boolean removeTunnelInfo(TunnelId tunnelId); @Override boolean removeFailedPathInfo(PcePathInfo failedPathInfo); @Override boolean addLsrIdDevice(String lsrId, DeviceId deviceId); @Override boolean removeLsrIdDevice(String lsrId); @Override DeviceId getLsrIdDevice(String lsrId); @Override boolean addPccLsr(DeviceId lsrId); @Override boolean removePccLsr(DeviceId lsrId); @Override boolean hasPccLsr(DeviceId lsrId); }
DistributedPceStore implements PceStore { @Override public boolean removeGlobalNodeLabel(DeviceId id) { checkNotNull(id, DEVICE_ID_NULL); if (globalNodeLabelMap.remove(id) == null) { log.error("SR-TE node label deletion for device {} has failed.", id.toString()); return false; } return true; }  @Override boolean existsGlobalNodeLabel(DeviceId id); @Override boolean existsAdjLabel(Link link); @Override boolean existsTunnelInfo(TunnelId tunnelId); @Override boolean existsFailedPathInfo(PcePathInfo failedPathInfo); @Override int getGlobalNodeLabelCount(); @Override int getAdjLabelCount(); @Override int getTunnelInfoCount(); @Override int getFailedPathInfoCount(); @Override Map<DeviceId, LabelResourceId> getGlobalNodeLabels(); @Override Map<Link, LabelResourceId> getAdjLabels(); @Override Map<TunnelId, PceccTunnelInfo> getTunnelInfos(); @Override Iterable<PcePathInfo> getFailedPathInfos(); @Override LabelResourceId getGlobalNodeLabel(DeviceId id); @Override LabelResourceId getAdjLabel(Link link); @Override PceccTunnelInfo getTunnelInfo(TunnelId tunnelId); @Override void addGlobalNodeLabel(DeviceId deviceId, LabelResourceId labelId); @Override void addAdjLabel(Link link, LabelResourceId labelId); @Override void addTunnelInfo(TunnelId tunnelId, PceccTunnelInfo pceccTunnelInfo); @Override void addFailedPathInfo(PcePathInfo failedPathInfo); @Override boolean updateTunnelInfo(TunnelId tunnelId, List<LspLocalLabelInfo> lspLocalLabelInfoList); @Override boolean updateTunnelInfo(TunnelId tunnelId, ResourceConsumer tunnelConsumerId); @Override boolean removeGlobalNodeLabel(DeviceId id); @Override boolean removeAdjLabel(Link link); @Override boolean removeTunnelInfo(TunnelId tunnelId); @Override boolean removeFailedPathInfo(PcePathInfo failedPathInfo); @Override boolean addLsrIdDevice(String lsrId, DeviceId deviceId); @Override boolean removeLsrIdDevice(String lsrId); @Override DeviceId getLsrIdDevice(String lsrId); @Override boolean addPccLsr(DeviceId lsrId); @Override boolean removePccLsr(DeviceId lsrId); @Override boolean hasPccLsr(DeviceId lsrId);  }