use of org.opendaylight.netvirt.vpnmanager.intervpnlink.tasks.InterVpnLinkRemoverTask in project netvirt by opendaylight.
the class InterVpnLinkListener method update.
@Override
protected void update(InstanceIdentifier<InterVpnLink> identifier, InterVpnLink original, InterVpnLink update) {
LOG.debug("Update InterVpnLink {}. " + " original=[1stEndpoint=[vpn=<{}> ipAddr=<{}>] 2ndEndpoint=[vpn=<{}> ipAddr=<{}>]]" + " update=[1stEndpoint=[vpn=<{}> ipAddr=<{}>] 2ndEndpoint=[vpn=<{}> ipAddr=<{}>]]", original.getName(), original.getFirstEndpoint().getVpnUuid(), original.getFirstEndpoint().getIpAddress(), original.getSecondEndpoint().getVpnUuid(), original.getSecondEndpoint().getIpAddress(), update.getFirstEndpoint().getVpnUuid(), update.getFirstEndpoint().getIpAddress(), update.getSecondEndpoint().getVpnUuid(), update.getSecondEndpoint().getIpAddress());
String specificJobKey = "InterVpnLink.update." + original.getName();
jobCoordinator.enqueueJob(specificJobKey, new InterVpnLinkRemoverTask(dataBroker, identifier));
jobCoordinator.enqueueJob(specificJobKey, new InterVpnLinkCleanedCheckerTask(dataBroker, original));
jobCoordinator.enqueueJob(specificJobKey, new InterVpnLinkCreatorTask(dataBroker, update));
}
use of org.opendaylight.netvirt.vpnmanager.intervpnlink.tasks.InterVpnLinkRemoverTask in project netvirt by opendaylight.
the class InterVpnLinkNodeListener method reinstallInterVpnLink.
private void reinstallInterVpnLink(InterVpnLinkDataComposite ivl) {
String ivlName = ivl.getInterVpnLinkName();
LOG.debug("Reinstalling InterVpnLink {} affected by node going down", ivlName);
// Lets move the InterVpnLink to some other place. Basically, remove it and create it again
InstanceIdentifier<InterVpnLink> interVpnLinkIid = InterVpnLinkUtil.getInterVpnLinkPath(ivlName);
String specificJobKey = "InterVpnLink.update." + ivlName;
InterVpnLink interVpnLink = ivl.getInterVpnLinkConfig();
jobCoordinator.enqueueJob(specificJobKey, new InterVpnLinkRemoverTask(dataBroker, interVpnLinkIid));
jobCoordinator.enqueueJob(specificJobKey, new InterVpnLinkCleanedCheckerTask(dataBroker, interVpnLink));
jobCoordinator.enqueueJob(specificJobKey, new InterVpnLinkCreatorTask(dataBroker, interVpnLink));
}
Aggregations