Remove RoidSuffixes entirely

We no longer care about ROID suffix uniqueness in a post-Registry-2.0-migration
world, and the Registry cache is sufficient for efficiently grabbing the ROID
suffix for TLDs.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144483726
This commit is contained in:
mcilwain 2017-01-13 14:15:10 -08:00 committed by Ben McIlwain
parent 07010150b0
commit 8b61dcc6d0
6 changed files with 2 additions and 137 deletions

View file

@ -15,7 +15,6 @@
package google.registry.tools;
import static com.google.common.base.Preconditions.checkArgument;
import static google.registry.model.RoidSuffixes.isRoidSuffixUsed;
import static google.registry.util.CollectionUtils.findDuplicates;
import static google.registry.util.DomainNameUtils.canonicalizeDomainName;
@ -263,13 +262,6 @@ abstract class CreateOrUpdateTldCommand extends MutatingCommand {
!CharMatcher.javaDigit().matches(tld.charAt(0)),
"TLDs cannot begin with a number.");
Registry oldRegistry = getOldRegistry(tld);
if (roidSuffix != null) {
checkArgument(
!isRoidSuffixUsed(roidSuffix)
|| (oldRegistry != null && roidSuffix.equals(oldRegistry.getRoidSuffix())),
"The roid suffix %s is already in use",
roidSuffix);
}
// TODO(b/26901539): Add a flag to set the pricing engine once we have more than one option.
Registry.Builder builder =
oldRegistry == null