use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.remove._interface.from.dpn.on.vpn.event.RemoveInterfaceEventDataBuilder in project netvirt by opendaylight.
the class VpnFootprintService method publishInterfaceRemovedFromVpnNotification.
private void publishInterfaceRemovedFromVpnNotification(String interfaceName, BigInteger dpnId, String vpnName, Long vpnId) {
LOG.debug("publishInterfaceAddedToVpnNotification: Sending notification for removal of interface {}" + " from dpn {} for vpn {}", interfaceName, dpnId, vpnName);
RemoveInterfaceEventData data = new RemoveInterfaceEventDataBuilder().setInterfaceName(interfaceName).setVpnId(vpnId).setDpnId(dpnId).build();
RemoveInterfaceFromDpnOnVpnEvent event = new RemoveInterfaceFromDpnOnVpnEventBuilder().setRemoveInterfaceEventData(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 removing interface {} from dpn {} in vpn {} event ", interfaceName, dpnId, vpnName, error);
}
@Override
public void onSuccess(Object arg) {
LOG.trace("publishInterfaceAddedToVpnNotification: Successful in notifying listeners for removing" + " interface {} from dpn {} in vpn {} event ", interfaceName, dpnId, vpnName);
}
}, MoreExecutors.directExecutor());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.remove._interface.from.dpn.on.vpn.event.RemoveInterfaceEventDataBuilder in project netvirt by opendaylight.
the class VpnFootprintService method publishInterfaceRemovedFromVpnNotification.
private void publishInterfaceRemovedFromVpnNotification(String interfaceName, Uint64 dpnId, String vpnName, Uint32 vpnId) {
LOG.debug("publishInterfaceAddedToVpnNotification: Sending notification for removal of interface {}" + " from dpn {} for vpn {}", interfaceName, dpnId, vpnName);
RemoveInterfaceEventData data = new RemoveInterfaceEventDataBuilder().setInterfaceName(interfaceName).setVpnId(vpnId).setDpnId(dpnId).build();
RemoveInterfaceFromDpnOnVpnEvent event = new RemoveInterfaceFromDpnOnVpnEventBuilder().setRemoveInterfaceEventData(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 removing interface {} from dpn {} in vpn {} event ", interfaceName, dpnId, vpnName, error);
}
@Override
public void onSuccess(Object arg) {
LOG.trace("publishInterfaceAddedToVpnNotification: Successful in notifying listeners for removing" + " interface {} from dpn {} in vpn {} event ", interfaceName, dpnId, vpnName);
}
}, MoreExecutors.directExecutor());
}
Aggregations