use of org.onosproject.incubator.net.virtual.impl.VirtualNetworkManager in project onos by opennetworkinglab.
the class VirtualNetworkTopologyProviderTest method setUp.
@Before
public void setUp() throws Exception {
virtualNetworkManagerStore = new DistributedVirtualNetworkStore();
coreService = new VirtualNetworkTopologyProviderTest.TestCoreService();
TestUtils.setField(virtualNetworkManagerStore, "coreService", coreService);
TestUtils.setField(virtualNetworkManagerStore, "storageService", new TestStorageService());
virtualNetworkManagerStore.activate();
manager = new VirtualNetworkManager();
TestUtils.setField(manager, "coreService", coreService);
TestUtils.setField(manager, "store", virtualNetworkManagerStore);
TestUtils.setField(manager, "intentService", intentService);
NetTestTools.injectEventDispatcher(manager, new TestEventDispatcher());
testDirectory = new TestServiceDirectory();
TestUtils.setField(manager, "serviceDirectory", testDirectory);
manager.activate();
manager.registerTenantId(TenantId.tenantId(tenantIdValue1));
virtualNetwork = manager.createVirtualNetwork(TenantId.tenantId(tenantIdValue1));
topologyService = manager.get(virtualNetwork.id(), TopologyService.class);
topologyProvider = new DefaultVirtualNetworkProvider();
topologyProvider.topologyService = topologyService;
topologyProvider.providerRegistry = virtualNetworkRegistry;
topologyProvider.activate();
setupVirtualNetworkTopology();
changed = new Semaphore(0, true);
}
Aggregations