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