Add registrar contact to OTE registrars

When creating the various registrar objects in Sandbox for OTE, we also give access to all the registrars' data to a given google account (identified by the email)

This email has to belong to the registry's G-Suite account, just like in the registrar_contact command.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217728407
This commit is contained in:
guyben
2018-10-22 18:58:06 -04:00
committed by jianglai
parent bc2c0350d7
commit 0f1f418034
3 changed files with 146 additions and 14 deletions
@@ -57,19 +57,19 @@ final class RegistrarContactCommand extends MutatingCommand {
@Parameter(
description = "Client identifier of the registrar account.",
required = true)
private List<String> mainParameters;
List<String> mainParameters;
@Parameter(
names = "--mode",
description = "Type of operation you want to perform (LIST, CREATE, UPDATE, or DELETE).",
required = true)
private Mode mode;
Mode mode;
@Nullable
@Parameter(
names = "--name",
description = "Contact name.")
private String name;
String name;
@Nullable
@Parameter(
@@ -82,7 +82,7 @@ final class RegistrarContactCommand extends MutatingCommand {
@Parameter(
names = "--email",
description = "Contact email address.")
private String email;
String email;
@Nullable
@Parameter(
@@ -105,7 +105,7 @@ final class RegistrarContactCommand extends MutatingCommand {
names = "--allow_console_access",
description = "Enable or disable access to the registrar console for this contact.",
arity = 1)
private Boolean allowConsoleAccess;
Boolean allowConsoleAccess;
@Nullable
@Parameter(
@@ -138,7 +138,7 @@ final class RegistrarContactCommand extends MutatingCommand {
validateWith = PathParameter.OutputFile.class)
private Path output = Paths.get("/dev/stdout");
private enum Mode { LIST, CREATE, UPDATE, DELETE }
enum Mode { LIST, CREATE, UPDATE, DELETE }
private static final ImmutableSet<Mode> MODES_REQUIRING_CONTACT_SYNC =
ImmutableSet.of(Mode.CREATE, Mode.UPDATE, Mode.DELETE);