mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 17:07:15 +02:00
Delete end-date sunrise, landrush, and sunrush phases
This also deletes the associated commands and domain application specific entities. We haven't used any of these TLD phases since early 2015 and have no intent to do so in the future, so it makes sense to delete them now so we don't have to carry them through the Registry 3.0 migration. Note that, while there are data model changes, there should be no required data migrations. The fields and entities being removed will simply remain as orphans. I confirmed that the removed types (such as the SUNRUSH_ADD GracePeriodType) are no longer used in production data, and left types that are still used, e.g. BillingEvent.Flag.LANDRUSH or HistoryEntry.Type.ALLOCATE. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=228752843
This commit is contained in:
parent
c74ffd7559
commit
580302898d
282 changed files with 344 additions and 17634 deletions
|
@ -24,13 +24,11 @@ import static google.registry.flows.domain.DomainFlowUtils.validateDomainName;
|
|||
import static google.registry.flows.domain.DomainFlowUtils.validateDomainNameWithIdnTables;
|
||||
import static google.registry.flows.domain.DomainFlowUtils.verifyNotInPredelegation;
|
||||
import static google.registry.model.EppResourceUtils.checkResourcesExist;
|
||||
import static google.registry.model.index.DomainApplicationIndex.loadActiveApplicationsByDomainName;
|
||||
import static google.registry.model.registry.label.ReservationType.getTypeOfHighestSeverity;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.common.net.InternetDomainName;
|
||||
import google.registry.config.RegistryConfig.Config;
|
||||
import google.registry.flows.EppException;
|
||||
|
@ -58,7 +56,6 @@ import google.registry.model.eppoutput.CheckData.DomainCheckData;
|
|||
import google.registry.model.eppoutput.EppResponse;
|
||||
import google.registry.model.eppoutput.EppResponse.ResponseExtension;
|
||||
import google.registry.model.registry.Registry;
|
||||
import google.registry.model.registry.Registry.TldState;
|
||||
import google.registry.model.registry.label.ReservationType;
|
||||
import google.registry.model.reporting.IcannReportingTypes.ActivityReportField;
|
||||
import google.registry.util.Clock;
|
||||
|
@ -99,14 +96,6 @@ import org.joda.time.DateTime;
|
|||
@ReportingSpec(ActivityReportField.DOMAIN_CHECK)
|
||||
public final class DomainCheckFlow implements Flow {
|
||||
|
||||
/**
|
||||
* The TLD states during which we want to report a domain with pending applications as
|
||||
* unavailable.
|
||||
*/
|
||||
private static final ImmutableSet<TldState> PENDING_ALLOCATION_TLD_STATES =
|
||||
Sets.immutableEnumSet(
|
||||
TldState.GENERAL_AVAILABILITY, TldState.START_DATE_SUNRISE, TldState.QUIET_PERIOD);
|
||||
|
||||
@Inject ResourceCommand resourceCommand;
|
||||
@Inject ExtensionManager extensionManager;
|
||||
@Inject EppInput eppInput;
|
||||
|
@ -166,7 +155,7 @@ public final class DomainCheckFlow implements Flow {
|
|||
ImmutableList.Builder<DomainCheck> checks = new ImmutableList.Builder<>();
|
||||
for (String targetId : targetIds) {
|
||||
Optional<String> message =
|
||||
getMessageForCheck(domainNames.get(targetId), existingIds, tokenCheckResults, now);
|
||||
getMessageForCheck(domainNames.get(targetId), existingIds, tokenCheckResults);
|
||||
checks.add(DomainCheck.create(!message.isPresent(), targetId, message.orElse(null)));
|
||||
}
|
||||
BeforeResponseReturnData responseData =
|
||||
|
@ -185,18 +174,10 @@ public final class DomainCheckFlow implements Flow {
|
|||
private Optional<String> getMessageForCheck(
|
||||
InternetDomainName domainName,
|
||||
Set<String> existingIds,
|
||||
ImmutableMap<InternetDomainName, String> tokenCheckResults,
|
||||
DateTime now) {
|
||||
ImmutableMap<InternetDomainName, String> tokenCheckResults) {
|
||||
if (existingIds.contains(domainName.toString())) {
|
||||
return Optional.of("In use");
|
||||
}
|
||||
Registry registry = Registry.get(domainName.parent().toString());
|
||||
if (PENDING_ALLOCATION_TLD_STATES.contains(registry.getTldState(now))
|
||||
&& loadActiveApplicationsByDomainName(domainName.toString(), now)
|
||||
.stream()
|
||||
.anyMatch(input -> !input.getApplicationStatus().isFinalStatus())) {
|
||||
return Optional.of("Pending allocation");
|
||||
}
|
||||
ImmutableSet<ReservationType> reservationTypes = getReservationTypes(domainName);
|
||||
if (!reservationTypes.isEmpty()) {
|
||||
return Optional.of(getTypeOfHighestSeverity(reservationTypes).getMessageForCheck());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue