本文整理汇总了Java中org.onosproject.net.driver.DriverServiceAdapter类的典型用法代码示例。如果您正苦于以下问题:Java DriverServiceAdapter类的具体用法?Java DriverServiceAdapter怎么用?Java DriverServiceAdapter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DriverServiceAdapter类属于org.onosproject.net.driver包,在下文中一共展示了DriverServiceAdapter类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import org.onosproject.net.driver.DriverServiceAdapter; //导入依赖的package包/类
@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();
}
示例2: setUp
import org.onosproject.net.driver.DriverServiceAdapter; //导入依赖的package包/类
@Before
public void setUp() {
provider.providerRegistry = providerRegistry;
provider.deviceService = deviceService;
provider.mastershipService = mastershipService;
AbstractProjectableModel.setDriverService(null, new DriverServiceAdapter());
provider.activate(context);
}
示例3: setUp
import org.onosproject.net.driver.DriverServiceAdapter; //导入依赖的package包/类
@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);
}
示例4: startUp
import org.onosproject.net.driver.DriverServiceAdapter; //导入依赖的package包/类
@Before
public void startUp() {
provider.providerRegistry = registry;
provider.controller = controller;
provider.cfgService = new ComponentConfigAdapter();
provider.driverService = new DriverServiceAdapter();
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());
}
示例5: setUpClass
import org.onosproject.net.driver.DriverServiceAdapter; //导入依赖的package包/类
@BeforeClass
public static void setUpClass() {
AbstractProjectableModel.setDriverService("key", new DriverServiceAdapter());
}