import java.util.Collection;
import java.util.Collections;
import java.util.List;
+import javax.annotation.Nullable;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
private void installExtNetGroupEntry(long groupId, String subnetName, String extInterface,
String macAddress, BigInteger dpnId) {
- coordinator.enqueueJob(NatConstants.NAT_DJC_PREFIX + subnetName + extInterface, () -> {
+ coordinator.enqueueJob(NatUtil.getDefaultFibRouteToSNATForSubnetJobKey(subnetName, dpnId), () -> {
GroupEntity groupEntity = buildExtNetGroupEntity(macAddress, subnetName, groupId, extInterface, dpnId);
- if (groupEntity != null) {
- mdsalManager.syncInstallGroup(groupEntity);
- }
+ mdsalManager.syncInstallGroup(groupEntity);
return Collections.emptyList();
});
}
return MDSALUtil.buildGroupEntity(dpnId, groupId, subnetName, GroupTypes.GroupAll, listBucketInfo);
}
+ @Nullable
private GroupEntity buildEmptyExtNetGroupEntity(String subnetName, long groupId, String extInterface) {
BigInteger dpId = NatUtil.getDpnForInterface(odlInterfaceRpcService, extInterface);
if (BigInteger.ZERO.equals(dpId)) {