本文整理汇总了Java中org.onosproject.ospf.controller.area.OspfAreaAddressRangeImpl类的典型用法代码示例。如果您正苦于以下问题:Java OspfAreaAddressRangeImpl类的具体用法?Java OspfAreaAddressRangeImpl怎么用?Java OspfAreaAddressRangeImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OspfAreaAddressRangeImpl类属于org.onosproject.ospf.controller.area包,在下文中一共展示了OspfAreaAddressRangeImpl类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createOspfArea
import org.onosproject.ospf.controller.area.OspfAreaAddressRangeImpl; //导入依赖的package包/类
/**
* Utility for test method.
*/
private OspfAreaImpl createOspfArea() throws Exception {
OspfAreaAddressRangeImpl ospfAreaAddressRange;
ospfAreaAddressRange = createOspfAreaAddressRange();
addressRanges.add(ospfAreaAddressRange);
OspfAreaImpl ospfArea = new OspfAreaImpl();
ospfArea.setAreaId(ip4Address5);
ospfArea.setExternalRoutingCapability(true);
OspfInterfaceImpl ospfInterface = createOspfInterface();
ospfInterfaces.add(ospfInterface);
ospfArea.setOspfInterfaceList(ospfInterfaces);
RouterLsa routerLsa = new RouterLsa();
routerLsa.setLsType(1);
routerLsa.setLinkStateId(string1);
routerLsa.setAdvertisingRouter(ip4Address2);
ospfArea.addLsa(routerLsa, false, ospfInterface);
ospfArea.setRouterId(ip4Address4);
return ospfArea;
}
示例2: createOspfArea
import org.onosproject.ospf.controller.area.OspfAreaAddressRangeImpl; //导入依赖的package包/类
/**
* Utility for test method.
*/
private OspfAreaImpl createOspfArea() throws UnknownHostException {
OspfAreaAddressRangeImpl ospfAreaAddressRange;
ospfAreaAddressRange = createOspfAreaAddressRange();
addressRanges.add(ospfAreaAddressRange);
OspfAreaImpl ospfArea = new OspfAreaImpl();
ospfArea.setAreaId(Ip4Address.valueOf("10.226.165.164"));
ospfArea.setExternalRoutingCapability(true);
OspfInterfaceImpl ospfInterface = createOspfInterface();
ospfInterfaces.add(ospfInterface);
ospfArea.setOspfInterfaceList(ospfInterfaces);
RouterLsa routerLsa = new RouterLsa();
routerLsa.setLsType(1);
routerLsa.setLinkStateId("2.2.2.2");
routerLsa.setAdvertisingRouter(Ip4Address.valueOf("2.2.2.2"));
OpaqueLsaHeader opaqueLsaHeader = new OpaqueLsaHeader();
OpaqueLsa10 opaqueLsa10 = new OpaqueLsa10(opaqueLsaHeader);
opaqueLsa10.setLsType(OspfLsaType.AREA_LOCAL_OPAQUE_LSA.value());
opaqueLsa10.setLinkStateId("2.2.2.2");
opaqueLsa10.setAdvertisingRouter(Ip4Address.valueOf("2.2.2.2"));
try {
ospfArea.addLsa(routerLsa, false, ospfInterface);
ospfArea.addLsa(opaqueLsa10, false, ospfInterface);
} catch (Exception e) {
System.out.println("ospfAreaImpl createOspfArea");
}
ospfArea.setRouterId(Ip4Address.valueOf("111.111.111.111"));
return ospfArea;
}
示例3: createOspfAreaAddressRange
import org.onosproject.ospf.controller.area.OspfAreaAddressRangeImpl; //导入依赖的package包/类
/**
* Utility for test method.
*/
private OspfAreaAddressRangeImpl createOspfAreaAddressRange() {
OspfAreaAddressRangeImpl ospfAreaAddressRange = new OspfAreaAddressRangeImpl();
ospfAreaAddressRange.setIpAddress(Ip4Address.valueOf("10.226.165.164"));
ospfAreaAddressRange.setAdvertise(true);
ospfAreaAddressRange.setMask("mask");
return ospfAreaAddressRange;
}
示例4: createOspfAreaAddressRange
import org.onosproject.ospf.controller.area.OspfAreaAddressRangeImpl; //导入依赖的package包/类
/**
* Utility for test method.
*/
private OspfAreaAddressRangeImpl createOspfAreaAddressRange() {
OspfAreaAddressRangeImpl ospfAreaAddressRange = new OspfAreaAddressRangeImpl();
ospfAreaAddressRange.setIpAddress(ip4Address5);
ospfAreaAddressRange.setAdvertise(true);
ospfAreaAddressRange.setMask("mask");
return ospfAreaAddressRange;
}