@Test public void testFindLsp() throws Exception { resultLspWrapper = defaultIsisLsdb.findLsp(IsisPduType.L1HELLOPDU, srcId); assertThat(resultLspWrapper, is(nullValue())); }
public LspWrapper findLsp(IsisPduType pduType, String lspId) { LspWrapper lspWrapper = null; switch (pduType) { case L1LSPDU: lspWrapper = isisL1Db.get(lspId); break; case L2LSPDU: lspWrapper = isisL2Db.get(lspId); break; default: log.debug("Unknown LSP type..!!!"); break; } if (lspWrapper != null) { ((DefaultLspWrapper) lspWrapper).lsPdu().setRemainingLifeTime(lspWrapper.remainingLifetime()); } return lspWrapper; }
DefaultIsisLsdb implements IsisLsdb { public LspWrapper findLsp(IsisPduType pduType, String lspId) { LspWrapper lspWrapper = null; switch (pduType) { case L1LSPDU: lspWrapper = isisL1Db.get(lspId); break; case L2LSPDU: lspWrapper = isisL2Db.get(lspId); break; default: log.debug("Unknown LSP type..!!!"); break; } if (lspWrapper != null) { ((DefaultLspWrapper) lspWrapper).lsPdu().setRemainingLifeTime(lspWrapper.remainingLifetime()); } return lspWrapper; } }
DefaultIsisLsdb implements IsisLsdb { public LspWrapper findLsp(IsisPduType pduType, String lspId) { LspWrapper lspWrapper = null; switch (pduType) { case L1LSPDU: lspWrapper = isisL1Db.get(lspId); break; case L2LSPDU: lspWrapper = isisL2Db.get(lspId); break; default: log.debug("Unknown LSP type..!!!"); break; } if (lspWrapper != null) { ((DefaultLspWrapper) lspWrapper).lsPdu().setRemainingLifeTime(lspWrapper.remainingLifetime()); } return lspWrapper; } DefaultIsisLsdb(); }
DefaultIsisLsdb implements IsisLsdb { public LspWrapper findLsp(IsisPduType pduType, String lspId) { LspWrapper lspWrapper = null; switch (pduType) { case L1LSPDU: lspWrapper = isisL1Db.get(lspId); break; case L2LSPDU: lspWrapper = isisL2Db.get(lspId); break; default: log.debug("Unknown LSP type..!!!"); break; } if (lspWrapper != null) { ((DefaultLspWrapper) lspWrapper).lsPdu().setRemainingLifeTime(lspWrapper.remainingLifetime()); } return 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 LspWrapper findLsp(IsisPduType pduType, String lspId) { LspWrapper lspWrapper = null; switch (pduType) { case L1LSPDU: lspWrapper = isisL1Db.get(lspId); break; case L2LSPDU: lspWrapper = isisL2Db.get(lspId); break; default: log.debug("Unknown LSP type..!!!"); break; } if (lspWrapper != null) { ((DefaultLspWrapper) lspWrapper).lsPdu().setRemainingLifeTime(lspWrapper.remainingLifetime()); } return 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);  }