google-nomulus/java/google/registry/tools/soy/DomainCreate.soy
mcilwain 7c0b8cab0b Add premium support to nomulus create_domain command
Premium prices are automatically detected and set, with an informational
message displayed to the user prior to executing the command.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199223541
2018-06-06 15:11:44 -04:00

82 lines
2.9 KiB
Text

// Copyright 2017 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
{namespace domain.registry.tools}
/**
* Create domain
*/
{template .domaincreate stricthtml="false"}
{@param domain: string}
{@param period: int}
{@param nameservers: list<string>}
{@param registrant: string}
{@param admins: list<string>}
{@param techs: list<string>}
{@param password: string}
{@param? currency: string}
{@param? price: string}
{@param dsRecords: list<[keyTag:int, alg:int, digestType:int, digest:string]>}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<create>
<domain:create xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>{$domain}</domain:name>
<domain:period unit="y">{$period}</domain:period>
{if length($nameservers) > 0}
<domain:ns>
{for $s in $nameservers}
<domain:hostObj>{$s}</domain:hostObj>
{/for}
</domain:ns>
{/if}
<domain:registrant>{$registrant}</domain:registrant>
{for $admin in $admins}
<domain:contact type="admin">{$admin}</domain:contact>
{/for}
{for $tech in $techs}
<domain:contact type="tech">{$tech}</domain:contact>
{/for}
<domain:authInfo>
<domain:pw>{$password}</domain:pw>
</domain:authInfo>
</domain:create>
</create>
{if length($dsRecords) > 0 or $price != null}
<extension>
{if $price != null}
<fee:create xmlns:fee="urn:ietf:params:xml:ns:fee-0.12">
<fee:currency>{$currency}</fee:currency>
<fee:fee>{$price}</fee:fee>
</fee:create>
{/if}
{if length($dsRecords) > 0}
<secDNS:create xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1">
{for $dsRecord in $dsRecords}
<secDNS:dsData>
<secDNS:keyTag>{$dsRecord.keyTag}</secDNS:keyTag>
<secDNS:alg>{$dsRecord.alg}</secDNS:alg>
<secDNS:digestType>{$dsRecord.digestType}</secDNS:digestType>
<secDNS:digest>{$dsRecord.digest}</secDNS:digest>
</secDNS:dsData>
{/for}
</secDNS:create>
{/if}
</extension>
{/if}
<clTRID>RegistryTool</clTRID>
</command>
</epp>
{/template}