mirror of
https://github.com/google/nomulus.git
synced 2025-05-21 03:39:36 +02:00
Fix bug which allowed creation of hosts with superordinate domains in pending delete state.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=154716883
This commit is contained in:
parent
386d2bc6be
commit
11e7374c0f
7 changed files with 82 additions and 0 deletions
|
@ -28,6 +28,7 @@ import com.googlecode.objectify.VoidWork;
|
|||
import google.registry.config.RegistryConfig.Config;
|
||||
import google.registry.mapreduce.MapreduceRunner;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.eppcommon.StatusValue;
|
||||
import google.registry.model.host.HostResource;
|
||||
import google.registry.request.Action;
|
||||
import google.registry.request.Parameter;
|
||||
|
@ -107,6 +108,14 @@ public class RdeHostLinkAction implements Runnable {
|
|||
logger.infofmt("Host %s is out of zone", xjcHost.getName());
|
||||
return;
|
||||
}
|
||||
if (superordinateDomain.get().getStatusValues().contains(StatusValue.PENDING_DELETE)) {
|
||||
getContext()
|
||||
.incrementCounter(
|
||||
"post-import hosts with superordinate domains in pending delete");
|
||||
logger.infofmt(
|
||||
"Host %s has a superordinate domain in pending delete", xjcHost.getName());
|
||||
return;
|
||||
}
|
||||
// at this point, the host is definitely in zone and should be linked
|
||||
getContext().incrementCounter("post-import hosts in zone");
|
||||
final Key<DomainResource> superordinateDomainKey = Key.create(superordinateDomain.get());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue