use of org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.registry.StatementRegistry in project bgpcep by opendaylight.
the class AbstractStatementRegistryConsumerTest method setUp.
@Before
@Override
public void setUp() throws Exception {
super.setUp();
this.statementRegistry = new StatementRegistry(getDataBroker());
final StatementActivator activator = new StatementActivator(getDataBroker());
activator.start(this.statementRegistry);
}
use of org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.registry.StatementRegistry in project bgpcep by opendaylight.
the class AbstractStatementRegistryTest method setUp.
@Before
@Override
public void setUp() throws Exception {
super.setUp();
this.statementRegistry = new StatementRegistry(getDataBroker());
}
use of org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.registry.StatementRegistry in project bgpcep by opendaylight.
the class BgpDeployerTest method setUp.
@Override
@Before
public void setUp() throws Exception {
super.setUp();
doReturn("mapping").when(tableTypeRegistry).toString();
doReturn(TABLE_TYPE).when(tableTypeRegistry).getTableType(any());
doReturn(TABLES_KEY).when(tableTypeRegistry).getTableKey(any());
final ClusterSingletonServiceRegistration serviceRegistration = mock(ClusterSingletonServiceRegistration.class);
doReturn(serviceRegistration).when(singletonServiceProvider).registerClusterSingletonService(any());
doNothing().when(serviceRegistration).close();
final Future future = mock(BGPReconnectPromise.class);
doReturn(true).when(future).cancel(true);
doReturn(future).when(dispatcher).createReconnectingClient(any(), any(), anyInt(), any());
deployer = spy(new DefaultBgpDeployer(NETWORK_INSTANCE_NAME, singletonServiceProvider, rpcRegistry, extensionContext, dispatcher, new DefaultBGPRibRoutingPolicyFactory(getDataBroker(), new StatementRegistry()), codecsRegistry, getDomBroker(), getDataBroker(), tableTypeRegistry, stateProviderRegistry));
bgpSingletonObtainedLatch = new CountDownLatch(1);
doAnswer(invocationOnMock -> {
final BGPClusterSingletonService real = (BGPClusterSingletonService) invocationOnMock.callRealMethod();
if (spiedBgpSingletonService == null) {
spiedBgpSingletonService = spy(real);
}
bgpSingletonObtainedLatch.countDown();
return spiedBgpSingletonService;
}).when(deployer).getBgpClusterSingleton(any());
}
use of org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.registry.StatementRegistry in project bgpcep by opendaylight.
the class OSGiStatementRegistry method activate.
@Activate
void activate() {
delegate = new StatementRegistry();
LOG.info("Starting {} StatementProviderActivator instances", activators.size());
activators.forEach(activator -> activator.start(delegate));
}
Aggregations