예제 #1
0
 @Before
 public void setUpIntentService() {
   final IntentService mockIntentService = new IntentServiceAdapter();
   context.registerService(IntentService.class, mockIntentService);
   context.registerService(CoreService.class, mockCoreService);
   expect(mockCoreService.getAppId(appId.name())).andReturn(appId);
   replay(mockCoreService);
 }
예제 #2
0
  @Deactivate
  protected void deactivate() {
    leadershipService.removeListener(leadershipListener);
    leadershipService.withdraw(appId.name());

    configRegistry.unregisterConfigFactory(configFactory);
    configService.removeListener(configListener);
  }
예제 #3
0
  @Before
  public void setUp() {

    coreService = createMock(CoreService.class);
    expect(coreService.registerApplication(appId.name())).andReturn(appId).anyTimes();
    replay(coreService);

    provider.cfgService = new ComponentConfigAdapter();
    provider.coreService = coreService;

    provider.providerRegistry = hostRegistry;
    provider.topologyService = topoService;
    provider.packetService = packetService;
    provider.deviceService = deviceService;
    provider.hostService = hostService;

    provider.activate(CTX_FOR_NO_REMOVE);
  }
예제 #4
0
 @Deactivate
 public void deactivate() {
   log.info("Mao Stopped, id: {}, name: {}", appId.id(), appId.name());
 }
예제 #5
0
 @Activate
 public void activate(ComponentContext context) {
   appId = coreSerivice.registerApplication("org.onosproject.Mao.Mao-Ether-igmp");
   log.info("Mao Started, id: {}, name: {}", appId.id(), appId.name());
 }