Add autorenews to URS (#1343)

* Add autorenews to URS

* Add autorenews to existing xml files for test cases
This commit is contained in:
Rachel Guan
2021-10-01 19:11:46 -04:00
committed by GitHub
parent f7938e80f7
commit 65ef18052b
9 changed files with 56 additions and 1 deletions
@@ -157,7 +157,12 @@ final class UniformRapidSuspensionCommand extends MutatingEppToolCommand {
"newDsData",
newDsData != null ? DsRecord.convertToSoy(newDsData) : new SoyListData(),
"reason",
(undo ? "Undo " : "") + "Uniform Rapid Suspension"));
(undo ? "Undo " : "") + "Uniform Rapid Suspension",
// Domain auto-renewal is disabled as part of URS, and it's re-enabled if URS is undone.
// Therefore, autorenews is set to false by default and it's set to true only if the
// command is run in --undo mode.
"autorenews",
Boolean.toString(undo)));
}
private ImmutableSortedSet<String> getExistingNameservers(DomainBase domain) {
@@ -25,6 +25,7 @@
{@param statusesToRemove: list<string>}
{@param newDsData: list<[keyTag:int, alg:int, digestType:int, digest:string]>}
{@param reason: string}
{@param autorenews: string}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
@@ -75,6 +76,9 @@
</secDNS:add>
{/if}
</secDNS:update>
<superuser:domainUpdate xmlns:superuser="urn:google:params:xml:ns:superuser-1.0">
<superuser:autorenews>{$autorenews}</superuser:autorenews>
</superuser:domainUpdate>
<metadata:metadata xmlns:metadata="urn:google:params:xml:ns:metadata-1.0">
<metadata:reason>{$reason}</metadata:reason>
<metadata:requestedByRegistrar>false</metadata:requestedByRegistrar>