mirror of
https://github.com/google/nomulus.git
synced 2025-07-02 01:03:33 +02:00
Remove the deprecated MISTAKEN_PREMIUM reservation type
It doesn't do anything that ALLOWED_IN_SUNRISE doesn't do, and there's no point in having two separate types when we can simply keep track of the semantic difference between the two by using different lists (as we have for .soy). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=212997752
This commit is contained in:
parent
a9944b8ce0
commit
8ddbf88151
7 changed files with 12 additions and 21 deletions
|
@ -21,10 +21,7 @@ a price, it has a reservation type. The valid values for reservation types are:
|
||||||
reserved with this type can be registered.
|
reserved with this type can be registered.
|
||||||
* **`ALLOWED_IN_SUNRISE`** - The label can be registered during the sunrise
|
* **`ALLOWED_IN_SUNRISE`** - The label can be registered during the sunrise
|
||||||
period by a registrant with a valid claim but it is reserved thereafter.
|
period by a registrant with a valid claim but it is reserved thereafter.
|
||||||
* **`MISTAKEN_PREMIUM`** - The label is reserved because it was mistakenly put
|
* **`RESERVED_FOR_SPECIFIC_USE`** - The label is reserved for the use of a
|
||||||
on a premium list. It may be registered during sunrise by a registrant with
|
|
||||||
a valid claim but is reserved thereafter. This is deprecated.
|
|
||||||
* **RESERVED_FOR_SPECIFIC_USE** - The label is reserved for the use of a
|
|
||||||
specific registrant, and can only be registered by someone sending along the
|
specific registrant, and can only be registered by someone sending along the
|
||||||
allocation token at time of registration. This token is configured on an
|
allocation token at time of registration. This token is configured on an
|
||||||
`AllocationToken` entity with a matching `domainName`, and is sent by the
|
`AllocationToken` entity with a matching `domainName`, and is sent by the
|
||||||
|
|
|
@ -146,8 +146,7 @@ public class DomainFlowUtils {
|
||||||
public static final ImmutableSet<ReservationType> TYPES_ALLOWED_FOR_CREATE_ONLY_IN_SUNRISE =
|
public static final ImmutableSet<ReservationType> TYPES_ALLOWED_FOR_CREATE_ONLY_IN_SUNRISE =
|
||||||
Sets.immutableEnumSet(
|
Sets.immutableEnumSet(
|
||||||
ReservationType.ALLOWED_IN_SUNRISE,
|
ReservationType.ALLOWED_IN_SUNRISE,
|
||||||
ReservationType.NAME_COLLISION,
|
ReservationType.NAME_COLLISION);
|
||||||
ReservationType.MISTAKEN_PREMIUM);
|
|
||||||
|
|
||||||
/** Warning message for allocation of collision domains in sunrise. */
|
/** Warning message for allocation of collision domains in sunrise. */
|
||||||
public static final String COLLISION_MESSAGE =
|
public static final String COLLISION_MESSAGE =
|
||||||
|
|
|
@ -40,24 +40,20 @@ public enum ReservationType {
|
||||||
/** The domain can only be registered during sunrise, and is reserved thereafter. */
|
/** The domain can only be registered during sunrise, and is reserved thereafter. */
|
||||||
ALLOWED_IN_SUNRISE("Reserved for non-sunrise", 1),
|
ALLOWED_IN_SUNRISE("Reserved for non-sunrise", 1),
|
||||||
|
|
||||||
/** The domain can only be registered during sunrise, and is reserved thereafter. */
|
|
||||||
@Deprecated
|
|
||||||
MISTAKEN_PREMIUM("Reserved", 2),
|
|
||||||
|
|
||||||
/** The domain can only be registered by providing a specific token. */
|
/** The domain can only be registered by providing a specific token. */
|
||||||
RESERVED_FOR_SPECIFIC_USE("Reserved", 3),
|
RESERVED_FOR_SPECIFIC_USE("Reserved", 2),
|
||||||
|
|
||||||
/** The domain is for an anchor tenant and can only be registered using a specific token. */
|
/** The domain is for an anchor tenant and can only be registered using a specific token. */
|
||||||
RESERVED_FOR_ANCHOR_TENANT("Reserved", 4),
|
RESERVED_FOR_ANCHOR_TENANT("Reserved", 3),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The domain can only be registered during sunrise for defensive purposes, and will never
|
* The domain can only be registered during sunrise for defensive purposes, and will never
|
||||||
* resolve.
|
* resolve.
|
||||||
*/
|
*/
|
||||||
NAME_COLLISION("Cannot be delegated", 5),
|
NAME_COLLISION("Cannot be delegated", 4),
|
||||||
|
|
||||||
/** The domain can never be registered. */
|
/** The domain can never be registered. */
|
||||||
FULLY_BLOCKED("Reserved", 6);
|
FULLY_BLOCKED("Reserved", 5);
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private final String messageForCheck;
|
private final String messageForCheck;
|
||||||
|
|
|
@ -282,23 +282,23 @@ public class ReservedListTest {
|
||||||
ReservedList reservedList = persistReservedList(
|
ReservedList reservedList = persistReservedList(
|
||||||
"reserved",
|
"reserved",
|
||||||
"trombone,FULLY_BLOCKED # yup",
|
"trombone,FULLY_BLOCKED # yup",
|
||||||
"oysters,MISTAKEN_PREMIUM # this is a loooong comment",
|
"oysters,FULLY_BLOCKED # this is a loooong comment",
|
||||||
"nullcomment,ALLOWED_IN_SUNRISE #");
|
"nullcomment,ALLOWED_IN_SUNRISE #");
|
||||||
assertThat(reservedList.getReservedListEntries()).hasSize(3);
|
assertThat(reservedList.getReservedListEntries()).hasSize(3);
|
||||||
|
|
||||||
ReservedListEntry trombone = reservedList.getReservedListEntries().get("trombone");
|
ReservedListEntry trombone = reservedList.getReservedListEntries().get("trombone");
|
||||||
assertThat(trombone.label).isEqualTo("trombone");
|
assertThat(trombone.label).isEqualTo("trombone");
|
||||||
assertThat(trombone.reservationType).isEqualTo(ReservationType.FULLY_BLOCKED);
|
assertThat(trombone.reservationType).isEqualTo(FULLY_BLOCKED);
|
||||||
assertThat(trombone.comment).isEqualTo("yup");
|
assertThat(trombone.comment).isEqualTo("yup");
|
||||||
|
|
||||||
ReservedListEntry oysters = reservedList.getReservedListEntries().get("oysters");
|
ReservedListEntry oysters = reservedList.getReservedListEntries().get("oysters");
|
||||||
assertThat(oysters.label).isEqualTo("oysters");
|
assertThat(oysters.label).isEqualTo("oysters");
|
||||||
assertThat(oysters.reservationType).isEqualTo(ReservationType.MISTAKEN_PREMIUM);
|
assertThat(oysters.reservationType).isEqualTo(FULLY_BLOCKED);
|
||||||
assertThat(oysters.comment).isEqualTo("this is a loooong comment");
|
assertThat(oysters.comment).isEqualTo("this is a loooong comment");
|
||||||
|
|
||||||
ReservedListEntry nullComment = reservedList.getReservedListEntries().get("nullcomment");
|
ReservedListEntry nullComment = reservedList.getReservedListEntries().get("nullcomment");
|
||||||
assertThat(nullComment.label).isEqualTo("nullcomment");
|
assertThat(nullComment.label).isEqualTo("nullcomment");
|
||||||
assertThat(nullComment.reservationType).isEqualTo(ReservationType.ALLOWED_IN_SUNRISE);
|
assertThat(nullComment.reservationType).isEqualTo(ALLOWED_IN_SUNRISE);
|
||||||
assertThat(nullComment.comment).isEmpty();
|
assertThat(nullComment.comment).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -709,7 +709,6 @@ class google.registry.model.registry.label.PremiumList$PremiumListRevision {
|
||||||
enum google.registry.model.registry.label.ReservationType {
|
enum google.registry.model.registry.label.ReservationType {
|
||||||
ALLOWED_IN_SUNRISE;
|
ALLOWED_IN_SUNRISE;
|
||||||
FULLY_BLOCKED;
|
FULLY_BLOCKED;
|
||||||
MISTAKEN_PREMIUM;
|
|
||||||
NAMESERVER_RESTRICTED;
|
NAMESERVER_RESTRICTED;
|
||||||
NAME_COLLISION;
|
NAME_COLLISION;
|
||||||
RESERVED_FOR_ANCHOR_TENANT;
|
RESERVED_FOR_ANCHOR_TENANT;
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class CreateTldCommandTest extends CommandTestCase<CreateTldCommand> {
|
||||||
public void init() {
|
public void init() {
|
||||||
persistReservedList("common_abuse", "baa,FULLY_BLOCKED");
|
persistReservedList("common_abuse", "baa,FULLY_BLOCKED");
|
||||||
persistReservedList("xn--q9jyb4c_abuse", "lamb,FULLY_BLOCKED");
|
persistReservedList("xn--q9jyb4c_abuse", "lamb,FULLY_BLOCKED");
|
||||||
persistReservedList("tld_banned", "kilo,FULLY_BLOCKED", "lima,MISTAKEN_PREMIUM");
|
persistReservedList("tld_banned", "kilo,FULLY_BLOCKED", "lima,FULLY_BLOCKED");
|
||||||
persistReservedList("soy_expurgated", "fireflies,FULLY_BLOCKED");
|
persistReservedList("soy_expurgated", "fireflies,FULLY_BLOCKED");
|
||||||
persistPremiumList("xn--q9jyb4c", "minecraft,USD 1000");
|
persistPremiumList("xn--q9jyb4c", "minecraft,USD 1000");
|
||||||
command.validDnsWriterNames = ImmutableSet.of("VoidDnsWriter", "FooDnsWriter");
|
command.validDnsWriterNames = ImmutableSet.of("VoidDnsWriter", "FooDnsWriter");
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class UpdateTldCommandTest extends CommandTestCase<UpdateTldCommand> {
|
||||||
public void initTest() {
|
public void initTest() {
|
||||||
persistReservedList("common_abuse", "baa,FULLY_BLOCKED");
|
persistReservedList("common_abuse", "baa,FULLY_BLOCKED");
|
||||||
persistReservedList("xn--q9jyb4c_abuse", "lamb,FULLY_BLOCKED");
|
persistReservedList("xn--q9jyb4c_abuse", "lamb,FULLY_BLOCKED");
|
||||||
persistReservedList("tld_banned", "kilo,FULLY_BLOCKED", "lima,MISTAKEN_PREMIUM");
|
persistReservedList("tld_banned", "kilo,FULLY_BLOCKED", "lima,FULLY_BLOCKED");
|
||||||
persistReservedList("soy_expurgated", "fireflies,FULLY_BLOCKED");
|
persistReservedList("soy_expurgated", "fireflies,FULLY_BLOCKED");
|
||||||
persistPremiumList("xn--q9jyb4c", "minecraft,USD 1000");
|
persistPremiumList("xn--q9jyb4c", "minecraft,USD 1000");
|
||||||
persistReservedList("xn--q9jyb4c_r1", "foo,FULLY_BLOCKED");
|
persistReservedList("xn--q9jyb4c_r1", "foo,FULLY_BLOCKED");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue