Search in sources :

Example 1 with InterVpnLinkCreatorTask

use of org.opendaylight.netvirt.vpnmanager.intervpnlink.tasks.InterVpnLinkCreatorTask 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));
}
Also used : InterVpnLinkRemoverTask(org.opendaylight.netvirt.vpnmanager.intervpnlink.tasks.InterVpnLinkRemoverTask) InterVpnLinkCleanedCheckerTask(org.opendaylight.netvirt.vpnmanager.intervpnlink.tasks.InterVpnLinkCleanedCheckerTask) InterVpnLinkCreatorTask(org.opendaylight.netvirt.vpnmanager.intervpnlink.tasks.InterVpnLinkCreatorTask)

Example 2 with InterVpnLinkCreatorTask

use of org.opendaylight.netvirt.vpnmanager.intervpnlink.tasks.InterVpnLinkCreatorTask 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));
}
Also used : InterVpnLink(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.inter.vpn.link.rev160311.inter.vpn.links.InterVpnLink) InterVpnLinkRemoverTask(org.opendaylight.netvirt.vpnmanager.intervpnlink.tasks.InterVpnLinkRemoverTask) InterVpnLinkCleanedCheckerTask(org.opendaylight.netvirt.vpnmanager.intervpnlink.tasks.InterVpnLinkCleanedCheckerTask) InterVpnLinkCreatorTask(org.opendaylight.netvirt.vpnmanager.intervpnlink.tasks.InterVpnLinkCreatorTask)

Aggregations

InterVpnLinkCleanedCheckerTask (org.opendaylight.netvirt.vpnmanager.intervpnlink.tasks.InterVpnLinkCleanedCheckerTask)2 InterVpnLinkCreatorTask (org.opendaylight.netvirt.vpnmanager.intervpnlink.tasks.InterVpnLinkCreatorTask)2 InterVpnLinkRemoverTask (org.opendaylight.netvirt.vpnmanager.intervpnlink.tasks.InterVpnLinkRemoverTask)2 InterVpnLink (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.inter.vpn.link.rev160311.inter.vpn.links.InterVpnLink)1