use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.AddInterfaceToDpnOnVpnEventBuilder in project netvirt by opendaylight.
the class VpnFootprintService method publishInterfaceAddedToVpnNotification.
private void publishInterfaceAddedToVpnNotification(String interfaceName, BigInteger dpnId, String vpnName, Long vpnId) {
LOG.debug("publishInterfaceAddedToVpnNotification: Sending notification for addition of interface {} on dpn {}" + " for vpn {}", interfaceName, dpnId, vpnName);
AddInterfaceEventData data = new AddInterfaceEventDataBuilder().setInterfaceName(interfaceName).setVpnId(vpnId).setDpnId(dpnId).build();
AddInterfaceToDpnOnVpnEvent event = new AddInterfaceToDpnOnVpnEventBuilder().setAddInterfaceEventData(data).build();
final ListenableFuture<?> eventFuture = notificationPublishService.offerNotification(event);
Futures.addCallback(eventFuture, new FutureCallback<Object>() {
@Override
public void onFailure(Throwable error) {
LOG.warn("publishInterfaceAddedToVpnNotification: Error in notifying listeners for add interface {}" + " on dpn {} in vpn {} event ", interfaceName, dpnId, vpnName, error);
}
@Override
public void onSuccess(Object arg) {
LOG.trace("publishInterfaceAddedToVpnNotification: Successful in notifying listeners for add" + " interface {} on dpn {} in vpn {} event ", interfaceName, dpnId, vpnName);
}
}, MoreExecutors.directExecutor());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.AddInterfaceToDpnOnVpnEventBuilder in project netvirt by opendaylight.
the class VpnFootprintService method publishInterfaceAddedToVpnNotification.
private void publishInterfaceAddedToVpnNotification(String interfaceName, Uint64 dpnId, String vpnName, Uint32 vpnId) {
LOG.debug("publishInterfaceAddedToVpnNotification: Sending notification for addition of interface {} on dpn {}" + " for vpn {}", interfaceName, dpnId, vpnName);
AddInterfaceEventData data = new AddInterfaceEventDataBuilder().setInterfaceName(interfaceName).setVpnId(vpnId).setDpnId(dpnId).build();
AddInterfaceToDpnOnVpnEvent event = new AddInterfaceToDpnOnVpnEventBuilder().setAddInterfaceEventData(data).build();
final ListenableFuture<?> eventFuture = notificationPublishService.offerNotification(event);
Futures.addCallback(eventFuture, new FutureCallback<Object>() {
@Override
public void onFailure(Throwable error) {
LOG.warn("publishInterfaceAddedToVpnNotification: Error in notifying listeners for add interface {}" + " on dpn {} in vpn {} event ", interfaceName, dpnId, vpnName, error);
}
@Override
public void onSuccess(Object arg) {
LOG.trace("publishInterfaceAddedToVpnNotification: Successful in notifying listeners for add" + " interface {} on dpn {} in vpn {} event ", interfaceName, dpnId, vpnName);
}
}, MoreExecutors.directExecutor());
}
Aggregations