mirror of
https://github.com/google/nomulus
synced 2026-09-20 06:54:43 +00:00
Allow usage of allocation tokens in nomulus create_domain (#1756)
Useful when doing internal registrations like get.boo
This commit is contained in:
@@ -46,6 +46,11 @@ final class CreateDomainCommand extends CreateOrUpdateDomainCommand
|
||||
description = "Force the creation of premium domains.")
|
||||
private boolean forcePremiums;
|
||||
|
||||
@Parameter(
|
||||
names = "--allocation_token",
|
||||
description = "Allocation token to use when creating the domain(s)")
|
||||
private String allocationToken;
|
||||
|
||||
@Inject
|
||||
@Named("base64StringGenerator")
|
||||
StringGenerator passwordGenerator;
|
||||
@@ -92,7 +97,8 @@ final class CreateDomainCommand extends CreateOrUpdateDomainCommand
|
||||
"currency", currency,
|
||||
"price", cost,
|
||||
"dsRecords", DsRecord.convertToSoy(dsRecords),
|
||||
"reason", reason);
|
||||
"reason", reason,
|
||||
"allocationToken", allocationToken);
|
||||
if (requestedByRegistrar != null) {
|
||||
soyMapData.put("requestedByRegistrar", requestedByRegistrar.toString());
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
{@param dsRecords: list<[keyTag:int, alg:int, digestType:int, digest:string]>}
|
||||
{@param? reason: string}
|
||||
{@param? requestedByRegistrar: string}
|
||||
{@param? allocationToken: string}
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
@@ -56,7 +57,7 @@
|
||||
</domain:authInfo>
|
||||
</domain:create>
|
||||
</create>
|
||||
{if length($dsRecords) > 0 or $price != null or $reason or $requestedByRegistrar}
|
||||
{if length($dsRecords) > 0 or $price != null or $reason or $requestedByRegistrar or $allocationToken}
|
||||
<extension>
|
||||
{if $price != null}
|
||||
<fee:create xmlns:fee="urn:ietf:params:xml:ns:fee-0.12">
|
||||
@@ -86,6 +87,13 @@
|
||||
{/if}
|
||||
</metadata:metadata>
|
||||
{/if}
|
||||
{if $allocationToken}
|
||||
<allocationToken:allocationToken
|
||||
xmlns:allocationToken=
|
||||
"urn:ietf:params:xml:ns:allocationToken-1.0">
|
||||
{$allocationToken}
|
||||
</allocationToken:allocationToken>
|
||||
{/if}
|
||||
</extension>
|
||||
{/if}
|
||||
<clTRID>RegistryTool</clTRID>
|
||||
|
||||
Reference in New Issue
Block a user