use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.learnt.vpn.vip.to.port.event.data.LearntVpnVipToPortEvent in project netvirt by opendaylight.
the class VpnUtil method createLearntVpnVipToPortEvent.
public void createLearntVpnVipToPortEvent(String vpnName, String srcIp, String destIP, String portName, String macAddress, LearntVpnVipToPortEventAction action, TypedWriteTransaction<Operational> writeOperTxn) {
String eventId = MicroTimestamp.INSTANCE.get();
InstanceIdentifier<LearntVpnVipToPortEvent> id = buildLearntVpnVipToPortEventIdentifier(eventId);
LearntVpnVipToPortEventBuilder builder = new LearntVpnVipToPortEventBuilder().withKey(new LearntVpnVipToPortEventKey(eventId)).setVpnName(vpnName).setSrcFixedip(srcIp).setDestFixedip(destIP).setPortName(portName).setMacAddress(macAddress.toLowerCase(Locale.getDefault())).setEventAction(action);
if (writeOperTxn != null) {
writeOperTxn.delete(id);
} else {
syncWrite(LogicalDatastoreType.OPERATIONAL, id, builder.build());
}
LOG.info("createLearntVpnVipToPortEvent: ARP learn event created for fixedIp: {}, vpn {}, interface {}," + " mac {} action {} eventId {}", srcIp, vpnName, portName, macAddress, action, eventId);
}
Aggregations