use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey in project genius by opendaylight.
the class HwVTEPConfigRemoveHelper method removeTerminationEndPoint.
private static void removeTerminationEndPoint(WriteTransaction transaction, IfTunnel ifTunnel, InstanceIdentifier<Node> globalNodeId) {
LOG.info("removing remote termination end point {}", ifTunnel.getTunnelDestination());
TerminationPointKey tpKey = SouthboundUtils.getTerminationPointKey(ifTunnel.getTunnelDestination().getIpv4Address().getValue());
InstanceIdentifier<TerminationPoint> tpPath = SouthboundUtils.createInstanceIdentifier(globalNodeId, tpKey);
transaction.delete(LogicalDatastoreType.CONFIGURATION, tpPath);
}
use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey in project genius by opendaylight.
the class HwVTEPInterfaceConfigAddHelper method createRemotePhysicalLocatorEntry.
private static InstanceIdentifier<TerminationPoint> createRemotePhysicalLocatorEntry(WriteTransaction transaction, InstanceIdentifier<Node> nodeIid, IpAddress destIPAddress) {
String remoteIp = destIPAddress.getIpv4Address().getValue();
LOG.debug("creating remote physical locator entry {}", remoteIp);
TerminationPointKey tpKey = SouthboundUtils.getTerminationPointKey(remoteIp);
InstanceIdentifier<TerminationPoint> tpPath = SouthboundUtils.createInstanceIdentifier(nodeIid, tpKey);
createPhysicalLocatorEntry(transaction, tpPath, tpKey, destIPAddress);
return tpPath;
}
use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey in project genius by opendaylight.
the class SouthboundUtils method getTerminationPointKey.
public static TerminationPointKey getTerminationPointKey(String ipAddress) {
TerminationPointKey tpKey = null;
String tpKeyStr = getTerminationPointKeyString(ipAddress);
if (tpKeyStr != null) {
tpKey = new TerminationPointKey(new TpId(tpKeyStr));
}
return tpKey;
}
use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey in project genius by opendaylight.
the class HwvtepSouthboundUtils method getTerminationPointKey.
/**
* Gets the termination point key.
*
* @param phyLocator
* the phy locator
* @return the termination point key
*/
public static TerminationPointKey getTerminationPointKey(HwvtepPhysicalLocatorAugmentation phyLocator) {
TerminationPointKey tpKey = null;
if (phyLocator.getEncapsulationType() != null && phyLocator.getDstIp() != null) {
String encapType = HwvtepSouthboundConstants.ENCAPS_TYPE_MAP.get(phyLocator.getEncapsulationType());
String tpKeyStr = encapType + ":" + String.valueOf(phyLocator.getDstIp().getValue());
tpKey = new TerminationPointKey(new TpId(tpKeyStr));
}
return tpKey;
}
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 TunnelProgrammingTest method createNode.
private static Node createNode(final NodeId nodeId, final TpId tpId, final String ipv4Address) {
final TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
tpBuilder.setTpId(tpId);
tpBuilder.setKey(new TerminationPointKey(tpId));
tpBuilder.addAugmentation(TerminationPoint1.class, new TerminationPoint1Builder().setIgpTerminationPointAttributes(new IgpTerminationPointAttributesBuilder().setTerminationPointType(new IpBuilder().setIpAddress(Collections.singletonList(new IpAddress(new Ipv4Address(ipv4Address)))).build()).build()).build());
final NodeBuilder nodeBuilder = new NodeBuilder();
nodeBuilder.setNodeId(nodeId);
nodeBuilder.setKey(new NodeKey(nodeId));
nodeBuilder.setTerminationPoint(Lists.newArrayList(tpBuilder.build()));
final SupportingNode supportingNode = new SupportingNodeBuilder().setKey(new SupportingNodeKey(nodeId, new TopologyId("dummy"))).addAugmentation(SupportingNode1.class, new SupportingNode1Builder().setPathComputationClient(new PathComputationClientBuilder().setControlling(true).build()).build()).build();
nodeBuilder.setSupportingNode(Lists.newArrayList(supportingNode));
return nodeBuilder.build();
}
Aggregations