use of org.onosproject.core.CoreServiceAdapter in project onos by opennetworkinglab.
the class ControlPlaneManagerTest method setUp.
/**
* Sets up the services required by the CPMan application.
*/
@Before
public void setUp() {
cpMan = new ControlPlaneManager();
cpMan.coreService = new CoreServiceAdapter();
cpMan.messageService = new ControlMessageServiceAdaptor();
cpMan.monitorService = new ControlPlaneMonitorServiceAdaptor();
cpMan.activate();
}
use of org.onosproject.core.CoreServiceAdapter in project onos by opennetworkinglab.
the class DefaultVirtualPacketProviderTest method setUp.
@Before
public void setUp() {
virtualProvider = new DefaultVirtualPacketProvider();
virtualProvider.coreService = new CoreServiceAdapter();
virtualProvider.vnaService = new TestVirtualNetworkAdminService();
providerService = new TestVirtualPacketProviderService();
testPacketService = new TestPacketService();
virtualProvider.packetService = testPacketService;
providerManager = new VirtualProviderManager();
virtualProvider.providerRegistryService = providerManager;
providerManager.registerProviderService(VNET_ID, providerService);
virtualProvider.activate();
vAppId = new TestApplicationId(0, "Virtual App");
TrafficSelector.Builder selector = DefaultTrafficSelector.builder();
selector.matchEthType(Ethernet.TYPE_IPV4);
virtualProvider.startPacketHandling();
}
use of org.onosproject.core.CoreServiceAdapter in project onos by opennetworkinglab.
the class FlowTableConfigTest method setUp.
@Before
public void setUp() throws Exception {
directory.add(CoreService.class, new CoreServiceAdapter() {
@Override
public ApplicationId getAppId(Short id) {
return APP_ID;
}
@Override
public ApplicationId registerApplication(String name) {
return APP_ID;
}
});
mapper = testFriendlyMapper();
JsonNode sample = loadJsonFromResource(SAMPLE, mapper);
cfgnode = sample.path("devices").path(DID.toString()).path(FlowTableConfig.CONFIG_KEY);
}
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();
}
Aggregations