use of org.onosproject.net.intent.WorkPartitionServiceAdapter in project onos by opennetworkinglab.
the class VirtualNetworkIntentManagerTest method setUp.
@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();
}
use of org.onosproject.net.intent.WorkPartitionServiceAdapter in project onos by opennetworkinglab.
the class GossipIntentStoreTest method setUp.
@Override
@Before
public void setUp() {
intentStore = new GossipIntentStore();
intentStore.storageService = new TestStorageService();
intentStore.partitionService = new WorkPartitionServiceAdapter();
intentStore.clusterService = new ClusterServiceAdapter();
super.setUp();
builder1 = HostToHostIntent.builder().one(hid("12:34:56:78:91:ab/1")).two(hid("12:34:56:78:91:ac/1")).appId(APP_ID);
intentStore.configService = new MockComponentConfigService();
intentStore.activate(null);
}
Aggregations