Search in sources :

Example 1 with PacketServiceAdapter

use of org.onosproject.net.packet.PacketServiceAdapter 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();
}
Also used : CoreServiceAdapter(org.onosproject.core.CoreServiceAdapter) PacketServiceAdapter(org.onosproject.net.packet.PacketServiceAdapter) ClusterMetadataServiceAdapter(org.onosproject.cluster.ClusterMetadataServiceAdapter) LinkProviderRegistryAdapter(org.onosproject.net.link.LinkProviderRegistryAdapter) Before(org.junit.Before)

Example 2 with PacketServiceAdapter

use of org.onosproject.net.packet.PacketServiceAdapter in project onos by opennetworkinglab.

the class OpenstackNetworkManagerTest method setUp.

@Before
public void setUp() throws Exception {
    NETWORK.setId(NETWORK_ID);
    NETWORK_COPY.setId(NETWORK_ID);
    SUBNET.setId(SUBNET_ID);
    SUBNET_COPY.setId(SUBNET_ID);
    PORT.setId(PORT_ID);
    PORT_COPY.setId(PORT_ID);
    osNetworkStore = new DistributedOpenstackNetworkStore();
    TestUtils.setField(osNetworkStore, "coreService", new TestCoreService());
    TestUtils.setField(osNetworkStore, "storageService", new TestStorageService());
    TestUtils.setField(osNetworkStore, "preCommitPortService", new TestPreCommitPortService());
    TestUtils.setField(osNetworkStore, "eventExecutor", MoreExecutors.newDirectExecutorService());
    osNetworkStore.activate();
    target = new OpenstackNetworkManager();
    TestUtils.setField(target, "coreService", new TestCoreService());
    TestUtils.setField(target, "packetService", new PacketServiceAdapter());
    TestUtils.setField(target, "deviceService", new DeviceServiceAdapter());
    TestUtils.setField(target, "storageService", new TestStorageService());
    TestUtils.setField(target, "clusterService", new ClusterServiceAdapter());
    TestUtils.setField(target, "openstacknodeService", new TestOpenstackNodeManager());
    target.osNetworkStore = osNetworkStore;
    target.addListener(testListener);
    target.activate();
}
Also used : PacketServiceAdapter(org.onosproject.net.packet.PacketServiceAdapter) TestStorageService(org.onosproject.store.service.TestStorageService) ClusterServiceAdapter(org.onosproject.cluster.ClusterServiceAdapter) DeviceServiceAdapter(org.onosproject.net.device.DeviceServiceAdapter) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)2 PacketServiceAdapter (org.onosproject.net.packet.PacketServiceAdapter)2 ClusterMetadataServiceAdapter (org.onosproject.cluster.ClusterMetadataServiceAdapter)1 ClusterServiceAdapter (org.onosproject.cluster.ClusterServiceAdapter)1 CoreServiceAdapter (org.onosproject.core.CoreServiceAdapter)1 DeviceServiceAdapter (org.onosproject.net.device.DeviceServiceAdapter)1 LinkProviderRegistryAdapter (org.onosproject.net.link.LinkProviderRegistryAdapter)1 TestStorageService (org.onosproject.store.service.TestStorageService)1