use of org.onosproject.cluster.ClusterMetadataServiceAdapter 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.cluster.ClusterMetadataServiceAdapter in project onos by opennetworkinglab.
the class LldpLinkProviderTest method setUp.
@Before
public void setUp() {
deviceBlacklist = new HashSet<>();
portBlacklist = new HashSet<>();
cfg = new TestSuppressionConfig();
coreService = createMock(CoreService.class);
expect(coreService.registerApplication(appId.name())).andReturn(appId).anyTimes();
replay(coreService);
provider.cfgService = new ComponentConfigAdapter();
provider.enabled = false;
provider.coreService = coreService;
provider.cfgRegistry = configRegistry;
provider.deviceService = deviceService;
provider.linkService = linkService;
provider.packetService = packetService;
provider.providerRegistry = linkRegistry;
provider.masterService = masterService;
provider.clusterMetadataService = new ClusterMetadataServiceAdapter();
provider.activate(null);
provider.eventExecutor = MoreExecutors.newDirectExecutorService();
providerService = linkRegistry.registeredProvider();
}
Aggregations