use of org.onosproject.core.CoreServiceAdapter in project onos by opennetworkinglab.
the class NetworkConfigLinksProviderTest method setUp.
/**
* Sets up a network config links provider under test and the services
* required to run it.
*/
@Before
public void setUp() {
provider = new NetworkConfigLinksProvider();
provider.coreService = new CoreServiceAdapter();
provider.packetService = new PacketServiceAdapter();
LinkProviderRegistryAdapter linkRegistry = new LinkProviderRegistryAdapter();
provider.providerRegistry = linkRegistry;
provider.deviceService = new TestDeviceManager();
provider.masterService = new TestMastershipService();
provider.packetService = new TestPacketService();
provider.clusterMetadataService = new ClusterMetadataServiceAdapter();
provider.netCfgService = configRegistry;
provider.activate();
providerService = linkRegistry.registeredProvider();
}
use of org.onosproject.core.CoreServiceAdapter in project up4 by omec-project.
the class Up4DeviceManagerTest method setUp.
@Before
public void setUp() {
component = new Up4DeviceManager();
component.coreService = new CoreServiceAdapter();
component.flowRuleService = new FlowRuleServiceAdapter();
component.meterService = new MeterServiceAdapter();
component.deviceService = new DeviceServiceAdapter();
component.piPipeconfService = new PiPipeconfServiceAdapter();
component.netCfgService = new NetworkConfigRegistryAdapter();
component.componentConfigService = new ComponentConfigAdapter();
component.up4Store = TestDistributedUp4Store.build();
injectEventDispatcher(component, new TestEventDispatcher());
component.activate();
}
use of org.onosproject.core.CoreServiceAdapter in project onos by opennetworkinglab.
the class ECFlowRuleStoreTest method setUp.
@Before
public void setUp() throws Exception {
flowStoreImpl = new ECFlowRuleStore();
flowStoreImpl.storageService = new TestStorageService() {
@Override
public <K, V> ConsistentMapBuilder<K, V> consistentMapBuilder() {
return new ConsistentMapBuilder<K, V>() {
@Override
public AsyncConsistentMap<K, V> buildAsyncMap() {
return new AsyncConsistentMapAdapter<K, V>();
}
@Override
public ConsistentMap<K, V> build() {
return null;
}
};
}
};
ReplicaInfoManager replicaInfoManager = new ReplicaInfoManager();
replicaInfoManager.mastershipService = new MasterOfAll();
flowStoreImpl.replicaInfoManager = replicaInfoManager;
mockClusterService = createMock(ClusterService.class);
flowStoreImpl.clusterService = mockClusterService;
nodeId = new NodeId("1");
mockControllerNode = new MockControllerNode(nodeId);
expect(mockClusterService.getLocalNode()).andReturn(mockControllerNode).anyTimes();
replay(mockClusterService);
flowStoreImpl.clusterCommunicator = new ClusterCommunicationServiceAdapter();
flowStoreImpl.mastershipService = new MasterOfAll();
flowStoreImpl.deviceService = new DeviceServiceAdapter();
flowStoreImpl.coreService = new CoreServiceAdapter();
flowStoreImpl.configService = new ComponentConfigAdapter();
flowStoreImpl.persistenceService = new PersistenceServiceAdapter();
flowStoreImpl.activate(context);
}
use of org.onosproject.core.CoreServiceAdapter in project onos by opennetworkinglab.
the class InfluxDbMetricsReporterTest method setUp.
/**
* Sets up the services required by influxDB metrics reporter.
*/
@Before
public void setUp() {
influxReporter = new DefaultInfluxDbMetricsReporter();
influxReporter.coreService = new CoreServiceAdapter();
influxReporter.cfgService = new ComponentConfigAdapter();
influxReporter.clusterService = new ClusterServiceAdapter();
influxReporter.metricsService = new TestMetricsService();
influxReporter.activate();
}
use of org.onosproject.core.CoreServiceAdapter in project aaa by opencord.
the class AaaIntegrationTest method setUp.
/**
* Sets up the services required by the AAA application.
*/
@Before
public void setUp() {
aaa = new AaaManager();
aaa.netCfgService = new TestNetworkConfigRegistry();
aaa.coreService = new CoreServiceAdapter();
aaa.packetService = new MockPacketService();
aaa.cfgService = new MockCfgService();
aaa.activate(new AaaTestBase.MockComponentContext());
}
Aggregations