@Test public void newIslWithHistory() { NetworkUniIslService service = new NetworkUniIslService(carrier); Endpoint endpoint1 = Endpoint.of(alphaDatapath, 1); Endpoint endpoint2 = Endpoint.of(alphaDatapath, 2); Switch alphaSwitch = Switch.builder().switchId(alphaDatapath).build(); Switch betaSwitch = Switch.builder().switchId(betaDatapath).build(); Isl islAtoB = Isl.builder() .srcSwitch(alphaSwitch) .srcPort(1) .destSwitch(betaSwitch) .destPort(1).build(); Isl islAtoB2 = Isl.builder() .srcSwitch(alphaSwitch) .srcPort(2) .destSwitch(betaSwitch) .destPort(2).build(); service.uniIslSetup(endpoint1, islAtoB); service.uniIslSetup(endpoint2, islAtoB2); verify(carrier).setupIslFromHistory(endpoint1, IslReference.of(islAtoB), islAtoB); verify(carrier).setupIslFromHistory(endpoint2, IslReference.of(islAtoB2), islAtoB2); }
public void uniIslSetup(Endpoint endpoint, Isl history) { log.info("Uni-ISL service receive SETUP request for {}", endpoint); IslReference reference; if (history != null) { reference = IslReference.of(history); carrier.setupIslFromHistory(endpoint, reference, history); } else { reference = IslReference.of(endpoint); } endpointData.put(endpoint, reference); }
NetworkUniIslService { public void uniIslSetup(Endpoint endpoint, Isl history) { log.info("Uni-ISL service receive SETUP request for {}", endpoint); IslReference reference; if (history != null) { reference = IslReference.of(history); carrier.setupIslFromHistory(endpoint, reference, history); } else { reference = IslReference.of(endpoint); } endpointData.put(endpoint, reference); } }
NetworkUniIslService { public void uniIslSetup(Endpoint endpoint, Isl history) { log.info("Uni-ISL service receive SETUP request for {}", endpoint); IslReference reference; if (history != null) { reference = IslReference.of(history); carrier.setupIslFromHistory(endpoint, reference, history); } else { reference = IslReference.of(endpoint); } endpointData.put(endpoint, reference); } NetworkUniIslService(IUniIslCarrier carrier); }
NetworkUniIslService { public void uniIslSetup(Endpoint endpoint, Isl history) { log.info("Uni-ISL service receive SETUP request for {}", endpoint); IslReference reference; if (history != null) { reference = IslReference.of(history); carrier.setupIslFromHistory(endpoint, reference, history); } else { reference = IslReference.of(endpoint); } endpointData.put(endpoint, reference); } NetworkUniIslService(IUniIslCarrier carrier); void uniIslSetup(Endpoint endpoint, Isl history); void uniIslDiscovery(Endpoint endpoint, IslInfoData speakerDiscoveryEvent); void uniIslFail(Endpoint endpoint); void uniIslPhysicalDown(Endpoint endpoint); void roundTripStatusNotification(RoundTripStatus status); void uniIslBfdStatusUpdate(Endpoint endpoint, BfdStatusUpdate status); void uniIslRemove(Endpoint endpoint); void islRemovedNotification(Endpoint endpoint, IslReference removedIsl); }
NetworkUniIslService { public void uniIslSetup(Endpoint endpoint, Isl history) { log.info("Uni-ISL service receive SETUP request for {}", endpoint); IslReference reference; if (history != null) { reference = IslReference.of(history); carrier.setupIslFromHistory(endpoint, reference, history); } else { reference = IslReference.of(endpoint); } endpointData.put(endpoint, reference); } NetworkUniIslService(IUniIslCarrier carrier); void uniIslSetup(Endpoint endpoint, Isl history); void uniIslDiscovery(Endpoint endpoint, IslInfoData speakerDiscoveryEvent); void uniIslFail(Endpoint endpoint); void uniIslPhysicalDown(Endpoint endpoint); void roundTripStatusNotification(RoundTripStatus status); void uniIslBfdStatusUpdate(Endpoint endpoint, BfdStatusUpdate status); void uniIslRemove(Endpoint endpoint); void islRemovedNotification(Endpoint endpoint, IslReference removedIsl);  }