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();
}
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();
}
Aggregations