本文整理匯總了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());
}