use of org.onosproject.net.driver.DriverServiceAdapter in project onos by opennetworkinglab.
the class OpenFlowGroupProviderTest method setUp.
@Before
public void setUp() {
provider.controller = controller;
provider.providerRegistry = providerRegistry;
provider.cfgService = new ComponentConfigAdapter();
provider.driverService = new DriverServiceAdapter();
provider.activate(null);
}
use of org.onosproject.net.driver.DriverServiceAdapter in project onos by opennetworkinglab.
the class PollingAlarmProviderTest method setUp.
@Before
public void setUp() {
provider.providerRegistry = providerRegistry;
provider.deviceService = deviceService;
provider.mastershipService = mastershipService;
provider.cfgService = cfgService;
AbstractProjectableModel.setDriverService(null, new DriverServiceAdapter());
provider.activate(context);
}
use of org.onosproject.net.driver.DriverServiceAdapter in project onos by opennetworkinglab.
the class LinkDiscoveryProviderTest method setUp.
@Before
public void setUp() {
coreService = createMock(CoreService.class);
expect(coreService.registerApplication(appId.name())).andReturn(appId).anyTimes();
replay(coreService);
provider.coreService = coreService;
provider.providerRegistry = linkRegistry;
provider.deviceService = deviceService;
provider.mastershipService = mastershipService;
provider.linkService = linkService;
provider.cfgService = new ComponentConfigAdapter();
AbstractProjectableModel.setDriverService(null, new DriverServiceAdapter());
provider.activate(null);
providerService = linkRegistry.registeredProvider();
}
use of org.onosproject.net.driver.DriverServiceAdapter in project onos by opennetworkinglab.
the class NetconfDeviceProviderTest method setUp.
@Before
public void setUp() throws IOException {
coreService = createMock(CoreService.class);
expect(coreService.registerApplication(APP_NAME)).andReturn(appId).anyTimes();
replay(coreService);
provider.coreService = coreService;
provider.providerRegistry = deviceRegistry;
provider.mastershipService = mastershipService;
provider.deviceService = deviceService;
provider.providerService = providerService;
provider.cfgService = cfgService;
provider.controller = controller;
provider.deviceKeyAdminService = deviceKeyAdminService;
provider.componentConfigService = new ComponentConfigAdapter();
AbstractProjectableModel.setDriverService(null, new DriverServiceAdapter());
provider.activate(null);
devices.clear();
available = false;
firstRequest = true;
DeviceId subject = DeviceId.deviceId(NETCONF_DEVICE_ID_STRING);
DeviceId subjectIpv6 = DeviceId.deviceId(NETCONF_DEVICE_ID_STRING_IPV6);
String key = "netconf";
ObjectMapper mapper = new ObjectMapper();
JsonNode jsonNode = mapper.readTree(jsonStream);
ConfigApplyDelegate delegate = new MockDelegate();
netconfDeviceConfig.init(subject, key, jsonNode, mapper, delegate);
JsonNode jsonNodesshKey = mapper.readTree(jsonStreamSshKey);
netconfDeviceConfigSshKey.init(subject, key, jsonNodesshKey, mapper, delegate);
JsonNode jsonNodeEmpty = mapper.createObjectNode();
netconfDeviceConfigEmptyIpv4.init(subject, key, jsonNodeEmpty, mapper, delegate);
netconfDeviceConfigEmptyIpv6.init(subjectIpv6, key, jsonNodeEmpty, mapper, delegate);
deviceAdded = new CountDownLatch(0);
}
use of org.onosproject.net.driver.DriverServiceAdapter in project onos by opennetworkinglab.
the class OpenFlowDeviceProviderTest method startUp.
@Before
public void startUp() {
provider.providerRegistry = registry;
provider.controller = controller;
provider.cfgService = new ComponentConfigAdapter();
provider.driverService = new DriverServiceAdapter();
provider.deviceService = new DeviceServiceAdapter();
controller.switchMap.put(DPID1, SW1);
provider.activate(null);
assertNotNull("provider should be registered", registry.provider);
assertNotNull("listener should be registered", controller.listener);
assertEquals("devices not added", 1, registry.connected.size());
assertEquals("ports not added", 2, registry.ports.get(DID1).size());
}
Aggregations