mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Add flag to delete domain immediately in nomulus too
We've already had the need to do this on a few occasions, so it's best to make it easy rather than requiring hand-generated XML all the time. Also normalizes the boolean --registrar_request parameter to not have arity=1. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=198093829
This commit is contained in:
parent
373b4feeb1
commit
674a914afc
4 changed files with 51 additions and 13 deletions
|
@ -35,6 +35,11 @@ final class DeleteDomainCommand extends MutatingEppToolCommand {
|
|||
required = true)
|
||||
private String domainName;
|
||||
|
||||
@Parameter(
|
||||
names = {"--immediately"},
|
||||
description = "Whether to bypass grace periods and delete the domain immediately.")
|
||||
private boolean immediately = false;
|
||||
|
||||
@Parameter(
|
||||
names = {"--reason"},
|
||||
description = "Reason for the change.",
|
||||
|
@ -43,15 +48,19 @@ final class DeleteDomainCommand extends MutatingEppToolCommand {
|
|||
|
||||
@Parameter(
|
||||
names = {"--registrar_request"},
|
||||
description = "Whether the change was requested by a registrar.",
|
||||
arity = 1)
|
||||
description = "Whether the change was requested by a registrar.")
|
||||
private boolean requestedByRegistrar = false;
|
||||
|
||||
@Override
|
||||
protected void initMutatingEppToolCommand() {
|
||||
if (immediately) {
|
||||
// Immediate deletion is accomplished using the superuser extension.
|
||||
superuser = true;
|
||||
}
|
||||
setSoyTemplate(DeleteDomainSoyInfo.getInstance(), DeleteDomainSoyInfo.DELETEDOMAIN);
|
||||
addSoyRecord(clientId, new SoyMapData(
|
||||
"domainName", domainName,
|
||||
"immediately", immediately,
|
||||
"reason", reason,
|
||||
"requestedByRegistrar", requestedByRegistrar));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue