use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointBuilder in project genius by opendaylight.
the class SouthboundUtils method updateBfdParamtersForTerminationPoint.
// Update is allowed only for tunnel monitoring attributes
public static void updateBfdParamtersForTerminationPoint(InstanceIdentifier<?> bridgeIid, IfTunnel ifTunnel, String portName, WriteTransaction transaction) {
InstanceIdentifier<TerminationPoint> tpIid = createTerminationPointInstanceIdentifier(InstanceIdentifier.keyOf(bridgeIid.firstIdentifierOf(Node.class)), portName);
if (isOfTunnel(ifTunnel)) {
LOG.warn("BFD monitoring not supported for OFTunnels. Skipping BFD parameters for {}", portName);
return;
}
LOG.debug("update bfd parameters for interface {}", tpIid);
OvsdbTerminationPointAugmentationBuilder tpAugmentationBuilder = new OvsdbTerminationPointAugmentationBuilder();
List<InterfaceBfd> bfdParams = getBfdParams(ifTunnel);
tpAugmentationBuilder.setInterfaceBfd(bfdParams);
TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
tpBuilder.setKey(InstanceIdentifier.keyOf(tpIid));
tpBuilder.addAugmentation(OvsdbTerminationPointAugmentation.class, tpAugmentationBuilder.build());
transaction.merge(LogicalDatastoreType.CONFIGURATION, tpIid, tpBuilder.build(), true);
}
use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointBuilder in project genius by opendaylight.
the class HwVTEPInterfaceConfigAddHelper method createPhysicalLocatorEntry.
/*
* This method writes the termination end point details to the topology
* Config DS
*/
private static void createPhysicalLocatorEntry(WriteTransaction transaction, InstanceIdentifier<TerminationPoint> tpPath, TerminationPointKey terminationPointKey, IpAddress destIPAddress) {
TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
HwvtepPhysicalLocatorAugmentationBuilder tpAugmentationBuilder = new HwvtepPhysicalLocatorAugmentationBuilder();
tpBuilder.setKey(terminationPointKey);
tpBuilder.setTpId(terminationPointKey.getTpId());
tpAugmentationBuilder.setEncapsulationType(EncapsulationTypeVxlanOverIpv4.class);
SouthboundUtils.setDstIp(tpAugmentationBuilder, destIPAddress);
tpBuilder.addAugmentation(HwvtepPhysicalLocatorAugmentation.class, tpAugmentationBuilder.build());
LOG.debug("creating physical locator entry for {}", terminationPointKey);
transaction.put(LogicalDatastoreType.CONFIGURATION, tpPath, tpBuilder.build(), true);
}
Aggregations