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


Java OspfAreaAddressRangeImpl类代码示例

本文整理汇总了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;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:23,代码来源:OspfInterfaceChannelHandlerTest.java

示例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;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:33,代码来源:OspfNbrImplTest.java

示例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;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:11,代码来源:OspfNbrImplTest.java

示例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;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:11,代码来源:OspfInterfaceChannelHandlerTest.java


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