mirror of
https://github.com/google/nomulus.git
synced 2025-07-21 02:06:00 +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
|
@ -27,7 +27,6 @@ import static google.registry.config.RegistryConfig.getContactAutomaticTransferL
|
|||
import static google.registry.model.EppResourceUtils.createDomainRepoId;
|
||||
import static google.registry.model.EppResourceUtils.createRepoId;
|
||||
import static google.registry.model.ResourceTransferUtils.createTransferResponse;
|
||||
import static google.registry.model.domain.launch.ApplicationStatus.VALIDATED;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.model.registry.label.PremiumListUtils.parentPremiumListEntriesOnRevision;
|
||||
import static google.registry.pricing.PricingEngineProxy.getDomainRenewCost;
|
||||
|
@ -66,17 +65,14 @@ import google.registry.model.contact.ContactAuthInfo;
|
|||
import google.registry.model.contact.ContactResource;
|
||||
import google.registry.model.domain.DesignatedContact;
|
||||
import google.registry.model.domain.DesignatedContact.Type;
|
||||
import google.registry.model.domain.DomainApplication;
|
||||
import google.registry.model.domain.DomainAuthInfo;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.domain.GracePeriod;
|
||||
import google.registry.model.domain.launch.LaunchPhase;
|
||||
import google.registry.model.domain.rgp.GracePeriodStatus;
|
||||
import google.registry.model.eppcommon.AuthInfo.PasswordAuth;
|
||||
import google.registry.model.eppcommon.StatusValue;
|
||||
import google.registry.model.eppcommon.Trid;
|
||||
import google.registry.model.host.HostResource;
|
||||
import google.registry.model.index.DomainApplicationIndex;
|
||||
import google.registry.model.index.EppResourceIndex;
|
||||
import google.registry.model.index.EppResourceIndexBucket;
|
||||
import google.registry.model.index.ForeignKeyIndex;
|
||||
|
@ -93,7 +89,6 @@ import google.registry.model.registry.label.PremiumList.PremiumListEntry;
|
|||
import google.registry.model.registry.label.PremiumList.PremiumListRevision;
|
||||
import google.registry.model.registry.label.ReservedList;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
import google.registry.model.smd.EncodedSignedMark;
|
||||
import google.registry.model.transfer.TransferData;
|
||||
import google.registry.model.transfer.TransferData.Builder;
|
||||
import google.registry.model.transfer.TransferStatus;
|
||||
|
@ -164,59 +159,6 @@ public class DatastoreHelper {
|
|||
.build();
|
||||
}
|
||||
|
||||
public static DomainApplication newDomainApplication(String domainName) {
|
||||
// This ensures that the domain application gets the next available repoId before the created
|
||||
// contact does, which is usually the applicationId 1.
|
||||
return newDomainApplication(
|
||||
domainName,
|
||||
generateNewDomainRoid(getTldFromDomainName(domainName)),
|
||||
persistActiveContact("contact1234"),
|
||||
LaunchPhase.SUNRISE);
|
||||
}
|
||||
|
||||
public static DomainApplication newDomainApplication(String domainName, ContactResource contact) {
|
||||
return newDomainApplication(domainName, contact, LaunchPhase.SUNRISE);
|
||||
}
|
||||
|
||||
public static DomainApplication newDomainApplication(
|
||||
String domainName, ContactResource contact, LaunchPhase phase) {
|
||||
return newDomainApplication(
|
||||
domainName,
|
||||
generateNewDomainRoid(getTldFromDomainName(domainName)),
|
||||
contact,
|
||||
phase);
|
||||
}
|
||||
|
||||
public static DomainApplication newDomainApplication(
|
||||
String domainName, String repoId, ContactResource contact, LaunchPhase phase) {
|
||||
Key<ContactResource> contactKey = Key.create(contact);
|
||||
return new DomainApplication.Builder()
|
||||
.setRepoId(repoId)
|
||||
.setFullyQualifiedDomainName(domainName)
|
||||
.setPersistedCurrentSponsorClientId("TheRegistrar")
|
||||
.setAuthInfo(DomainAuthInfo.create(PasswordAuth.create("2fooBAR")))
|
||||
.setRegistrant(contactKey)
|
||||
.setContacts(ImmutableSet.of(
|
||||
DesignatedContact.create(Type.ADMIN, contactKey),
|
||||
DesignatedContact.create(Type.TECH, contactKey)))
|
||||
.setPhase(phase)
|
||||
.setApplicationStatus(VALIDATED)
|
||||
.addStatusValue(StatusValue.PENDING_CREATE)
|
||||
.build();
|
||||
}
|
||||
|
||||
public static DomainApplication newSunriseApplication(String domainName) {
|
||||
return newSunriseApplication(domainName, persistActiveContact("contact1234"));
|
||||
}
|
||||
|
||||
public static DomainApplication newSunriseApplication(
|
||||
String domainName, ContactResource contact) {
|
||||
return newDomainApplication(domainName, contact, LaunchPhase.SUNRISE)
|
||||
.asBuilder()
|
||||
.setEncodedSignedMarks(ImmutableList.of(EncodedSignedMark.create("base64", "abcdef")))
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a newly created {@link ContactResource} for the given contactId (which is the foreign
|
||||
* key) with an auto-generated repoId.
|
||||
|
@ -327,25 +269,6 @@ public class DatastoreHelper {
|
|||
.build());
|
||||
}
|
||||
|
||||
public static DomainApplication persistActiveDomainApplication(String domainName) {
|
||||
return persistResource(newDomainApplication(domainName));
|
||||
}
|
||||
|
||||
public static DomainApplication persistActiveDomainApplication(
|
||||
String domainName, ContactResource contact, LaunchPhase phase) {
|
||||
return persistResource(newDomainApplication(domainName, contact, phase));
|
||||
}
|
||||
|
||||
/**
|
||||
* Persists a domain application resource with the given domain name deleted at the specified
|
||||
* time.
|
||||
*/
|
||||
public static DomainApplication persistDeletedDomainApplication(
|
||||
String domainName, DateTime deletionTime) {
|
||||
return persistResource(
|
||||
newDomainApplication(domainName).asBuilder().setDeletionTime(deletionTime).build());
|
||||
}
|
||||
|
||||
/** Persists a domain resource with the given domain name deleted at the specified time. */
|
||||
public static DomainResource persistDeletedDomain(String domainName, DateTime deletionTime) {
|
||||
return persistDomainAsDeleted(newDomainResource(domainName), deletionTime);
|
||||
|
@ -901,7 +824,7 @@ public class DatastoreHelper {
|
|||
* ofy() session cache. Specifically, this method calls .now() on the save to force the write to
|
||||
* actually get sent to Datastore (although it does not force it to be applied) and clears the
|
||||
* session cache. If necessary, this method also updates the relevant {@link EppResourceIndex},
|
||||
* {@link ForeignKeyIndex} and {@link DomainApplicationIndex}.
|
||||
* {@link ForeignKeyIndex}.
|
||||
*
|
||||
* <p><b>Note:</b> Your resource will not be enrolled in a commit log. If you want backups, use
|
||||
* {@link #persistResourceWithCommitLog(Object)}.
|
||||
|
@ -934,9 +857,6 @@ public class DatastoreHelper {
|
|||
if (resource instanceof ForeignKeyedEppResource) {
|
||||
saver.entity(ForeignKeyIndex.create(resource, resource.getDeletionTime()));
|
||||
}
|
||||
if (resource instanceof DomainApplication) {
|
||||
saver.entity(DomainApplicationIndex.createUpdatedInstance((DomainApplication) resource));
|
||||
}
|
||||
}
|
||||
|
||||
private static <R> R persistResource(final R resource, final boolean wantBackup) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue