當前位置: 首頁>>代碼示例>>Java>>正文


Java DriverServiceAdapter類代碼示例

本文整理匯總了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();
}
 
開發者ID:opennetworkinglab,項目名稱:onos,代碼行數:17,代碼來源:LinkDiscoveryProviderTest.java

示例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);
}
 
開發者ID:shlee89,項目名稱:athena,代碼行數:9,代碼來源:PollingAlarmProviderTest.java

示例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);
}
 
開發者ID:opennetworkinglab,項目名稱:onos,代碼行數:35,代碼來源:NetconfDeviceProviderTest.java

示例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());
}
 
開發者ID:opennetworkinglab,項目名稱:onos,代碼行數:14,代碼來源:OpenFlowDeviceProviderTest.java

示例5: setUpClass

import org.onosproject.net.driver.DriverServiceAdapter; //導入依賴的package包/類
@BeforeClass
public static void setUpClass() {
    AbstractProjectableModel.setDriverService("key", new DriverServiceAdapter());
}
 
開發者ID:shlee89,項目名稱:athena,代碼行數:5,代碼來源:OpticalCircuitIntentCompilerTest.java


注:本文中的org.onosproject.net.driver.DriverServiceAdapter類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。