@Test public void testdeleteLsp() throws Exception { defaultIsisLsdb.deleteLsp(lsPdu); assertThat(defaultIsisLsdb, is(notNullValue())); lsPdu.setIsisPduType(IsisPduType.L2LSPDU.value()); defaultIsisLsdb.deleteLsp(lsPdu); assertThat(defaultIsisLsdb, is(notNullValue())); lsPdu.setIsisPduType(IsisPduType.L1CSNP.value()); defaultIsisLsdb.deleteLsp(lsPdu); assertThat(defaultIsisLsdb, is(notNullValue())); }
public void deleteLsp(IsisMessage lspMessage) { LsPdu lsp = (LsPdu) lspMessage; String lspKey = lsp.lspId(); LspWrapper lspWrapper = findLsp(lspMessage.isisPduType(), lspKey); switch (lsp.isisPduType()) { case L1LSPDU: isisL1Db.remove(lspKey); break; case L2LSPDU: isisL2Db.remove(lspKey); break; default: log.debug("Unknown LSP type to remove..!!!"); break; } try { lspWrapper.setLspProcessing(IsisConstants.LSPREMOVED); lspForProviderQueue.put(lspWrapper); } catch (Exception e) { log.debug("Added LSp In Blocking queue: {}", lspWrapper); } }
DefaultIsisLsdb implements IsisLsdb { public void deleteLsp(IsisMessage lspMessage) { LsPdu lsp = (LsPdu) lspMessage; String lspKey = lsp.lspId(); LspWrapper lspWrapper = findLsp(lspMessage.isisPduType(), lspKey); switch (lsp.isisPduType()) { case L1LSPDU: isisL1Db.remove(lspKey); break; case L2LSPDU: isisL2Db.remove(lspKey); break; default: log.debug("Unknown LSP type to remove..!!!"); break; } try { lspWrapper.setLspProcessing(IsisConstants.LSPREMOVED); lspForProviderQueue.put(lspWrapper); } catch (Exception e) { log.debug("Added LSp In Blocking queue: {}", lspWrapper); } } }
DefaultIsisLsdb implements IsisLsdb { public void deleteLsp(IsisMessage lspMessage) { LsPdu lsp = (LsPdu) lspMessage; String lspKey = lsp.lspId(); LspWrapper lspWrapper = findLsp(lspMessage.isisPduType(), lspKey); switch (lsp.isisPduType()) { case L1LSPDU: isisL1Db.remove(lspKey); break; case L2LSPDU: isisL2Db.remove(lspKey); break; default: log.debug("Unknown LSP type to remove..!!!"); break; } try { lspWrapper.setLspProcessing(IsisConstants.LSPREMOVED); lspForProviderQueue.put(lspWrapper); } catch (Exception e) { log.debug("Added LSp In Blocking queue: {}", lspWrapper); } } DefaultIsisLsdb(); }
DefaultIsisLsdb implements IsisLsdb { public void deleteLsp(IsisMessage lspMessage) { LsPdu lsp = (LsPdu) lspMessage; String lspKey = lsp.lspId(); LspWrapper lspWrapper = findLsp(lspMessage.isisPduType(), lspKey); switch (lsp.isisPduType()) { case L1LSPDU: isisL1Db.remove(lspKey); break; case L2LSPDU: isisL2Db.remove(lspKey); break; default: log.debug("Unknown LSP type to remove..!!!"); break; } try { lspWrapper.setLspProcessing(IsisConstants.LSPREMOVED); lspForProviderQueue.put(lspWrapper); } catch (Exception e) { log.debug("Added LSp In Blocking queue: {}", lspWrapper); } } DefaultIsisLsdb(); void setController(Controller controller); void setIsisInterface(List<IsisInterface> isisInterfaceList); void initializeDb(); void setL1LspSeqNo(int l1LspSeqNo); void setL2LspSeqNo(int l2LspSeqNo); String lspKey(String systemId); Map<String, LspWrapper> getL1Db(); Map<String, LspWrapper> getL2Db(); IsisLsdb isisLsdb(); List<LspWrapper> allLspHeaders(boolean excludeMaxAgeLsp); LspWrapper findLsp(IsisPduType pduType, String lspId); boolean addLsp(IsisMessage isisMessage, boolean isSelfOriginated, IsisInterface isisInterface); void removeLspFromBin(LspWrapper lsaWrapper); String isNewerOrSameLsp(IsisMessage lsp1, IsisMessage lsp2); int lsSequenceNumber(IsisPduType lspType); void deleteLsp(IsisMessage lspMessage); void removeTopology(IsisNeighbor neighbor, IsisInterface isisInterface); }
DefaultIsisLsdb implements IsisLsdb { public void deleteLsp(IsisMessage lspMessage) { LsPdu lsp = (LsPdu) lspMessage; String lspKey = lsp.lspId(); LspWrapper lspWrapper = findLsp(lspMessage.isisPduType(), lspKey); switch (lsp.isisPduType()) { case L1LSPDU: isisL1Db.remove(lspKey); break; case L2LSPDU: isisL2Db.remove(lspKey); break; default: log.debug("Unknown LSP type to remove..!!!"); break; } try { lspWrapper.setLspProcessing(IsisConstants.LSPREMOVED); lspForProviderQueue.put(lspWrapper); } catch (Exception e) { log.debug("Added LSp In Blocking queue: {}", lspWrapper); } } DefaultIsisLsdb(); void setController(Controller controller); void setIsisInterface(List<IsisInterface> isisInterfaceList); void initializeDb(); void setL1LspSeqNo(int l1LspSeqNo); void setL2LspSeqNo(int l2LspSeqNo); String lspKey(String systemId); Map<String, LspWrapper> getL1Db(); Map<String, LspWrapper> getL2Db(); IsisLsdb isisLsdb(); List<LspWrapper> allLspHeaders(boolean excludeMaxAgeLsp); LspWrapper findLsp(IsisPduType pduType, String lspId); boolean addLsp(IsisMessage isisMessage, boolean isSelfOriginated, IsisInterface isisInterface); void removeLspFromBin(LspWrapper lsaWrapper); String isNewerOrSameLsp(IsisMessage lsp1, IsisMessage lsp2); int lsSequenceNumber(IsisPduType lspType); void deleteLsp(IsisMessage lspMessage); void removeTopology(IsisNeighbor neighbor, IsisInterface isisInterface);  }