use of org.opendaylight.netvirt.dhcpservice.jobs.DhcpAllocationPoolAddJob in project netvirt by opendaylight.
the class DhcpAllocationPoolListener method add.
@Override
protected void add(InstanceIdentifier<AllocationPool> key, AllocationPool dataObjectModification) {
String networkId = key.firstKeyOf(Network.class).getNetworkId();
dhcpAllocationPoolManager.createIdAllocationPool(networkId, dataObjectModification);
Map<BigInteger, List<String>> elanDpnInterfacesByName = getDpnInterfacesByNetwork(networkId);
for (Entry<BigInteger, List<String>> entry : elanDpnInterfacesByName.entrySet()) {
BigInteger dpnId = entry.getKey();
for (String interfaceName : entry.getValue()) {
LOG.debug("Install Dhcp Entries for dpId: {} interface : {}", dpnId, interfaceName);
DhcpAllocationPoolAddJob job = new DhcpAllocationPoolAddJob(txRunner, interfaceName);
jobCoordinator.enqueueJob(DhcpServiceUtils.getJobKey(interfaceName), job, DhcpMConstants.RETRY_COUNT);
}
}
}
Aggregations