Add a scrap command to re-save all allocation token entities

This will populate the token type to be SINGLE_USE for existing tokens that
don't have a type.

Modeled after the ResaveEntitiesCommand, but modified so that we load all AllocationTokens (rather than having to provide a list of entity IDs on the command line)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246572756
This commit is contained in:
gbrodman 2019-05-03 14:22:33 -07:00 committed by jianglai
parent 251ec1ed32
commit c9ee5c3fb3
2 changed files with 45 additions and 0 deletions

View file

@ -17,6 +17,7 @@ package google.registry.tools;
import com.google.common.collect.ImmutableMap;
import google.registry.tools.javascrap.PopulateNullRegistrarFieldsCommand;
import google.registry.tools.javascrap.RemoveIpAddressCommand;
import google.registry.tools.javascrap.ResaveAllocationTokensCommand;
/** Container class to create and run remote commands against a Datastore instance. */
public final class RegistryTool {
@ -96,6 +97,7 @@ public final class RegistryTool {
.put("registrar_contact", RegistrarContactCommand.class)
.put("remove_ip_address", RemoveIpAddressCommand.class)
.put("renew_domain", RenewDomainCommand.class)
.put("resave_allocation_tokens", ResaveAllocationTokensCommand.class)
.put("resave_entities", ResaveEntitiesCommand.class)
.put("resave_environment_entities", ResaveEnvironmentEntitiesCommand.class)
.put("resave_epp_resource", ResaveEppResourceCommand.class)