Search in sources :

Example 1 with LearntVpnVipToPortEventKey

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.learnt.vpn.vip.to.port.event.data.LearntVpnVipToPortEventKey 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);
}
Also used : LearntVpnVipToPortEventKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.learnt.vpn.vip.to.port.event.data.LearntVpnVipToPortEventKey) LearntVpnVipToPortEventBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.learnt.vpn.vip.to.port.event.data.LearntVpnVipToPortEventBuilder) LearntVpnVipToPortEvent(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.learnt.vpn.vip.to.port.event.data.LearntVpnVipToPortEvent)

Aggregations

LearntVpnVipToPortEvent (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.learnt.vpn.vip.to.port.event.data.LearntVpnVipToPortEvent)1 LearntVpnVipToPortEventBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.learnt.vpn.vip.to.port.event.data.LearntVpnVipToPortEventBuilder)1 LearntVpnVipToPortEventKey (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.learnt.vpn.vip.to.port.event.data.LearntVpnVipToPortEventKey)1