当前位置: 首页>>代码示例>>Java>>正文


Java OspfProcessImpl.setAreas方法代码示例

本文整理汇总了Java中org.onosproject.ospf.controller.area.OspfProcessImpl.setAreas方法的典型用法代码示例。如果您正苦于以下问题:Java OspfProcessImpl.setAreas方法的具体用法?Java OspfProcessImpl.setAreas怎么用?Java OspfProcessImpl.setAreas使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.onosproject.ospf.controller.area.OspfProcessImpl的用法示例。


在下文中一共展示了OspfProcessImpl.setAreas方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testUpdateConfig1

import org.onosproject.ospf.controller.area.OspfProcessImpl; //导入方法依赖的package包/类
/**
 * Tests updateConfig() method.
 */
@Test
public void testUpdateConfig1() throws Exception {
    ospfProcess = new OspfProcessImpl();
    ospfArea = new OspfAreaImpl();
    ospfInterface = new OspfInterfaceImpl();
    ospfInterfaces = new ArrayList();
    ospfInterface.setIpAddress(Ip4Address.valueOf("10.10.10.5"));
    ospfInterfaces.add(ospfInterface);
    ospfArea.setAreaId(Ip4Address.valueOf("2.2.2.2"));
    ospfArea.setOspfInterfaceList(ospfInterfaces);
    ospfProcess.setProcessId("10.10.10.10");
    ospfAreas = new ArrayList();
    ospfAreas.add(ospfArea);
    ospfProcess.setAreas(ospfAreas);
    ospfProcesses = new ArrayList();
    ospfProcesses.add(ospfProcess);
    controller.updateConfig(ospfProcesses);
    assertThat(controller, is(notNullValue()));
}
 
开发者ID:shlee89,项目名称:athena,代码行数:23,代码来源:ControllerTest.java

示例2: setUp

import org.onosproject.ospf.controller.area.OspfProcessImpl; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
    ospfProcess = new OspfProcessImpl();
    ospfArea = createOspfArea();
    ospfAreas.add(ospfArea);
    ospfProcess.setAreas(ospfAreas);
    ospfProcesses.add(ospfProcess);
    controller = new Controller();
    topologyForDeviceAndLink = new TopologyForDeviceAndLinkImpl();
    ospfNbr = new OspfNbrImpl(ospfArea, ospfInterface, ip4Address1,
                              ip4Address2, 2, topologyForDeviceAndLink);
    ospfNbr.setNeighborId(ip4Address1);
    ospfNbr.setRouterPriority(0);
    ospfNbr.setNeighborDr(ip4Address3);
    ospfInterface.addNeighbouringRouter(ospfNbr);
    ospfInterfaceChannelHandler = new OspfInterfaceChannelHandler(controller, ospfProcesses);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:18,代码来源:OspfInterfaceChannelHandlerTest.java

示例3: setUp

import org.onosproject.ospf.controller.area.OspfProcessImpl; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
    controller = new Controller();
    maps = new HashMap<String, Long>();
    ospfProcess = new OspfProcessImpl();
    ospfArea = new OspfAreaImpl();
    ospfInterface = new OspfInterfaceImpl();
    ospfInterfaces = new ArrayList();
    ospfInterface.setIpAddress(Ip4Address.valueOf("1.1.1.1"));
    ospfInterfaces.add(ospfInterface);
    ospfArea.setAreaId(Ip4Address.valueOf("2.2.2.2"));
    ospfArea.setOspfInterfaceList(ospfInterfaces);
    ospfProcess.setProcessId("10.10.10.10");
    ospfAreas = new ArrayList();
    ospfAreas.add(ospfArea);
    ospfProcess.setAreas(ospfAreas);
    ospfProcesses = new ArrayList();
    ospfProcesses.add(ospfProcess);
    ospfProcess1 = new OspfProcessImpl();
    ospfProcess1.setProcessId("11.11.11.11");
    ospfArea1 = new OspfAreaImpl();
    ospfArea1.setAreaId(Ip4Address.valueOf("2.2.2.2"));
    ospfArea1.setOspfInterfaceList(ospfInterfaces);
    ospfAreas.add(ospfArea1);
    ospfProcess1.setAreas(ospfAreas);
    ospfProcesses.add(ospfProcess1);
    connectedChannels = new ArrayList<>();
}
 
开发者ID:shlee89,项目名称:athena,代码行数:29,代码来源:ControllerTest.java

示例4: testDeleteConfig

import org.onosproject.ospf.controller.area.OspfProcessImpl; //导入方法依赖的package包/类
/**
 * Tests deleteConfig() method.
 */
@Test
public void testDeleteConfig() throws Exception {
    ospfProcess = new OspfProcessImpl();
    ospfArea = new OspfAreaImpl();
    ospfInterface = new OspfInterfaceImpl();
    ospfInterfaces = new ArrayList();
    ospfInterface.setIpAddress(Ip4Address.valueOf("10.10.10.5"));
    ospfInterfaces.add(ospfInterface);
    ospfArea.setAreaId(Ip4Address.valueOf("2.2.2.2"));
    ospfArea.setOspfInterfaceList(ospfInterfaces);
    ospfProcess.setProcessId("10.10.10.10");
    areas = new ArrayList();
    areas.add(ospfArea);
    ospfProcess.setAreas(areas);
    ospfProcesses = new ArrayList();
    ospfProcesses.add(ospfProcess);
    process1 = new OspfProcessImpl();
    process1.setProcessId("11.11.11.11");
    ospfArea1 = new OspfAreaImpl();
    ospfArea1.setAreaId(Ip4Address.valueOf("2.2.2.2"));
    ospfArea1.setOspfInterfaceList(ospfInterfaces);
    areas.add(ospfArea1);
    process1.setAreas(areas);
    ospfProcesses.add(process1);
    ospfController.deleteConfig(ospfProcesses, "INTERFACE");
    assertThat(ospfController, is(notNullValue()));
}
 
开发者ID:shlee89,项目名称:athena,代码行数:31,代码来源:OspfControllerImplTest.java


注:本文中的org.onosproject.ospf.controller.area.OspfProcessImpl.setAreas方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。