本文整理汇总了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()));
}
示例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);
}
示例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<>();
}
示例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()));
}