本文整理匯總了Java中org.onosproject.incubator.store.virtual.impl.DistributedVirtualNetworkStore.activate方法的典型用法代碼示例。如果您正苦於以下問題:Java DistributedVirtualNetworkStore.activate方法的具體用法?Java DistributedVirtualNetworkStore.activate怎麽用?Java DistributedVirtualNetworkStore.activate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.onosproject.incubator.store.virtual.impl.DistributedVirtualNetworkStore
的用法示例。
在下文中一共展示了DistributedVirtualNetworkStore.activate方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setUp
import org.onosproject.incubator.store.virtual.impl.DistributedVirtualNetworkStore; //導入方法依賴的package包/類
@Before
public void setUp() throws Exception {
virtualNetworkManagerStore = new DistributedVirtualNetworkStore();
coreService = new TestCoreService();
virtualNetworkManagerStore.setCoreService(coreService);
TestUtils.setField(coreService, "coreService", new TestCoreService());
TestUtils.setField(virtualNetworkManagerStore, "storageService", new TestStorageService());
virtualNetworkManagerStore.activate();
manager = new VirtualNetworkManager();
manager.store = virtualNetworkManagerStore;
manager.addListener(listener);
NetTestTools.injectEventDispatcher(manager, new TestEventDispatcher());
manager.activate();
virtualNetworkManagerService = manager;
}
示例2: setUp
import org.onosproject.incubator.store.virtual.impl.DistributedVirtualNetworkStore; //導入方法依賴的package包/類
@Before
public void setUp() throws Exception {
virtualNetworkManagerStore = new DistributedVirtualNetworkStore();
CoreService coreService = new TestCoreService();
TestUtils.setField(virtualNetworkManagerStore, "coreService", coreService);
TestUtils.setField(virtualNetworkManagerStore, "storageService", new TestStorageService());
virtualNetworkManagerStore.activate();
manager = new VirtualNetworkManager();
manager.store = virtualNetworkManagerStore;
manager.coreService = coreService;
NetTestTools.injectEventDispatcher(manager, new TestEventDispatcher());
testDirectory = new TestServiceDirectory();
TestUtils.setField(manager, "serviceDirectory", testDirectory);
manager.activate();
}
示例3: setUp
import org.onosproject.incubator.store.virtual.impl.DistributedVirtualNetworkStore; //導入方法依賴的package包/類
@Before
public void setUp() throws Exception {
virtualNetworkManagerStore = new DistributedVirtualNetworkStore();
coreService = new VirtualNetworkLinkManagerTest.TestCoreService();
TestUtils.setField(virtualNetworkManagerStore, "coreService", coreService);
TestUtils.setField(virtualNetworkManagerStore, "storageService", new TestStorageService());
virtualNetworkManagerStore.activate();
manager = new VirtualNetworkManager();
manager.store = virtualNetworkManagerStore;
manager.coreService = coreService;
NetTestTools.injectEventDispatcher(manager, new TestEventDispatcher());
testDirectory = new TestServiceDirectory();
TestUtils.setField(manager, "serviceDirectory", testDirectory);
manager.activate();
}
示例4: setUp
import org.onosproject.incubator.store.virtual.impl.DistributedVirtualNetworkStore; //導入方法依賴的package包/類
@Before
public void setUp() throws Exception {
virtualNetworkManagerStore = new DistributedVirtualNetworkStore();
coreService = new VirtualNetworkTopologyManagerTest.TestCoreService();
TestUtils.setField(virtualNetworkManagerStore, "coreService", coreService);
TestUtils.setField(virtualNetworkManagerStore, "storageService", new TestStorageService());
virtualNetworkManagerStore.activate();
manager = new VirtualNetworkManager();
manager.store = virtualNetworkManagerStore;
manager.coreService = coreService;
NetTestTools.injectEventDispatcher(manager, new TestEventDispatcher());
testDirectory = new TestServiceDirectory();
TestUtils.setField(manager, "serviceDirectory", testDirectory);
manager.activate();
}
示例5: setUp
import org.onosproject.incubator.store.virtual.impl.DistributedVirtualNetworkStore; //導入方法依賴的package包/類
@Before
public void setUp() throws Exception {
virtualNetworkManagerStore = new DistributedVirtualNetworkStore();
MockIdGenerator.cleanBind();
coreService = new TestCoreService();
TestUtils.setField(virtualNetworkManagerStore, "coreService", coreService);
TestUtils.setField(virtualNetworkManagerStore, "storageService",
new TestStorageService());
virtualNetworkManagerStore.activate();
manager = new VirtualNetworkManager();
manager.store = virtualNetworkManagerStore;
manager.addListener(listener);
manager.coreService = coreService;
NetTestTools.injectEventDispatcher(manager, new TestEventDispatcher());
testDirectory = new TestServiceDirectory();
TestUtils.setField(manager, "serviceDirectory", testDirectory);
manager.activate();
}
示例6: setUp
import org.onosproject.incubator.store.virtual.impl.DistributedVirtualNetworkStore; //導入方法依賴的package包/類
@Before
public void setUp() throws Exception {
virtualNetworkManagerStore = new DistributedVirtualNetworkStore();
coreService = new VirtualNetworkDeviceManagerTest.TestCoreService();
TestUtils.setField(virtualNetworkManagerStore, "coreService", coreService);
TestUtils.setField(virtualNetworkManagerStore, "storageService", new TestStorageService());
virtualNetworkManagerStore.activate();
manager = new VirtualNetworkManager();
manager.store = virtualNetworkManagerStore;
manager.coreService = coreService;
NetTestTools.injectEventDispatcher(manager, dispatcher);
testDirectory = new TestServiceDirectory();
TestUtils.setField(manager, "serviceDirectory", testDirectory);
manager.activate();
}
示例7: setUp
import org.onosproject.incubator.store.virtual.impl.DistributedVirtualNetworkStore; //導入方法依賴的package包/類
@Before
public void setUp() throws Exception {
virtualNetworkManagerStore = new DistributedVirtualNetworkStore();
intentStore = new SimpleVirtualIntentStore();
coreService = new VirtualNetworkIntentManagerTest.TestCoreService();
MockIdGenerator.cleanBind();
TestUtils.setField(virtualNetworkManagerStore, "coreService", coreService);
TestUtils.setField(virtualNetworkManagerStore, "storageService", new TestStorageService());
virtualNetworkManagerStore.activate();
manager = new VirtualNetworkManager();
manager.store = virtualNetworkManagerStore;
NetTestTools.injectEventDispatcher(manager, new TestEventDispatcher());
intentService.addListener(listener);
// Register a compiler and an installer both setup for success.
intentExtensionService = intentService;
intentExtensionService.registerCompiler(VirtualNetworkIntent.class, compiler);
created = new Semaphore(0, true);
withdrawn = new Semaphore(0, true);
purged = new Semaphore(0, true);
workPartitionService = new WorkPartitionServiceAdapter();
testDirectory = new TestServiceDirectory()
.add(VirtualNetworkStore.class, virtualNetworkManagerStore)
.add(IntentService.class, intentService)
.add(WorkPartitionService.class, workPartitionService);
TestUtils.setField(manager, "serviceDirectory", testDirectory);
manager.activate();
}
示例8: setUp
import org.onosproject.incubator.store.virtual.impl.DistributedVirtualNetworkStore; //導入方法依賴的package包/類
@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);
}
示例9: setUp
import org.onosproject.incubator.store.virtual.impl.DistributedVirtualNetworkStore; //導入方法依賴的package包/類
@Before
public void setUp() throws TestUtilsException {
virtualNetworkManagerStore = new DistributedVirtualNetworkStore();
coreService = new TestCoreService();
MockIdGenerator.cleanBind();
setField(virtualNetworkManagerStore, "coreService", coreService);
setField(virtualNetworkManagerStore, "storageService", new TestStorageService());
virtualNetworkManagerStore.activate();
manager = new VirtualNetworkManager();
manager.setStore(virtualNetworkManagerStore);
setField(manager, "coreService", coreService);
NetTestTools.injectEventDispatcher(manager, new TestEventDispatcher());
manager.activate();
// Register a compiler and an installer both setup for success.
intentExtensionService = intentService;
testDirectory = new TestServiceDirectory()
.add(VirtualNetworkService.class, manager)
.add(VirtualNetworkStore.class, virtualNetworkManagerStore)
.add(IntentService.class, intentService);
setField(manager, "serviceDirectory", testDirectory);
compiler = new VirtualNetworkIntentCompiler();
compiler.manager = manager;
compiler.intentService = intentService;
compiler.store = virtualNetworkManagerStore;
compiler.intentManager = intentExtensionService;
compiler.serviceDirectory = testDirectory;
}
示例10: setUp
import org.onosproject.incubator.store.virtual.impl.DistributedVirtualNetworkStore; //導入方法依賴的package包/類
@Before
public void setUp() throws Exception {
virtualNetworkManagerStore = new DistributedVirtualNetworkStore();
CoreService coreService = new TestCoreService();
TestUtils.setField(virtualNetworkManagerStore, "coreService", coreService);
TestUtils.setField(virtualNetworkManagerStore, "storageService", storageService);
virtualNetworkManagerStore.activate();
flowObjectiveStore = new SimpleVirtualFlowObjectiveStore();
TestUtils.setField(flowObjectiveStore, "storageService", storageService);
flowObjectiveStore.activate();
flowRuleStore = new SimpleVirtualFlowRuleStore();
flowRuleStore.activate();
manager = new VirtualNetworkManager();
manager.store = virtualNetworkManagerStore;
TestUtils.setField(manager, "coreService", coreService);
providerRegistryService = new VirtualProviderManager();
providerRegistryService.registerProvider(flowRuleProvider);
eventDeliveryService = new TestEventDispatcher();
NetTestTools.injectEventDispatcher(manager, eventDeliveryService);
appId = new TestApplicationId("FlowRuleManagerTest");
testDirectory = new TestServiceDirectory()
.add(VirtualNetworkStore.class, virtualNetworkManagerStore)
.add(CoreService.class, coreService)
.add(EventDeliveryService.class, eventDeliveryService)
.add(VirtualProviderRegistryService.class, providerRegistryService)
.add(VirtualNetworkFlowRuleStore.class, flowRuleStore)
.add(VirtualNetworkFlowObjectiveStore.class, flowObjectiveStore);
TestUtils.setField(manager, "serviceDirectory", testDirectory);
manager.activate();
vnet1 = setupVirtualNetworkTopology(manager, TID1);
vnet2 = setupVirtualNetworkTopology(manager, TID2);
service1 = new VirtualNetworkFlowObjectiveManager(manager, vnet1.id());
service2 = new VirtualNetworkFlowObjectiveManager(manager, vnet2.id());
}
示例11: setUp
import org.onosproject.incubator.store.virtual.impl.DistributedVirtualNetworkStore; //導入方法依賴的package包/類
@Before
public void setUp() throws Exception {
virtualNetworkManagerStore = new DistributedVirtualNetworkStore();
CoreService coreService = new TestCoreService();
TestUtils.setField(virtualNetworkManagerStore, "coreService", coreService);
TestUtils.setField(virtualNetworkManagerStore, "storageService", new TestStorageService());
virtualNetworkManagerStore.activate();
groupStore = new SimpleVirtualGroupStore();
providerRegistryService = new VirtualProviderManager();
providerRegistryService.registerProvider(provider);
manager = new VirtualNetworkManager();
manager.store = virtualNetworkManagerStore;
TestUtils.setField(manager, "coreService", coreService);
eventDeliveryService = new TestEventDispatcher();
injectEventDispatcher(manager, eventDeliveryService);
appId = new TestApplicationId("VirtualGroupManagerTest");
testDirectory = new TestServiceDirectory()
.add(VirtualNetworkStore.class, virtualNetworkManagerStore)
.add(CoreService.class, coreService)
.add(VirtualProviderRegistryService.class, providerRegistryService)
.add(EventDeliveryService.class, eventDeliveryService)
.add(VirtualNetworkGroupStore.class, groupStore);
TestUtils.setField(manager, "serviceDirectory", testDirectory);
manager.activate();
vnet1 = setupVirtualNetworkTopology(manager, TID1);
vnet2 = setupVirtualNetworkTopology(manager, TID2);
groupManager1 = new VirtualNetworkGroupManager(manager, vnet1.id());
groupManager2 = new VirtualNetworkGroupManager(manager, vnet2.id());
groupManager1.addListener(listener1);
groupManager2.addListener(listener2);
providerService1 = (VirtualGroupProviderService)
providerRegistryService.getProviderService(vnet1.id(),
VirtualGroupProvider.class);
providerService2 = (VirtualGroupProviderService)
providerRegistryService.getProviderService(vnet2.id(),
VirtualGroupProvider.class);
}
示例12: setUp
import org.onosproject.incubator.store.virtual.impl.DistributedVirtualNetworkStore; //導入方法依賴的package包/類
@Before
public void setUp() throws Exception {
virtualNetworkManagerStore = new DistributedVirtualNetworkStore();
CoreService coreService = new TestCoreService();
TestStorageService storageService = new TestStorageService();
TestUtils.setField(virtualNetworkManagerStore, "coreService", coreService);
TestUtils.setField(virtualNetworkManagerStore, "storageService", storageService);
virtualNetworkManagerStore.activate();
meterStore = new SimpleVirtualMeterStore();
providerRegistryService = new VirtualProviderManager();
providerRegistryService.registerProvider(provider);
manager = new VirtualNetworkManager();
manager.store = virtualNetworkManagerStore;
TestUtils.setField(manager, "coreService", coreService);
eventDeliveryService = new TestEventDispatcher();
NetTestTools.injectEventDispatcher(manager, eventDeliveryService);
// eventDeliveryService.addSink(VirtualEvent.class, listenerRegistryManager);
appId = new TestApplicationId("MeterManagerTest");
testDirectory = new TestServiceDirectory()
.add(VirtualNetworkStore.class, virtualNetworkManagerStore)
.add(CoreService.class, coreService)
.add(VirtualProviderRegistryService.class, providerRegistryService)
.add(EventDeliveryService.class, eventDeliveryService)
.add(StorageService.class, storageService)
.add(VirtualNetworkMeterStore.class, meterStore);
TestUtils.setField(manager, "serviceDirectory", testDirectory);
manager.activate();
vnet1 = setupVirtualNetworkTopology(manager, TID1);
vnet2 = setupVirtualNetworkTopology(manager, TID2);
meterManager1 = new VirtualNetworkMeterManager(manager, vnet1.id());
meterManager2 = new VirtualNetworkMeterManager(manager, vnet2.id());
providerService1 = (VirtualMeterProviderService)
providerRegistryService.getProviderService(vnet1.id(), VirtualMeterProvider.class);
providerService2 = (VirtualMeterProviderService)
providerRegistryService.getProviderService(vnet2.id(), VirtualMeterProvider.class);
assertTrue("provider should be registered",
providerRegistryService.getProviders().contains(provider.id()));
setupMeterTestVariables();
}
示例13: setUp
import org.onosproject.incubator.store.virtual.impl.DistributedVirtualNetworkStore; //導入方法依賴的package包/類
@Before
public void setUp() throws Exception {
virtualNetworkManagerStore = new DistributedVirtualNetworkStore();
CoreService coreService = new TestCoreService();
TestUtils.setField(virtualNetworkManagerStore, "coreService", coreService);
TestUtils.setField(virtualNetworkManagerStore, "storageService", new TestStorageService());
virtualNetworkManagerStore.activate();
flowRuleStore = new SimpleVirtualFlowRuleStore();
providerRegistryService = new VirtualProviderManager();
providerRegistryService.registerProvider(provider);
manager = new VirtualNetworkManager();
manager.store = virtualNetworkManagerStore;
TestUtils.setField(manager, "coreService", coreService);
eventDeliveryService = new TestEventDispatcher();
NetTestTools.injectEventDispatcher(manager, eventDeliveryService);
appId = new TestApplicationId("FlowRuleManagerTest");
testDirectory = new TestServiceDirectory()
.add(VirtualNetworkStore.class, virtualNetworkManagerStore)
.add(CoreService.class, coreService)
.add(VirtualProviderRegistryService.class, providerRegistryService)
.add(EventDeliveryService.class, eventDeliveryService)
.add(VirtualNetworkFlowRuleStore.class, flowRuleStore);
TestUtils.setField(manager, "serviceDirectory", testDirectory);
manager.activate();
vnet1 = setupVirtualNetworkTopology(manager, TID1);
vnet2 = setupVirtualNetworkTopology(manager, TID2);
vnetFlowRuleService1 = new VirtualNetworkFlowRuleManager(manager, vnet1.id());
vnetFlowRuleService2 = new VirtualNetworkFlowRuleManager(manager, vnet2.id());
vnetFlowRuleService1.addListener(listener1);
vnetFlowRuleService2.addListener(listener2);
vnetFlowRuleService1.operationsService = MoreExecutors.newDirectExecutorService();
vnetFlowRuleService2.operationsService = MoreExecutors.newDirectExecutorService();
vnetFlowRuleService1.deviceInstallers = MoreExecutors.newDirectExecutorService();
vnetFlowRuleService2.deviceInstallers = MoreExecutors.newDirectExecutorService();
providerService1 = (VirtualFlowRuleProviderService)
providerRegistryService.getProviderService(vnet1.id(), VirtualFlowRuleProvider.class);
providerService2 = (VirtualFlowRuleProviderService)
providerRegistryService.getProviderService(vnet2.id(), VirtualFlowRuleProvider.class);
}