当前位置: 首页>>代码示例>>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;未经允许,请勿转载。