@Test @Ignore("incomplete") public void initialUp() { persistenceManager = new InMemoryGraphPersistenceManager( new PropertiesBasedConfigurationProvider().getConfiguration(NetworkConfig.class)); emulateEmptyPersistentDb(); SwitchRepository switchRepository = persistenceManager.getRepositoryFactory() .createSwitchRepository(); Switch swA = Switch.builder() .switchId(endpointAlpha1.getDatapath()) .description("alpha") .build(); switchRepository.add(swA); switchPropertiesRepository.add(SwitchProperties.builder() .multiTable(false) .supportedTransitEncapsulation(SwitchProperties.DEFAULT_FLOW_ENCAPSULATION_TYPES) .switchObj(swA).build()); Switch swB = Switch.builder() .switchId(endpointBeta2.getDatapath()) .description("alpha") .build(); switchRepository.add(swB); switchPropertiesRepository.add(SwitchProperties.builder() .multiTable(false) .supportedTransitEncapsulation(SwitchProperties.DEFAULT_FLOW_ENCAPSULATION_TYPES) .switchObj(swB).build()); IslReference ref = new IslReference(endpointAlpha1, endpointBeta2); IslDataHolder islData = new IslDataHolder(1000, 1000, 1000); service = new NetworkIslService(carrier, persistenceManager, options); service.islUp(ref.getSource(), ref, islData); System.out.println(mockingDetails(carrier).printInvocations()); System.out.println(mockingDetails(islRepository).printInvocations()); }
public void islUp(Endpoint endpoint, IslReference reference, IslDataHolder islData) { log.debug("ISL service receive DISCOVERY notification for {} (on {})", reference, endpoint); IslFsm islFsm = locateControllerCreateIfAbsent(endpoint, reference).fsm; IslFsmContext context = IslFsmContext.builder(carrier, endpoint) .islData(islData) .build(); controllerExecutor.fire(islFsm, IslFsmEvent.ISL_UP, context); }
NetworkIslService { public void islUp(Endpoint endpoint, IslReference reference, IslDataHolder islData) { log.debug("ISL service receive DISCOVERY notification for {} (on {})", reference, endpoint); IslFsm islFsm = locateControllerCreateIfAbsent(endpoint, reference).fsm; IslFsmContext context = IslFsmContext.builder(carrier, endpoint) .islData(islData) .build(); controllerExecutor.fire(islFsm, IslFsmEvent.ISL_UP, context); } }
NetworkIslService { public void islUp(Endpoint endpoint, IslReference reference, IslDataHolder islData) { log.debug("ISL service receive DISCOVERY notification for {} (on {})", reference, endpoint); IslFsm islFsm = locateControllerCreateIfAbsent(endpoint, reference).fsm; IslFsmContext context = IslFsmContext.builder(carrier, endpoint) .islData(islData) .build(); controllerExecutor.fire(islFsm, IslFsmEvent.ISL_UP, context); } NetworkIslService(IIslCarrier carrier, PersistenceManager persistenceManager, NetworkOptions options); @VisibleForTesting  NetworkIslService(IIslCarrier carrier, PersistenceManager persistenceManager, NetworkOptions options,
                      NetworkTopologyDashboardLogger.Builder dashboardLoggerBuilder, Clock clock); }
NetworkIslService { public void islUp(Endpoint endpoint, IslReference reference, IslDataHolder islData) { log.debug("ISL service receive DISCOVERY notification for {} (on {})", reference, endpoint); IslFsm islFsm = locateControllerCreateIfAbsent(endpoint, reference).fsm; IslFsmContext context = IslFsmContext.builder(carrier, endpoint) .islData(islData) .build(); controllerExecutor.fire(islFsm, IslFsmEvent.ISL_UP, context); } NetworkIslService(IIslCarrier carrier, PersistenceManager persistenceManager, NetworkOptions options); @VisibleForTesting  NetworkIslService(IIslCarrier carrier, PersistenceManager persistenceManager, NetworkOptions options,
                      NetworkTopologyDashboardLogger.Builder dashboardLoggerBuilder, Clock clock); void islSetupFromHistory(Endpoint endpoint, IslReference reference, Isl history); void islUp(Endpoint endpoint, IslReference reference, IslDataHolder islData); void islDown(Endpoint endpoint, IslReference reference, IslDownReason reason); void islMove(Endpoint endpoint, IslReference reference); void roundTripStatusNotification(IslReference reference, RoundTripStatus status); void bfdStatusUpdate(Endpoint endpoint, IslReference reference, BfdStatusUpdate status); void bfdEnableDisable(IslReference reference, IslBfdFlagUpdated payload); void islDefaultRuleInstalled(IslReference reference, InstallIslDefaultRulesResult payload); void islDefaultRuleDeleted(IslReference reference, RemoveIslDefaultRulesResult payload); void islDefaultTimeout(IslReference reference, Endpoint endpoint); void remove(IslReference reference); }
NetworkIslService { public void islUp(Endpoint endpoint, IslReference reference, IslDataHolder islData) { log.debug("ISL service receive DISCOVERY notification for {} (on {})", reference, endpoint); IslFsm islFsm = locateControllerCreateIfAbsent(endpoint, reference).fsm; IslFsmContext context = IslFsmContext.builder(carrier, endpoint) .islData(islData) .build(); controllerExecutor.fire(islFsm, IslFsmEvent.ISL_UP, context); } NetworkIslService(IIslCarrier carrier, PersistenceManager persistenceManager, NetworkOptions options); @VisibleForTesting  NetworkIslService(IIslCarrier carrier, PersistenceManager persistenceManager, NetworkOptions options,
                      NetworkTopologyDashboardLogger.Builder dashboardLoggerBuilder, Clock clock); void islSetupFromHistory(Endpoint endpoint, IslReference reference, Isl history); void islUp(Endpoint endpoint, IslReference reference, IslDataHolder islData); void islDown(Endpoint endpoint, IslReference reference, IslDownReason reason); void islMove(Endpoint endpoint, IslReference reference); void roundTripStatusNotification(IslReference reference, RoundTripStatus status); void bfdStatusUpdate(Endpoint endpoint, IslReference reference, BfdStatusUpdate status); void bfdEnableDisable(IslReference reference, IslBfdFlagUpdated payload); void islDefaultRuleInstalled(IslReference reference, InstallIslDefaultRulesResult payload); void islDefaultRuleDeleted(IslReference reference, RemoveIslDefaultRulesResult payload); void islDefaultTimeout(IslReference reference, Endpoint endpoint); void remove(IslReference reference);  }