@Test public void testFourInterfacesTwoHostEventsDifferentVlan() { vpls.activate(); Host h1 = new DefaultHost(PID, HID1, MAC1, VLAN1, getLocation(1), Collections.singleton(IP1)); Host h4 = new DefaultHost(PID, HID4, MAC4, VLAN2, getLocation(4), Collections.EMPTY_SET); hostsAvailable.addAll(Sets.newHashSet(h1, h4)); hostsAvailable.forEach(host -> { hostListener.event(new HostEvent(HostEvent.Type.HOST_ADDED, host)); }); List<Intent> expectedIntents = new ArrayList<>(); expectedIntents.addAll(generateVlanOneBrc()); expectedIntents.addAll(generateVlanTwoBrc()); checkIntents(expectedIntents); }
@Activate public void activate() { appId = coreService.registerApplication(VPLS_APP); intentInstaller = new IntentInstaller(appId, intentService, intentSynchronizer); applicationService.registerDeactivateHook(appId, () -> { intentSynchronizer.removeIntentsByAppId(appId); }); hostService.addListener(hostListener); interfaceService.addListener(interfaceListener); setupConnectivity(); log.info("Started"); }
Vpls { @Activate public void activate() { appId = coreService.registerApplication(VPLS_APP); intentInstaller = new IntentInstaller(appId, intentService, intentSynchronizer); applicationService.registerDeactivateHook(appId, () -> { intentSynchronizer.removeIntentsByAppId(appId); }); hostService.addListener(hostListener); interfaceService.addListener(interfaceListener); setupConnectivity(); log.info("Started"); } }
Vpls { @Activate public void activate() { appId = coreService.registerApplication(VPLS_APP); intentInstaller = new IntentInstaller(appId, intentService, intentSynchronizer); applicationService.registerDeactivateHook(appId, () -> { intentSynchronizer.removeIntentsByAppId(appId); }); hostService.addListener(hostListener); interfaceService.addListener(interfaceListener); setupConnectivity(); log.info("Started"); }  }
Vpls { @Activate public void activate() { appId = coreService.registerApplication(VPLS_APP); intentInstaller = new IntentInstaller(appId, intentService, intentSynchronizer); applicationService.registerDeactivateHook(appId, () -> { intentSynchronizer.removeIntentsByAppId(appId); }); hostService.addListener(hostListener); interfaceService.addListener(interfaceListener); setupConnectivity(); log.info("Started"); }  @Activate void activate(); @Deactivate void deactivate(); }
Vpls { @Activate public void activate() { appId = coreService.registerApplication(VPLS_APP); intentInstaller = new IntentInstaller(appId, intentService, intentSynchronizer); applicationService.registerDeactivateHook(appId, () -> { intentSynchronizer.removeIntentsByAppId(appId); }); hostService.addListener(hostListener); interfaceService.addListener(interfaceListener); setupConnectivity(); log.info("Started"); }  @Activate void activate(); @Deactivate void deactivate();  }