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


Java Node.getTerminationPoint方法代码示例

本文整理汇总了Java中org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node.getTerminationPoint方法的典型用法代码示例。如果您正苦于以下问题:Java Node.getTerminationPoint方法的具体用法?Java Node.getTerminationPoint怎么用?Java Node.getTerminationPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node的用法示例。


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

示例1: copyBridgeToConfig

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; //导入方法依赖的package包/类
private void copyBridgeToConfig(Node brIntNode) {
    NodeBuilder bridgeNodeBuilder = new NodeBuilder(brIntNode);

    //termination points need to be masssaged to remove the ifindex field
    //which are not allowed in the config data store
    List<TerminationPoint> terminationPoints = brIntNode.getTerminationPoint();
    if (terminationPoints != null) {
        List<TerminationPoint> newTerminationPoints = new ArrayList<>();
        for (TerminationPoint tp : terminationPoints) {
            OvsdbTerminationPointAugmentation ovsdbTerminationPointAugmentation =
                                                    tp.getAugmentation(OvsdbTerminationPointAugmentation.class);
            TerminationPointBuilder tpBuilder = new TerminationPointBuilder(tp);
            if (ovsdbTerminationPointAugmentation != null) {
                OvsdbTerminationPointAugmentationBuilder tpAugmentationBuilder =
                            new OvsdbTerminationPointAugmentationBuilder(ovsdbTerminationPointAugmentation);
                tpAugmentationBuilder.setIfindex(null);
                tpBuilder.addAugmentation(OvsdbTerminationPointAugmentation.class, tpAugmentationBuilder.build());
            }
            newTerminationPoints.add(tpBuilder.build());
        }
        bridgeNodeBuilder.setTerminationPoint(newTerminationPoints);
    }

    InstanceIdentifier<Node> brNodeIid = SouthboundUtils.createInstanceIdentifier(brIntNode.getNodeId());
    this.mdsalUtils.put(LogicalDatastoreType.CONFIGURATION, brNodeIid, bridgeNodeBuilder.build());
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:27,代码来源:ElanBridgeManager.java

示例2: getData

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; //导入方法依赖的package包/类
@Override
public List<TerminationPoint> getData(Node node) {
    if (node != null) {
        return node.getTerminationPoint();
    }
    return null;
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:8,代码来源:PhysicalLocatorCmd.java

示例3: printVlanBindings

import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; //导入方法依赖的package包/类
@SuppressWarnings("checkstyle:HiddenField")
void printVlanBindings(Node psNode, String elanName) {
    session.getConsole().println("Vlan Bindings :");
    session.getConsole().println(HEADINGVLAN);
    if (psNode == null) {
        return;
    }
    List<TerminationPoint> terminationPoints = psNode.getTerminationPoint();
    if (terminationPoints == null || terminationPoints.isEmpty()) {
        return;
    }
    for (TerminationPoint terminationPoint : terminationPoints) {
        HwvtepPhysicalPortAugmentation aug =
                terminationPoint.getAugmentation(HwvtepPhysicalPortAugmentation.class);
        if (aug == null || aug.getVlanBindings() == null) {
            continue;
        }
        for (VlanBindings vlanBindings : aug.getVlanBindings()) {
            String lsFromremoteMac = getLogicalSwitchValue(vlanBindings.getLogicalSwitchRef());
            if (elanName.equals(lsFromremoteMac)) {
                session.getConsole().println(terminationPoint.getTpId().getValue()
                        + GAP + vlanBindings.getVlanIdKey().toString());
            }
        }
    }


}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:29,代码来源:NetworkL2gwDeviceInfoCli.java


注:本文中的org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node.getTerminationPoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。