use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey in project bgpcep by opendaylight.
the class NodeChangedListener method createTP.
private InstanceIdentifier<TerminationPoint> createTP(final IpAddress addr, final InstanceIdentifier<Node> sni, final Boolean inControl, final ReadWriteTransaction trans) {
final String url = "ip://" + addr.toString();
final TerminationPointKey tpk = new TerminationPointKey(new TpId(url));
final TerminationPointBuilder tpb = new TerminationPointBuilder();
tpb.setKey(tpk).setTpId(tpk.getTpId());
tpb.addAugmentation(TerminationPoint1.class, new TerminationPoint1Builder().setIgpTerminationPointAttributes(new IgpTerminationPointAttributesBuilder().setTerminationPointType(new IpBuilder().setIpAddress(Lists.newArrayList(addr)).build()).build()).build());
final NodeKey nk = new NodeKey(new NodeId(url));
final NodeBuilder nb = new NodeBuilder();
nb.setKey(nk).setNodeId(nk.getNodeId());
nb.setTerminationPoint(Lists.newArrayList(tpb.build()));
if (sni != null) {
nb.setSupportingNode(Lists.newArrayList(createSupportingNode(InstanceIdentifier.keyOf(sni).getNodeId(), inControl)));
}
final InstanceIdentifier<Node> nid = this.target.child(Node.class, nb.getKey());
trans.put(LogicalDatastoreType.OPERATIONAL, nid, nb.build());
return nid.child(TerminationPoint.class, tpb.getKey());
}
use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey in project netvirt by opendaylight.
the class PhysicalSwitchHelper method buildTerminationPointForPhysicalSwitch.
public static TerminationPoint buildTerminationPointForPhysicalSwitch(InstanceIdentifier<Node> switchIid, String portName, WriteTransaction transaction, Map<Long, String> vlanBindingData) {
TerminationPointKey tpKey = new TerminationPointKey(new TpId(portName));
TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
tpBuilder.setKey(tpKey);
tpBuilder.setTpId(tpKey.getTpId());
switchIid.firstKeyOf(Node.class);
InstanceIdentifier<TerminationPoint> tpPath = switchIid.child(TerminationPoint.class, new TerminationPointKey(new TpId(portName)));
HwvtepPhysicalPortAugmentationBuilder tpAugmentationBuilder = new HwvtepPhysicalPortAugmentationBuilder();
buildTerminationPoint(tpAugmentationBuilder, portName, vlanBindingData);
tpBuilder.addAugmentation(HwvtepPhysicalPortAugmentation.class, tpAugmentationBuilder.build());
return tpBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey in project netvirt by opendaylight.
the class TestBuilders method buildTpId.
public static InstanceIdentifier<TerminationPoint> buildTpId(InstanceIdentifier<Node> nodeIid, String tepIp) {
String tpKeyStr = "vxlan_over_ipv4" + ':' + tepIp;
TerminationPointKey tpKey = new TerminationPointKey(new TpId(tpKeyStr));
InstanceIdentifier<TerminationPoint> plIid = nodeIid.child(TerminationPoint.class, tpKey);
return plIid;
}
use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey in project netvirt by opendaylight.
the class HwvtepHAUtil method buildTpId.
public static InstanceIdentifier<TerminationPoint> buildTpId(InstanceIdentifier<Node> nodeIid, String tepIp) {
String tpKeyStr = TEP_PREFIX + tepIp;
TerminationPointKey tpKey = new TerminationPointKey(new TpId(tpKeyStr));
InstanceIdentifier<TerminationPoint> plIid = nodeIid.child(TerminationPoint.class, tpKey);
return plIid;
}
use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey in project netvirt by opendaylight.
the class L2GwValidateCli method getPhysicalPortTerminationPointIid.
private InstanceIdentifier<TerminationPoint> getPhysicalPortTerminationPointIid(NodeId nodeId, String portName) {
TerminationPointKey tpKey = new TerminationPointKey(new TpId(portName));
InstanceIdentifier<TerminationPoint> iid = HwvtepSouthboundUtils.createTerminationPointId(nodeId, tpKey);
return iid;
}
Aggregations