mirror of
https://github.com/google/nomulus.git
synced 2025-08-05 17:28:25 +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
|
@ -21,7 +21,6 @@ import static google.registry.testing.DatastoreHelper.newDomainResource;
|
|||
import static google.registry.testing.DatastoreHelper.newHostResource;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveContact;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveDomain;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveDomainApplication;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveHost;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.testing.GcsTestingUtils.readGcsFile;
|
||||
|
@ -101,14 +100,13 @@ public class GenerateZoneFilesActionTest extends MapreduceTestCase<GenerateZoneF
|
|||
.addNameservers(nameservers)
|
||||
.setStatusValues(ImmutableSet.of(StatusValue.SERVER_HOLD))
|
||||
.build());
|
||||
// These should be ignored; contact and applications aren't in DNS, hosts need to be from the
|
||||
// same tld and have ip addresses, and domains need to be from the same tld and have hosts (even
|
||||
// in the case where domains contain DS data).
|
||||
// These should be ignored; contacts aren't in DNS, hosts need to be from the same tld and have
|
||||
// IP addresses, and domains need to be from the same TLD and have hosts (even in the case where
|
||||
// domains contain DS data).
|
||||
persistResource(newDomainResource("ds-only.tld").asBuilder()
|
||||
.setDsData(ImmutableSet.of(DelegationSignerData.create(1, 2, 3, new byte[] {0, 1, 2})))
|
||||
.build());
|
||||
persistActiveContact("ignored_contact");
|
||||
persistActiveDomainApplication("ignored_application.tld");
|
||||
persistActiveHost("ignored.host.tld"); // No ips.
|
||||
persistActiveDomain("ignored_domain.tld"); // No hosts or DS data.
|
||||
persistResource(newHostResource("ignored.foo.com").asBuilder().addInetAddresses(ips).build());
|
||||
|
|
|
@ -1,117 +0,0 @@
|
|||
// Copyright 2019 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.tools.server;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.createTlds;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveContact;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveDomain;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveDomainApplication;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveHost;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
|
||||
import com.googlecode.objectify.Key;
|
||||
import google.registry.model.contact.ContactResource;
|
||||
import google.registry.model.domain.DomainApplication;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.host.HostResource;
|
||||
import google.registry.model.index.DomainApplicationIndex;
|
||||
import google.registry.model.index.EppResourceIndex;
|
||||
import google.registry.model.index.ForeignKeyIndex;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
import google.registry.testing.FakeResponse;
|
||||
import google.registry.testing.mapreduce.MapreduceTestCase;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
/** Tests for {@link KillAllDomainApplicationsAction}. */
|
||||
@RunWith(JUnit4.class)
|
||||
public class KillAllDomainApplicationsActionTest
|
||||
extends MapreduceTestCase<KillAllDomainApplicationsAction> {
|
||||
|
||||
private void runMapreduce() throws Exception {
|
||||
action = new KillAllDomainApplicationsAction();
|
||||
action.mrRunner = makeDefaultRunner();
|
||||
action.response = new FakeResponse();
|
||||
action.run();
|
||||
executeTasksUntilEmpty("mapreduce");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_deletesOnlyApplicationsAndAssociatedEntities() throws Exception {
|
||||
createTlds("tld1", "tld2");
|
||||
|
||||
DomainResource domain = persistActiveDomain("foo1.tld1");
|
||||
EppResourceIndex domainEri =
|
||||
ofy().load().entity(EppResourceIndex.create(Key.create(domain))).now();
|
||||
ForeignKeyIndex<DomainResource> domainFki =
|
||||
ofy().load().key(ForeignKeyIndex.createKey(domain)).now();
|
||||
HistoryEntry domainHistoryEntry =
|
||||
persistResource(new HistoryEntry.Builder().setParent(domain).build());
|
||||
|
||||
DomainApplication application = persistActiveDomainApplication("foo2.tld1");
|
||||
EppResourceIndex applicationEri =
|
||||
ofy().load().entity(EppResourceIndex.create(Key.create(application))).now();
|
||||
DomainApplicationIndex applicationDai =
|
||||
ofy().load().key(DomainApplicationIndex.createKey(application)).now();
|
||||
HistoryEntry applicationHistoryEntry =
|
||||
persistResource(new HistoryEntry.Builder().setParent(application).build());
|
||||
|
||||
ContactResource contact = persistActiveContact("foo");
|
||||
HostResource host = persistActiveHost("ns.foo.tld1");
|
||||
|
||||
runMapreduce();
|
||||
ofy().clearSessionCache();
|
||||
|
||||
// Check that none of the domain, contact, and host entities were deleted.
|
||||
assertThat(
|
||||
ofy()
|
||||
.load()
|
||||
.entities(domain, domainEri, domainFki, domainHistoryEntry, contact, host)
|
||||
.values())
|
||||
.containsExactly(domain, domainEri, domainFki, domainHistoryEntry, contact, host);
|
||||
// Check that all of the domain application entities were deleted.
|
||||
assertThat(
|
||||
ofy()
|
||||
.load()
|
||||
.entities(application, applicationEri, applicationDai, applicationHistoryEntry))
|
||||
.isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_deletesApplication_evenWhenIndexIsMissing() throws Exception {
|
||||
createTld("tld1");
|
||||
DomainApplication application = persistActiveDomainApplication("applied.tld1");
|
||||
EppResourceIndex applicationEri =
|
||||
ofy().load().entity(EppResourceIndex.create(Key.create(application))).now();
|
||||
HistoryEntry applicationHistoryEntry =
|
||||
persistResource(new HistoryEntry.Builder().setParent(application).build());
|
||||
|
||||
// Delete the domain application index.
|
||||
ofy().transact(() -> ofy().delete().key(DomainApplicationIndex.createKey(application)).now());
|
||||
ofy().clearSessionCache();
|
||||
|
||||
runMapreduce();
|
||||
ofy().clearSessionCache();
|
||||
|
||||
// Check that the domain application and history entry were deleted even though the indexes
|
||||
// couldn't be found.
|
||||
assertThat(ofy().load().entities(application, applicationEri, applicationHistoryEntry))
|
||||
.isEmpty();
|
||||
}
|
||||
}
|
|
@ -25,7 +25,6 @@ import static google.registry.model.ofy.ObjectifyService.ofy;
|
|||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveContact;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveDomain;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveDomainApplication;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveHost;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.util.DateTimeUtils.START_OF_TIME;
|
||||
|
@ -43,7 +42,6 @@ import google.registry.model.billing.BillingEvent.Reason;
|
|||
import google.registry.model.contact.ContactResource;
|
||||
import google.registry.model.domain.DomainBase;
|
||||
import google.registry.model.host.HostResource;
|
||||
import google.registry.model.index.DomainApplicationIndex;
|
||||
import google.registry.model.index.EppResourceIndex;
|
||||
import google.registry.model.index.ForeignKeyIndex.ForeignKeyContactIndex;
|
||||
import google.registry.model.index.ForeignKeyIndex.ForeignKeyDomainIndex;
|
||||
|
@ -69,7 +67,6 @@ public class KillAllEppResourcesActionTest extends MapreduceTestCase<KillAllEppR
|
|||
ForeignKeyContactIndex.class,
|
||||
ForeignKeyDomainIndex.class,
|
||||
ForeignKeyHostIndex.class,
|
||||
DomainApplicationIndex.class,
|
||||
DomainBase.class,
|
||||
ContactResource.class,
|
||||
HostResource.class,
|
||||
|
@ -95,8 +92,6 @@ public class KillAllEppResourcesActionTest extends MapreduceTestCase<KillAllEppR
|
|||
for (EppResource resource : asList(
|
||||
persistActiveDomain("foo.tld1"),
|
||||
persistActiveDomain("foo.tld2"),
|
||||
persistActiveDomainApplication("foo.tld1"),
|
||||
persistActiveDomainApplication("foo.tld2"),
|
||||
persistActiveContact("foo"),
|
||||
persistActiveContact("foo"),
|
||||
persistActiveHost("ns.foo.tld1"),
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<create>
|
||||
<domain:create xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example-one.tld</domain:name>
|
||||
<domain:period unit="y">3</domain:period>
|
||||
<domain:ns>
|
||||
<domain:hostObj>ns1.example.com</domain:hostObj>
|
||||
<domain:hostObj>ns2.example.com</domain:hostObj>
|
||||
</domain:ns>
|
||||
<domain:registrant>registrant</domain:registrant>
|
||||
<domain:contact type="billing">billingContact</domain:contact>
|
||||
<domain:contact type="admin">adminContact</domain:contact>
|
||||
<domain:contact type="tech">techContact</domain:contact>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:create>
|
||||
</create>
|
||||
<extension>
|
||||
<allocate:create xmlns:allocate="urn:google:params:xml:ns:allocate-1.0">
|
||||
<allocate:applicationRoid>1-TLD</allocate:applicationRoid>
|
||||
<allocate:applicationTime>1970-01-01T00:00:00.000Z</allocate:applicationTime>
|
||||
<allocate:notice xmlns:launch="urn:ietf:params:xml:ns:launch-1.0">
|
||||
<launch:noticeID>370d0b7c9223372036854775807</launch:noticeID>
|
||||
<launch:notAfter>2010-08-16T09:00:00.000Z</launch:notAfter>
|
||||
<launch:acceptedDate>2009-08-16T09:00:00.000Z</launch:acceptedDate>
|
||||
</allocate:notice>
|
||||
</allocate:create>
|
||||
<secDNS:create xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1">
|
||||
<secDNS:dsData>
|
||||
<secDNS:keyTag>56789</secDNS:keyTag>
|
||||
<secDNS:alg>2</secDNS:alg>
|
||||
<secDNS:digestType>4</secDNS:digestType>
|
||||
<secDNS:digest>69FD46E6C4A45C55D4AC</secDNS:digest>
|
||||
</secDNS:dsData>
|
||||
<secDNS:dsData>
|
||||
<secDNS:keyTag>12345</secDNS:keyTag>
|
||||
<secDNS:alg>3</secDNS:alg>
|
||||
<secDNS:digestType>1</secDNS:digestType>
|
||||
<secDNS:digest>49FD46E6C4B45C55D4AC</secDNS:digest>
|
||||
</secDNS:dsData>
|
||||
</secDNS:create>
|
||||
</extension>
|
||||
<clTRID>ABC-123</clTRID>
|
||||
</command>
|
||||
</epp>
|
|
@ -1,48 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<create>
|
||||
<domain:create xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example-two.tld</domain:name>
|
||||
<domain:period unit="y">3</domain:period>
|
||||
<domain:ns>
|
||||
<domain:hostObj>ns1.example.com</domain:hostObj>
|
||||
<domain:hostObj>ns2.example.com</domain:hostObj>
|
||||
</domain:ns>
|
||||
<domain:registrant>registrant</domain:registrant>
|
||||
<domain:contact type="billing">billingContact</domain:contact>
|
||||
<domain:contact type="admin">adminContact</domain:contact>
|
||||
<domain:contact type="tech">techContact</domain:contact>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:create>
|
||||
</create>
|
||||
<extension>
|
||||
<allocate:create xmlns:allocate="urn:google:params:xml:ns:allocate-1.0">
|
||||
<allocate:applicationRoid>2-TLD</allocate:applicationRoid>
|
||||
<allocate:applicationTime>1970-01-01T00:00:00.000Z</allocate:applicationTime>
|
||||
<allocate:notice xmlns:launch="urn:ietf:params:xml:ns:launch-1.0">
|
||||
<launch:noticeID>370d0b7c9223372036854775807</launch:noticeID>
|
||||
<launch:notAfter>2010-08-16T09:00:00.000Z</launch:notAfter>
|
||||
<launch:acceptedDate>2009-08-16T09:00:00.000Z</launch:acceptedDate>
|
||||
</allocate:notice>
|
||||
</allocate:create>
|
||||
<secDNS:create xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1">
|
||||
<secDNS:dsData>
|
||||
<secDNS:keyTag>56789</secDNS:keyTag>
|
||||
<secDNS:alg>2</secDNS:alg>
|
||||
<secDNS:digestType>4</secDNS:digestType>
|
||||
<secDNS:digest>69FD46E6C4A45C55D4AC</secDNS:digest>
|
||||
</secDNS:dsData>
|
||||
<secDNS:dsData>
|
||||
<secDNS:keyTag>12345</secDNS:keyTag>
|
||||
<secDNS:alg>3</secDNS:alg>
|
||||
<secDNS:digestType>1</secDNS:digestType>
|
||||
<secDNS:digest>49FD46E6C4B45C55D4AC</secDNS:digest>
|
||||
</secDNS:dsData>
|
||||
</secDNS:create>
|
||||
</extension>
|
||||
<clTRID>ABC-123</clTRID>
|
||||
</command>
|
||||
</epp>
|
|
@ -1,29 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<create>
|
||||
<domain:create
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example-one.tld</domain:name>
|
||||
<domain:period unit="y">3</domain:period>
|
||||
<domain:ns>
|
||||
<domain:hostObj>ns1.example.com</domain:hostObj>
|
||||
<domain:hostObj>ns2.example.com</domain:hostObj>
|
||||
</domain:ns>
|
||||
<domain:registrant>jd1234</domain:registrant>
|
||||
<domain:contact type="admin">sh8013</domain:contact>
|
||||
<domain:contact type="tech">sh8013</domain:contact>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:create>
|
||||
</create>
|
||||
<extension>
|
||||
<launch:create
|
||||
xmlns:launch="urn:ietf:params:xml:ns:launch-1.0">
|
||||
<launch:phase name="landrush">sunrise</launch:phase>
|
||||
</launch:create>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
|
@ -1,29 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<create>
|
||||
<domain:create
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example-two.tld</domain:name>
|
||||
<domain:period unit="y">3</domain:period>
|
||||
<domain:ns>
|
||||
<domain:hostObj>ns1.example.com</domain:hostObj>
|
||||
<domain:hostObj>ns2.example.com</domain:hostObj>
|
||||
</domain:ns>
|
||||
<domain:registrant>jd1234</domain:registrant>
|
||||
<domain:contact type="admin">sh8013</domain:contact>
|
||||
<domain:contact type="tech">sh8013</domain:contact>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:create>
|
||||
</create>
|
||||
<extension>
|
||||
<launch:create
|
||||
xmlns:launch="urn:ietf:params:xml:ns:launch-1.0">
|
||||
<launch:phase name="landrush">sunrise</launch:phase>
|
||||
</launch:create>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<info>
|
||||
<domain:info
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.tld</domain:name>
|
||||
</domain:info>
|
||||
</info>
|
||||
<extension>
|
||||
<launch:info
|
||||
xmlns:launch="urn:ietf:params:xml:ns:launch-1.0">
|
||||
<launch:phase>landrush</launch:phase>
|
||||
<launch:applicationID>123</launch:applicationID>
|
||||
</launch:info>
|
||||
</extension>
|
||||
<clTRID>RegistryTool</clTRID>
|
||||
</command>
|
||||
</epp>
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<info>
|
||||
<domain:info
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.tld</domain:name>
|
||||
</domain:info>
|
||||
</info>
|
||||
<extension>
|
||||
<launch:info
|
||||
xmlns:launch="urn:ietf:params:xml:ns:launch-1.0">
|
||||
<launch:phase name="landrush">sunrise</launch:phase>
|
||||
<launch:applicationID>123</launch:applicationID>
|
||||
</launch:info>
|
||||
</extension>
|
||||
<clTRID>RegistryTool</clTRID>
|
||||
</command>
|
||||
</epp>
|
Loading…
Add table
Add a link
Reference in a new issue