Support datastore restore in Nomulus tool

Two commands are being added:
- ImportDatastoreCommand starts an async import operation.
  User may choose to wait until import completes or quit
  immediately.
- GetOperationStatusCommand checks the status of an operation.
  It may be used to check the status of an operation started by
  ImportDatastoreCommand.

Both commands communicate with Datastore admin api directly, without
going through the Registry server.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=228400059
This commit is contained in:
weiminyu 2019-01-08 14:28:29 -08:00 committed by Ben McIlwain
parent 3078efdaac
commit 4e71421c81
13 changed files with 477 additions and 14 deletions

View file

@ -22,6 +22,7 @@ import google.registry.config.RegistryConfig.ConfigModule;
import google.registry.dns.writer.VoidDnsWriterModule;
import google.registry.dns.writer.clouddns.CloudDnsWriterModule;
import google.registry.dns.writer.dnsupdate.DnsUpdateWriterModule;
import google.registry.export.datastore.DatastoreAdminModule;
import google.registry.keyring.KeyringModule;
import google.registry.keyring.api.DummyKeyringModule;
import google.registry.keyring.api.KeyModule;
@ -56,6 +57,7 @@ import javax.inject.Singleton;
BigqueryModule.class,
ConfigModule.class,
CloudDnsWriterModule.class,
DatastoreAdminModule.class,
DatastoreServiceModule.class,
DummyKeyringModule.class,
DnsUpdateWriterModule.class,
@ -92,7 +94,9 @@ interface RegistryToolComponent {
void inject(GenerateDnsReportCommand command);
void inject(GenerateEscrowDepositCommand command);
void inject(GetKeyringSecretCommand command);
void inject(GetOperationStatusCommand command);
void inject(GhostrydeCommand command);
void inject(ImportDatastoreCommand command);
void inject(ListCursorsCommand command);
void inject(LoadSnapshotCommand command);
void inject(LockDomainCommand command);