mirror of
https://github.com/google/nomulus.git
synced 2025-05-22 04:09:46 +02:00
Remove 'fullyQualified' from host and domain names (#631)
* Remove 'fullyQualified' from host and domain names We don't actually enforce that these are properly fully-qualified (there's no dot at the end) and we specifically use the term "label name" when talking about labels. Note: this doesn't convert FQDN -> DN (et al) in at least two types of cases: 1. When the term is part of the XML schema 2. When the term is used by some external system, e.g. SafeBrowsing API * Add TODO to rename fields
This commit is contained in:
parent
d19ed3ed09
commit
0820b672bb
87 changed files with 245 additions and 228 deletions
|
@ -426,7 +426,7 @@ public class DeleteContactsAndHostsAction implements Runnable {
|
||||||
if (resource instanceof HostResource) {
|
if (resource instanceof HostResource) {
|
||||||
return ImmutableList.of(
|
return ImmutableList.of(
|
||||||
HostPendingActionNotificationResponse.create(
|
HostPendingActionNotificationResponse.create(
|
||||||
((HostResource) resource).getFullyQualifiedHostName(), deleteAllowed, trid, now));
|
((HostResource) resource).getHostName(), deleteAllowed, trid, now));
|
||||||
} else if (resource instanceof ContactResource) {
|
} else if (resource instanceof ContactResource) {
|
||||||
return ImmutableList.of(
|
return ImmutableList.of(
|
||||||
ContactPendingActionNotificationResponse.create(
|
ContactPendingActionNotificationResponse.create(
|
||||||
|
@ -465,11 +465,11 @@ public class DeleteContactsAndHostsAction implements Runnable {
|
||||||
} else if (existingResource instanceof HostResource) {
|
} else if (existingResource instanceof HostResource) {
|
||||||
HostResource host = (HostResource) existingResource;
|
HostResource host = (HostResource) existingResource;
|
||||||
if (host.isSubordinate()) {
|
if (host.isSubordinate()) {
|
||||||
dnsQueue.addHostRefreshTask(host.getFullyQualifiedHostName());
|
dnsQueue.addHostRefreshTask(host.getHostName());
|
||||||
tm().saveNewOrUpdate(
|
tm().saveNewOrUpdate(
|
||||||
tm().load(host.getSuperordinateDomain())
|
tm().load(host.getSuperordinateDomain())
|
||||||
.asBuilder()
|
.asBuilder()
|
||||||
.removeSubordinateHost(host.getFullyQualifiedHostName())
|
.removeSubordinateHost(host.getHostName())
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -177,7 +177,7 @@ public class DeleteProberDataAction implements Runnable {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String domainName = domain.getFullyQualifiedDomainName();
|
String domainName = domain.getDomainName();
|
||||||
if (domainName.equals("nic." + domain.getTld())) {
|
if (domainName.equals("nic." + domain.getTld())) {
|
||||||
getContext().incrementCounter("skipped, NIC domain");
|
getContext().incrementCounter("skipped, NIC domain");
|
||||||
return;
|
return;
|
||||||
|
@ -265,7 +265,7 @@ public class DeleteProberDataAction implements Runnable {
|
||||||
// mapreduce runs anyway.
|
// mapreduce runs anyway.
|
||||||
ofy().save().entities(deletedDomain, historyEntry);
|
ofy().save().entities(deletedDomain, historyEntry);
|
||||||
updateForeignKeyIndexDeletionTime(deletedDomain);
|
updateForeignKeyIndexDeletionTime(deletedDomain);
|
||||||
dnsQueue.addDomainRefreshTask(deletedDomain.getFullyQualifiedDomainName());
|
dnsQueue.addDomainRefreshTask(deletedDomain.getDomainName());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,11 +216,11 @@ public class RefreshDnsOnHostRenameAction implements Runnable {
|
||||||
}
|
}
|
||||||
if (referencingHostKey != null) {
|
if (referencingHostKey != null) {
|
||||||
retrier.callWithRetry(
|
retrier.callWithRetry(
|
||||||
() -> dnsQueue.addDomainRefreshTask(domain.getFullyQualifiedDomainName()),
|
() -> dnsQueue.addDomainRefreshTask(domain.getDomainName()),
|
||||||
TransientFailureException.class);
|
TransientFailureException.class);
|
||||||
logger.atInfo().log(
|
logger.atInfo().log(
|
||||||
"Enqueued DNS refresh for domain %s referenced by host %s.",
|
"Enqueued DNS refresh for domain %s referenced by host %s.",
|
||||||
domain.getFullyQualifiedDomainName(), referencingHostKey);
|
domain.getDomainName(), referencingHostKey);
|
||||||
getContext().incrementCounter("domains refreshed");
|
getContext().incrementCounter("domains refreshed");
|
||||||
} else {
|
} else {
|
||||||
getContext().incrementCounter("domains not refreshed");
|
getContext().incrementCounter("domains not refreshed");
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class RelockDomainAction implements Runnable {
|
||||||
String message =
|
String message =
|
||||||
String.format(
|
String.format(
|
||||||
"Domain %s is already manually relocked, skipping automated relock.",
|
"Domain %s is already manually relocked, skipping automated relock.",
|
||||||
domain.getFullyQualifiedDomainName());
|
domain.getDomainName());
|
||||||
logger.atInfo().log(message);
|
logger.atInfo().log(message);
|
||||||
// SC_NO_CONTENT (204) skips retry -- see the comment below
|
// SC_NO_CONTENT (204) skips retry -- see the comment below
|
||||||
response.setStatus(SC_NO_CONTENT);
|
response.setStatus(SC_NO_CONTENT);
|
||||||
|
@ -144,7 +144,7 @@ public class RelockDomainAction implements Runnable {
|
||||||
|
|
||||||
private void verifyDomainAndLockState(RegistryLock oldLock, DomainBase domain) {
|
private void verifyDomainAndLockState(RegistryLock oldLock, DomainBase domain) {
|
||||||
// Domain shouldn't be deleted or have a pending transfer/delete
|
// Domain shouldn't be deleted or have a pending transfer/delete
|
||||||
String domainName = domain.getFullyQualifiedDomainName();
|
String domainName = domain.getDomainName();
|
||||||
checkArgument(
|
checkArgument(
|
||||||
!DateTimeUtils.isAtOrAfter(jpaTm().getTransactionTime(), domain.getDeletionTime()),
|
!DateTimeUtils.isAtOrAfter(jpaTm().getTransactionTime(), domain.getDeletionTime()),
|
||||||
"Domain %s has been deleted",
|
"Domain %s has been deleted",
|
||||||
|
|
|
@ -119,35 +119,31 @@ public class DnsQueue {
|
||||||
.param(PARAM_TLD, tld));
|
.param(PARAM_TLD, tld));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Adds a task to the queue to refresh the DNS information for the specified subordinate host. */
|
||||||
* Adds a task to the queue to refresh the DNS information for the specified subordinate host.
|
public TaskHandle addHostRefreshTask(String hostName) {
|
||||||
*/
|
Optional<InternetDomainName> tld = Registries.findTldForName(InternetDomainName.from(hostName));
|
||||||
public TaskHandle addHostRefreshTask(String fullyQualifiedHostName) {
|
checkArgument(
|
||||||
Optional<InternetDomainName> tld =
|
tld.isPresent(), String.format("%s is not a subordinate host to a known tld", hostName));
|
||||||
Registries.findTldForName(InternetDomainName.from(fullyQualifiedHostName));
|
return addToQueue(TargetType.HOST, hostName, tld.get().toString(), Duration.ZERO);
|
||||||
checkArgument(tld.isPresent(),
|
|
||||||
String.format("%s is not a subordinate host to a known tld", fullyQualifiedHostName));
|
|
||||||
return addToQueue(TargetType.HOST, fullyQualifiedHostName, tld.get().toString(), Duration.ZERO);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Enqueues a task to refresh DNS for the specified domain now. */
|
/** Enqueues a task to refresh DNS for the specified domain now. */
|
||||||
public TaskHandle addDomainRefreshTask(String fullyQualifiedDomainName) {
|
public TaskHandle addDomainRefreshTask(String domainName) {
|
||||||
return addDomainRefreshTask(fullyQualifiedDomainName, Duration.ZERO);
|
return addDomainRefreshTask(domainName, Duration.ZERO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Enqueues a task to refresh DNS for the specified domain at some point in the future. */
|
/** Enqueues a task to refresh DNS for the specified domain at some point in the future. */
|
||||||
public TaskHandle addDomainRefreshTask(String fullyQualifiedDomainName, Duration countdown) {
|
public TaskHandle addDomainRefreshTask(String domainName, Duration countdown) {
|
||||||
return addToQueue(
|
return addToQueue(
|
||||||
TargetType.DOMAIN,
|
TargetType.DOMAIN,
|
||||||
fullyQualifiedDomainName,
|
domainName,
|
||||||
assertTldExists(getTldFromDomainName(fullyQualifiedDomainName)),
|
assertTldExists(getTldFromDomainName(domainName)),
|
||||||
countdown);
|
countdown);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Adds a task to the queue to refresh the DNS information for the specified zone. */
|
/** Adds a task to the queue to refresh the DNS information for the specified zone. */
|
||||||
public TaskHandle addZoneRefreshTask(String fullyQualifiedZoneName) {
|
public TaskHandle addZoneRefreshTask(String zoneName) {
|
||||||
return addToQueue(
|
return addToQueue(TargetType.ZONE, zoneName, zoneName, Duration.ZERO);
|
||||||
TargetType.ZONE, fullyQualifiedZoneName, fullyQualifiedZoneName, Duration.ZERO);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -89,7 +89,7 @@ public final class RefreshDnsAction implements Runnable {
|
||||||
private static void verifyHostIsSubordinate(HostResource host) {
|
private static void verifyHostIsSubordinate(HostResource host) {
|
||||||
if (!host.isSubordinate()) {
|
if (!host.isSubordinate()) {
|
||||||
throw new BadRequestException(
|
throw new BadRequestException(
|
||||||
String.format("%s isn't a subordinate hostname", host.getFullyQualifiedHostName()));
|
String.format("%s isn't a subordinate hostname", host.getHostName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,7 +154,7 @@ public class CloudDnsWriter extends BaseDnsWriter {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construct NS records (if any).
|
// Construct NS records (if any).
|
||||||
Set<String> nameserverData = domainBase.get().loadNameserverFullyQualifiedHostNames();
|
Set<String> nameserverData = domainBase.get().loadNameserverHostNames();
|
||||||
Set<String> subordinateHosts = domainBase.get().getSubordinateHosts();
|
Set<String> subordinateHosts = domainBase.get().getSubordinateHosts();
|
||||||
if (!nameserverData.isEmpty()) {
|
if (!nameserverData.isEmpty()) {
|
||||||
HashSet<String> nsRrData = new HashSet<>();
|
HashSet<String> nsRrData = new HashSet<>();
|
||||||
|
|
|
@ -189,7 +189,7 @@ public class DnsUpdateWriter extends BaseDnsWriter {
|
||||||
for (DelegationSignerData signerData : domain.getDsData()) {
|
for (DelegationSignerData signerData : domain.getDsData()) {
|
||||||
DSRecord dsRecord =
|
DSRecord dsRecord =
|
||||||
new DSRecord(
|
new DSRecord(
|
||||||
toAbsoluteName(domain.getFullyQualifiedDomainName()),
|
toAbsoluteName(domain.getDomainName()),
|
||||||
DClass.IN,
|
DClass.IN,
|
||||||
dnsDefaultDsTtl.getStandardSeconds(),
|
dnsDefaultDsTtl.getStandardSeconds(),
|
||||||
signerData.getKeyTag(),
|
signerData.getKeyTag(),
|
||||||
|
@ -216,7 +216,7 @@ public class DnsUpdateWriter extends BaseDnsWriter {
|
||||||
private void addInBailiwickNameServerSet(DomainBase domain, Update update) {
|
private void addInBailiwickNameServerSet(DomainBase domain, Update update) {
|
||||||
for (String hostName :
|
for (String hostName :
|
||||||
intersection(
|
intersection(
|
||||||
domain.loadNameserverFullyQualifiedHostNames(), domain.getSubordinateHosts())) {
|
domain.loadNameserverHostNames(), domain.getSubordinateHosts())) {
|
||||||
Optional<HostResource> host = loadByForeignKey(HostResource.class, hostName, clock.nowUtc());
|
Optional<HostResource> host = loadByForeignKey(HostResource.class, hostName, clock.nowUtc());
|
||||||
checkState(host.isPresent(), "Host %s cannot be loaded", hostName);
|
checkState(host.isPresent(), "Host %s cannot be loaded", hostName);
|
||||||
update.add(makeAddressSet(host.get()));
|
update.add(makeAddressSet(host.get()));
|
||||||
|
@ -226,10 +226,10 @@ public class DnsUpdateWriter extends BaseDnsWriter {
|
||||||
|
|
||||||
private RRset makeNameServerSet(DomainBase domain) {
|
private RRset makeNameServerSet(DomainBase domain) {
|
||||||
RRset nameServerSet = new RRset();
|
RRset nameServerSet = new RRset();
|
||||||
for (String hostName : domain.loadNameserverFullyQualifiedHostNames()) {
|
for (String hostName : domain.loadNameserverHostNames()) {
|
||||||
NSRecord record =
|
NSRecord record =
|
||||||
new NSRecord(
|
new NSRecord(
|
||||||
toAbsoluteName(domain.getFullyQualifiedDomainName()),
|
toAbsoluteName(domain.getDomainName()),
|
||||||
DClass.IN,
|
DClass.IN,
|
||||||
dnsDefaultNsTtl.getStandardSeconds(),
|
dnsDefaultNsTtl.getStandardSeconds(),
|
||||||
toAbsoluteName(hostName));
|
toAbsoluteName(hostName));
|
||||||
|
@ -244,7 +244,7 @@ public class DnsUpdateWriter extends BaseDnsWriter {
|
||||||
if (address instanceof Inet4Address) {
|
if (address instanceof Inet4Address) {
|
||||||
ARecord record =
|
ARecord record =
|
||||||
new ARecord(
|
new ARecord(
|
||||||
toAbsoluteName(host.getFullyQualifiedHostName()),
|
toAbsoluteName(host.getHostName()),
|
||||||
DClass.IN,
|
DClass.IN,
|
||||||
dnsDefaultATtl.getStandardSeconds(),
|
dnsDefaultATtl.getStandardSeconds(),
|
||||||
address);
|
address);
|
||||||
|
@ -260,7 +260,7 @@ public class DnsUpdateWriter extends BaseDnsWriter {
|
||||||
if (address instanceof Inet6Address) {
|
if (address instanceof Inet6Address) {
|
||||||
AAAARecord record =
|
AAAARecord record =
|
||||||
new AAAARecord(
|
new AAAARecord(
|
||||||
toAbsoluteName(host.getFullyQualifiedHostName()),
|
toAbsoluteName(host.getHostName()),
|
||||||
DClass.IN,
|
DClass.IN,
|
||||||
dnsDefaultATtl.getStandardSeconds(),
|
dnsDefaultATtl.getStandardSeconds(),
|
||||||
address);
|
address);
|
||||||
|
|
|
@ -107,7 +107,7 @@ public class ExportDomainListsAction implements Runnable {
|
||||||
@Override
|
@Override
|
||||||
public void map(DomainBase domain) {
|
public void map(DomainBase domain) {
|
||||||
if (realTlds.contains(domain.getTld()) && isActive(domain, exportTime)) {
|
if (realTlds.contains(domain.getTld()) && isActive(domain, exportTime)) {
|
||||||
emit(domain.getTld(), domain.getFullyQualifiedDomainName());
|
emit(domain.getTld(), domain.getDomainName());
|
||||||
getContext().incrementCounter(String.format("domains in tld %s", domain.getTld()));
|
getContext().incrementCounter(String.format("domains in tld %s", domain.getTld()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -354,7 +354,7 @@ public class DomainCreateFlow implements TransactionalFlow {
|
||||||
.setDsData(secDnsCreate.isPresent() ? secDnsCreate.get().getDsData() : null)
|
.setDsData(secDnsCreate.isPresent() ? secDnsCreate.get().getDsData() : null)
|
||||||
.setRegistrant(command.getRegistrant())
|
.setRegistrant(command.getRegistrant())
|
||||||
.setAuthInfo(command.getAuthInfo())
|
.setAuthInfo(command.getAuthInfo())
|
||||||
.setFullyQualifiedDomainName(targetId)
|
.setDomainName(targetId)
|
||||||
.setNameservers(
|
.setNameservers(
|
||||||
(ImmutableSet<VKey<HostResource>>)
|
(ImmutableSet<VKey<HostResource>>)
|
||||||
command.getNameservers().stream().collect(toImmutableSet()))
|
command.getNameservers().stream().collect(toImmutableSet()))
|
||||||
|
@ -598,7 +598,7 @@ public class DomainCreateFlow implements TransactionalFlow {
|
||||||
private void enqueueTasks(
|
private void enqueueTasks(
|
||||||
DomainBase newDomain, boolean hasSignedMarks, boolean hasClaimsNotice) {
|
DomainBase newDomain, boolean hasSignedMarks, boolean hasClaimsNotice) {
|
||||||
if (newDomain.shouldPublishToDns()) {
|
if (newDomain.shouldPublishToDns()) {
|
||||||
dnsQueue.addDomainRefreshTask(newDomain.getFullyQualifiedDomainName());
|
dnsQueue.addDomainRefreshTask(newDomain.getDomainName());
|
||||||
}
|
}
|
||||||
if (hasClaimsNotice || hasSignedMarks) {
|
if (hasClaimsNotice || hasSignedMarks) {
|
||||||
LordnTaskUtils.enqueueDomainBaseTask(newDomain);
|
LordnTaskUtils.enqueueDomainBaseTask(newDomain);
|
||||||
|
|
|
@ -242,7 +242,7 @@ public final class DomainDeleteFlow implements TransactionalFlow {
|
||||||
// If there's a pending transfer, the gaining client's autorenew billing
|
// If there's a pending transfer, the gaining client's autorenew billing
|
||||||
// event and poll message will already have been deleted in
|
// event and poll message will already have been deleted in
|
||||||
// ResourceDeleteFlow since it's listed in serverApproveEntities.
|
// ResourceDeleteFlow since it's listed in serverApproveEntities.
|
||||||
dnsQueue.addDomainRefreshTask(existingDomain.getFullyQualifiedDomainName());
|
dnsQueue.addDomainRefreshTask(existingDomain.getDomainName());
|
||||||
|
|
||||||
entitiesToSave.add(newDomain, historyEntry);
|
entitiesToSave.add(newDomain, historyEntry);
|
||||||
EntityChanges entityChanges = flowCustomLogic.beforeSave(
|
EntityChanges entityChanges = flowCustomLogic.beforeSave(
|
||||||
|
@ -339,7 +339,7 @@ public final class DomainDeleteFlow implements TransactionalFlow {
|
||||||
.setResponseData(
|
.setResponseData(
|
||||||
ImmutableList.of(
|
ImmutableList.of(
|
||||||
DomainPendingActionNotificationResponse.create(
|
DomainPendingActionNotificationResponse.create(
|
||||||
existingDomain.getFullyQualifiedDomainName(), true, trid, deletionTime)))
|
existingDomain.getDomainName(), true, trid, deletionTime)))
|
||||||
.setParent(historyEntry)
|
.setParent(historyEntry)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
|
@ -489,7 +489,7 @@ public class DomainFlowUtils {
|
||||||
return new BillingEvent.Recurring.Builder()
|
return new BillingEvent.Recurring.Builder()
|
||||||
.setReason(Reason.RENEW)
|
.setReason(Reason.RENEW)
|
||||||
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
|
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setClientId(domain.getCurrentSponsorClientId())
|
.setClientId(domain.getCurrentSponsorClientId())
|
||||||
.setEventTime(domain.getRegistrationExpirationTime());
|
.setEventTime(domain.getRegistrationExpirationTime());
|
||||||
}
|
}
|
||||||
|
@ -500,7 +500,7 @@ public class DomainFlowUtils {
|
||||||
*/
|
*/
|
||||||
public static PollMessage.Autorenew.Builder newAutorenewPollMessage(DomainBase domain) {
|
public static PollMessage.Autorenew.Builder newAutorenewPollMessage(DomainBase domain) {
|
||||||
return new PollMessage.Autorenew.Builder()
|
return new PollMessage.Autorenew.Builder()
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setClientId(domain.getCurrentSponsorClientId())
|
.setClientId(domain.getCurrentSponsorClientId())
|
||||||
.setEventTime(domain.getRegistrationExpirationTime())
|
.setEventTime(domain.getRegistrationExpirationTime())
|
||||||
.setMsg("Domain was auto-renewed.");
|
.setMsg("Domain was auto-renewed.");
|
||||||
|
|
|
@ -107,7 +107,7 @@ public final class DomainInfoFlow implements Flow {
|
||||||
// This is a policy decision that is left up to us by the rfcs.
|
// This is a policy decision that is left up to us by the rfcs.
|
||||||
DomainInfoData.Builder infoBuilder =
|
DomainInfoData.Builder infoBuilder =
|
||||||
DomainInfoData.newBuilder()
|
DomainInfoData.newBuilder()
|
||||||
.setFullyQualifiedDomainName(domain.getFullyQualifiedDomainName())
|
.setFullyQualifiedDomainName(domain.getDomainName())
|
||||||
.setRepoId(domain.getRepoId())
|
.setRepoId(domain.getRepoId())
|
||||||
.setCurrentSponsorClientId(domain.getCurrentSponsorClientId())
|
.setCurrentSponsorClientId(domain.getCurrentSponsorClientId())
|
||||||
.setRegistrant(tm().load(domain.getRegistrant()).getContactId());
|
.setRegistrant(tm().load(domain.getRegistrant()).getContactId());
|
||||||
|
@ -119,7 +119,7 @@ public final class DomainInfoFlow implements Flow {
|
||||||
.setStatusValues(domain.getStatusValues())
|
.setStatusValues(domain.getStatusValues())
|
||||||
.setContacts(loadForeignKeyedDesignatedContacts(domain.getContacts()))
|
.setContacts(loadForeignKeyedDesignatedContacts(domain.getContacts()))
|
||||||
.setNameservers(hostsRequest.requestDelegated()
|
.setNameservers(hostsRequest.requestDelegated()
|
||||||
? domain.loadNameserverFullyQualifiedHostNames()
|
? domain.loadNameserverHostNames()
|
||||||
: null)
|
: null)
|
||||||
.setSubordinateHosts(hostsRequest.requestSubordinate()
|
.setSubordinateHosts(hostsRequest.requestSubordinate()
|
||||||
? domain.getSubordinateHosts()
|
? domain.getSubordinateHosts()
|
||||||
|
|
|
@ -174,7 +174,7 @@ public final class DomainRestoreRequestFlow implements TransactionalFlow {
|
||||||
entitiesToSave.add(newDomain, historyEntry, autorenewEvent, autorenewPollMessage);
|
entitiesToSave.add(newDomain, historyEntry, autorenewEvent, autorenewPollMessage);
|
||||||
ofy().save().entities(entitiesToSave.build());
|
ofy().save().entities(entitiesToSave.build());
|
||||||
ofy().delete().key(existingDomain.getDeletePollMessage());
|
ofy().delete().key(existingDomain.getDeletePollMessage());
|
||||||
dnsQueue.addDomainRefreshTask(existingDomain.getFullyQualifiedDomainName());
|
dnsQueue.addDomainRefreshTask(existingDomain.getDomainName());
|
||||||
return responseBuilder
|
return responseBuilder
|
||||||
.setExtensions(createResponseExtensions(feesAndCredits, feeUpdate))
|
.setExtensions(createResponseExtensions(feesAndCredits, feeUpdate))
|
||||||
.build();
|
.build();
|
||||||
|
|
|
@ -109,7 +109,7 @@ public final class DomainTransferUtils {
|
||||||
String gainingClientId,
|
String gainingClientId,
|
||||||
Optional<Money> transferCost,
|
Optional<Money> transferCost,
|
||||||
DateTime now) {
|
DateTime now) {
|
||||||
String targetId = existingDomain.getFullyQualifiedDomainName();
|
String targetId = existingDomain.getDomainName();
|
||||||
// Create a TransferData for the server-approve case to use for the speculative poll messages.
|
// Create a TransferData for the server-approve case to use for the speculative poll messages.
|
||||||
DomainTransferData serverApproveTransferData =
|
DomainTransferData serverApproveTransferData =
|
||||||
new DomainTransferData.Builder()
|
new DomainTransferData.Builder()
|
||||||
|
|
|
@ -265,7 +265,7 @@ public final class DomainUpdateFlow implements TransactionalFlow {
|
||||||
validateDsData(newDomain.getDsData());
|
validateDsData(newDomain.getDsData());
|
||||||
validateNameserversCountForTld(
|
validateNameserversCountForTld(
|
||||||
newDomain.getTld(),
|
newDomain.getTld(),
|
||||||
InternetDomainName.from(newDomain.getFullyQualifiedDomainName()),
|
InternetDomainName.from(newDomain.getDomainName()),
|
||||||
newDomain.getNameservers().size());
|
newDomain.getNameservers().size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ public final class HostCreateFlow implements TransactionalFlow {
|
||||||
new HostResource.Builder()
|
new HostResource.Builder()
|
||||||
.setCreationClientId(clientId)
|
.setCreationClientId(clientId)
|
||||||
.setPersistedCurrentSponsorClientId(clientId)
|
.setPersistedCurrentSponsorClientId(clientId)
|
||||||
.setFullyQualifiedHostName(targetId)
|
.setHostName(targetId)
|
||||||
.setInetAddresses(command.getInetAddresses())
|
.setInetAddresses(command.getInetAddresses())
|
||||||
.setRepoId(createRepoId(ObjectifyService.allocateId(), roidSuffix))
|
.setRepoId(createRepoId(ObjectifyService.allocateId(), roidSuffix))
|
||||||
.setSuperordinateDomain(superordinateDomain.map(DomainBase::createVKey).orElse(null))
|
.setSuperordinateDomain(superordinateDomain.map(DomainBase::createVKey).orElse(null))
|
||||||
|
|
|
@ -91,7 +91,7 @@ public final class HostInfoFlow implements Flow {
|
||||||
}
|
}
|
||||||
return responseBuilder
|
return responseBuilder
|
||||||
.setResData(hostInfoDataBuilder
|
.setResData(hostInfoDataBuilder
|
||||||
.setFullyQualifiedHostName(host.getFullyQualifiedHostName())
|
.setFullyQualifiedHostName(host.getHostName())
|
||||||
.setRepoId(host.getRepoId())
|
.setRepoId(host.getRepoId())
|
||||||
.setStatusValues(statusValues.build())
|
.setStatusValues(statusValues.build())
|
||||||
.setInetAddresses(host.getInetAddresses())
|
.setInetAddresses(host.getInetAddresses())
|
||||||
|
|
|
@ -176,7 +176,7 @@ public final class HostUpdateFlow implements TransactionalFlow {
|
||||||
? newSuperordinateDomain.get().getCurrentSponsorClientId()
|
? newSuperordinateDomain.get().getCurrentSponsorClientId()
|
||||||
: owningResource.getPersistedCurrentSponsorClientId();
|
: owningResource.getPersistedCurrentSponsorClientId();
|
||||||
HostResource newHost = existingHost.asBuilder()
|
HostResource newHost = existingHost.asBuilder()
|
||||||
.setFullyQualifiedHostName(newHostName)
|
.setHostName(newHostName)
|
||||||
.addStatusValues(add.getStatusValues())
|
.addStatusValues(add.getStatusValues())
|
||||||
.removeStatusValues(remove.getStatusValues())
|
.removeStatusValues(remove.getStatusValues())
|
||||||
.addInetAddresses(add.getInetAddresses())
|
.addInetAddresses(add.getInetAddresses())
|
||||||
|
@ -263,14 +263,14 @@ public final class HostUpdateFlow implements TransactionalFlow {
|
||||||
// Only update DNS for subordinate hosts. External hosts have no glue to write, so they
|
// Only update DNS for subordinate hosts. External hosts have no glue to write, so they
|
||||||
// are only written as NS records from the referencing domain.
|
// are only written as NS records from the referencing domain.
|
||||||
if (existingHost.isSubordinate()) {
|
if (existingHost.isSubordinate()) {
|
||||||
dnsQueue.addHostRefreshTask(existingHost.getFullyQualifiedHostName());
|
dnsQueue.addHostRefreshTask(existingHost.getHostName());
|
||||||
}
|
}
|
||||||
// In case of a rename, there are many updates we need to queue up.
|
// In case of a rename, there are many updates we need to queue up.
|
||||||
if (((Update) resourceCommand).getInnerChange().getFullyQualifiedHostName() != null) {
|
if (((Update) resourceCommand).getInnerChange().getFullyQualifiedHostName() != null) {
|
||||||
// If the renamed host is also subordinate, then we must enqueue an update to write the new
|
// If the renamed host is also subordinate, then we must enqueue an update to write the new
|
||||||
// glue.
|
// glue.
|
||||||
if (newHost.isSubordinate()) {
|
if (newHost.isSubordinate()) {
|
||||||
dnsQueue.addHostRefreshTask(newHost.getFullyQualifiedHostName());
|
dnsQueue.addHostRefreshTask(newHost.getHostName());
|
||||||
}
|
}
|
||||||
// We must also enqueue updates for all domains that use this host as their nameserver so
|
// We must also enqueue updates for all domains that use this host as their nameserver so
|
||||||
// that their NS records can be updated to point at the new name.
|
// that their NS records can be updated to point at the new name.
|
||||||
|
@ -286,8 +286,8 @@ public final class HostUpdateFlow implements TransactionalFlow {
|
||||||
tm().saveNewOrUpdate(
|
tm().saveNewOrUpdate(
|
||||||
tm().load(existingHost.getSuperordinateDomain())
|
tm().load(existingHost.getSuperordinateDomain())
|
||||||
.asBuilder()
|
.asBuilder()
|
||||||
.removeSubordinateHost(existingHost.getFullyQualifiedHostName())
|
.removeSubordinateHost(existingHost.getHostName())
|
||||||
.addSubordinateHost(newHost.getFullyQualifiedHostName())
|
.addSubordinateHost(newHost.getHostName())
|
||||||
.build());
|
.build());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -295,14 +295,14 @@ public final class HostUpdateFlow implements TransactionalFlow {
|
||||||
tm().saveNewOrUpdate(
|
tm().saveNewOrUpdate(
|
||||||
tm().load(existingHost.getSuperordinateDomain())
|
tm().load(existingHost.getSuperordinateDomain())
|
||||||
.asBuilder()
|
.asBuilder()
|
||||||
.removeSubordinateHost(existingHost.getFullyQualifiedHostName())
|
.removeSubordinateHost(existingHost.getHostName())
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
if (newHost.isSubordinate()) {
|
if (newHost.isSubordinate()) {
|
||||||
tm().saveNewOrUpdate(
|
tm().saveNewOrUpdate(
|
||||||
tm().load(newHost.getSuperordinateDomain())
|
tm().load(newHost.getSuperordinateDomain())
|
||||||
.asBuilder()
|
.asBuilder()
|
||||||
.addSubordinateHost(newHost.getFullyQualifiedHostName())
|
.addSubordinateHost(newHost.getHostName())
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ import org.joda.time.Interval;
|
||||||
@javax.persistence.Index(columnList = "creationTime"),
|
@javax.persistence.Index(columnList = "creationTime"),
|
||||||
@javax.persistence.Index(columnList = "currentSponsorRegistrarId"),
|
@javax.persistence.Index(columnList = "currentSponsorRegistrarId"),
|
||||||
@javax.persistence.Index(columnList = "deletionTime"),
|
@javax.persistence.Index(columnList = "deletionTime"),
|
||||||
@javax.persistence.Index(columnList = "fullyQualifiedDomainName"),
|
@javax.persistence.Index(columnList = "domainName"),
|
||||||
@javax.persistence.Index(columnList = "tld")
|
@javax.persistence.Index(columnList = "tld")
|
||||||
})
|
})
|
||||||
@WithStringVKey
|
@WithStringVKey
|
||||||
|
@ -137,6 +137,8 @@ public class DomainBase extends EppResource
|
||||||
*
|
*
|
||||||
* @invariant fullyQualifiedDomainName == fullyQualifiedDomainName.toLowerCase(Locale.ENGLISH)
|
* @invariant fullyQualifiedDomainName == fullyQualifiedDomainName.toLowerCase(Locale.ENGLISH)
|
||||||
*/
|
*/
|
||||||
|
// TODO(b/158858642): Rename this to domainName when we are off Datastore
|
||||||
|
@Column(name = "domainName")
|
||||||
@Index String fullyQualifiedDomainName;
|
@Index String fullyQualifiedDomainName;
|
||||||
|
|
||||||
/** The top level domain this is under, dernormalized from {@link #fullyQualifiedDomainName}. */
|
/** The top level domain this is under, dernormalized from {@link #fullyQualifiedDomainName}. */
|
||||||
|
@ -348,7 +350,7 @@ public class DomainBase extends EppResource
|
||||||
return fullyQualifiedDomainName;
|
return fullyQualifiedDomainName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFullyQualifiedDomainName() {
|
public String getDomainName() {
|
||||||
return fullyQualifiedDomainName;
|
return fullyQualifiedDomainName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -552,13 +554,13 @@ public class DomainBase extends EppResource
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Loads and returns the fully qualified host names of all linked nameservers. */
|
/** Loads and returns the fully qualified host names of all linked nameservers. */
|
||||||
public ImmutableSortedSet<String> loadNameserverFullyQualifiedHostNames() {
|
public ImmutableSortedSet<String> loadNameserverHostNames() {
|
||||||
return ofy()
|
return ofy()
|
||||||
.load()
|
.load()
|
||||||
.keys(getNameservers().stream().map(VKey::getOfyKey).collect(toImmutableSet()))
|
.keys(getNameservers().stream().map(VKey::getOfyKey).collect(toImmutableSet()))
|
||||||
.values()
|
.values()
|
||||||
.stream()
|
.stream()
|
||||||
.map(HostResource::getFullyQualifiedHostName)
|
.map(HostResource::getHostName)
|
||||||
.collect(toImmutableSortedSet(Ordering.natural()));
|
.collect(toImmutableSortedSet(Ordering.natural()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -679,7 +681,7 @@ public class DomainBase extends EppResource
|
||||||
}
|
}
|
||||||
|
|
||||||
checkArgumentNotNull(
|
checkArgumentNotNull(
|
||||||
emptyToNull(instance.fullyQualifiedDomainName), "Missing fullyQualifiedDomainName");
|
emptyToNull(instance.fullyQualifiedDomainName), "Missing domainName");
|
||||||
if (instance.getRegistrant() == null
|
if (instance.getRegistrant() == null
|
||||||
&& instance.allContacts.stream().anyMatch(IS_REGISTRANT)) {
|
&& instance.allContacts.stream().anyMatch(IS_REGISTRANT)) {
|
||||||
throw new IllegalArgumentException("registrant is null but is in allContacts");
|
throw new IllegalArgumentException("registrant is null but is in allContacts");
|
||||||
|
@ -689,11 +691,11 @@ public class DomainBase extends EppResource
|
||||||
return super.build();
|
return super.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder setFullyQualifiedDomainName(String fullyQualifiedDomainName) {
|
public Builder setDomainName(String domainName) {
|
||||||
checkArgument(
|
checkArgument(
|
||||||
fullyQualifiedDomainName.equals(canonicalizeDomainName(fullyQualifiedDomainName)),
|
domainName.equals(canonicalizeDomainName(domainName)),
|
||||||
"Domain name must be in puny-coded, lower-case form");
|
"Domain name must be in puny-coded, lower-case form");
|
||||||
getInstance().fullyQualifiedDomainName = fullyQualifiedDomainName;
|
getInstance().fullyQualifiedDomainName = domainName;
|
||||||
return thisCastToDerived();
|
return thisCastToDerived();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ import java.util.Set;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import javax.persistence.Access;
|
import javax.persistence.Access;
|
||||||
import javax.persistence.AccessType;
|
import javax.persistence.AccessType;
|
||||||
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Embeddable;
|
import javax.persistence.Embeddable;
|
||||||
import javax.persistence.MappedSuperclass;
|
import javax.persistence.MappedSuperclass;
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
|
@ -64,7 +65,10 @@ public class HostBase extends EppResource {
|
||||||
* from (creationTime, deletionTime) there can only be one host in Datastore with this name.
|
* from (creationTime, deletionTime) there can only be one host in Datastore with this name.
|
||||||
* However, there can be many hosts with the same name and non-overlapping lifetimes.
|
* However, there can be many hosts with the same name and non-overlapping lifetimes.
|
||||||
*/
|
*/
|
||||||
@Index String fullyQualifiedHostName;
|
// TODO(b/158858642): Rename this to hostName when we are off Datastore
|
||||||
|
@Index
|
||||||
|
@Column(name = "hostName")
|
||||||
|
String fullyQualifiedHostName;
|
||||||
|
|
||||||
/** IP Addresses for this host. Can be null if this is an external host. */
|
/** IP Addresses for this host. Can be null if this is an external host. */
|
||||||
@Index Set<InetAddress> inetAddresses;
|
@Index Set<InetAddress> inetAddresses;
|
||||||
|
@ -91,7 +95,7 @@ public class HostBase extends EppResource {
|
||||||
*/
|
*/
|
||||||
DateTime lastSuperordinateChange;
|
DateTime lastSuperordinateChange;
|
||||||
|
|
||||||
public String getFullyQualifiedHostName() {
|
public String getHostName() {
|
||||||
return fullyQualifiedHostName;
|
return fullyQualifiedHostName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,11 +192,11 @@ public class HostBase extends EppResource {
|
||||||
return super.build();
|
return super.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public B setFullyQualifiedHostName(String fullyQualifiedHostName) {
|
public B setHostName(String hostName) {
|
||||||
checkArgument(
|
checkArgument(
|
||||||
fullyQualifiedHostName.equals(canonicalizeDomainName(fullyQualifiedHostName)),
|
hostName.equals(canonicalizeDomainName(hostName)),
|
||||||
"Host name must be in puny-coded, lower-case form");
|
"Host name must be in puny-coded, lower-case form");
|
||||||
getInstance().fullyQualifiedHostName = fullyQualifiedHostName;
|
getInstance().fullyQualifiedHostName = hostName;
|
||||||
return thisCastToDerived();
|
return thisCastToDerived();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ import javax.persistence.Entity;
|
||||||
indexes = {
|
indexes = {
|
||||||
@javax.persistence.Index(columnList = "creationTime"),
|
@javax.persistence.Index(columnList = "creationTime"),
|
||||||
@javax.persistence.Index(columnList = "historyRegistrarId"),
|
@javax.persistence.Index(columnList = "historyRegistrarId"),
|
||||||
@javax.persistence.Index(columnList = "fullyQualifiedHostName"),
|
@javax.persistence.Index(columnList = "hostName"),
|
||||||
@javax.persistence.Index(columnList = "historyType"),
|
@javax.persistence.Index(columnList = "historyType"),
|
||||||
@javax.persistence.Index(columnList = "historyModificationTime")
|
@javax.persistence.Index(columnList = "historyModificationTime")
|
||||||
})
|
})
|
||||||
|
|
|
@ -425,7 +425,7 @@ public class RdapDomainSearchAction extends RdapSearchActionBase {
|
||||||
// order.
|
// order.
|
||||||
ImmutableSortedSet.Builder<DomainBase> domainSetBuilder =
|
ImmutableSortedSet.Builder<DomainBase> domainSetBuilder =
|
||||||
ImmutableSortedSet.orderedBy(
|
ImmutableSortedSet.orderedBy(
|
||||||
Comparator.comparing(DomainBase::getFullyQualifiedDomainName));
|
Comparator.comparing(DomainBase::getDomainName));
|
||||||
int numHostKeysSearched = 0;
|
int numHostKeysSearched = 0;
|
||||||
for (List<VKey<HostResource>> chunk : Iterables.partition(hostKeys, 30)) {
|
for (List<VKey<HostResource>> chunk : Iterables.partition(hostKeys, 30)) {
|
||||||
numHostKeysSearched += chunk.size();
|
numHostKeysSearched += chunk.size();
|
||||||
|
@ -445,7 +445,7 @@ public class RdapDomainSearchAction extends RdapSearchActionBase {
|
||||||
if (cursorString.isPresent()) {
|
if (cursorString.isPresent()) {
|
||||||
stream =
|
stream =
|
||||||
stream.filter(
|
stream.filter(
|
||||||
domain -> (domain.getFullyQualifiedDomainName().compareTo(cursorString.get()) > 0));
|
domain -> (domain.getDomainName().compareTo(cursorString.get()) > 0));
|
||||||
}
|
}
|
||||||
stream.forEach(domainSetBuilder::add);
|
stream.forEach(domainSetBuilder::add);
|
||||||
}
|
}
|
||||||
|
@ -495,7 +495,7 @@ public class RdapDomainSearchAction extends RdapSearchActionBase {
|
||||||
.setIncompletenessWarningType(incompletenessWarningType);
|
.setIncompletenessWarningType(incompletenessWarningType);
|
||||||
Optional<String> newCursor = Optional.empty();
|
Optional<String> newCursor = Optional.empty();
|
||||||
for (DomainBase domain : Iterables.limit(domains, rdapResultSetMaxSize)) {
|
for (DomainBase domain : Iterables.limit(domains, rdapResultSetMaxSize)) {
|
||||||
newCursor = Optional.of(domain.getFullyQualifiedDomainName());
|
newCursor = Optional.of(domain.getDomainName());
|
||||||
builder
|
builder
|
||||||
.domainSearchResultsBuilder()
|
.domainSearchResultsBuilder()
|
||||||
.add(rdapJsonFormatter.createRdapDomain(domain, outputDataType));
|
.add(rdapJsonFormatter.createRdapDomain(domain, outputDataType));
|
||||||
|
|
|
@ -221,7 +221,7 @@ public class RdapJsonFormatter {
|
||||||
|
|
||||||
/** Sets the ordering for hosts; just use the fully qualified host name. */
|
/** Sets the ordering for hosts; just use the fully qualified host name. */
|
||||||
private static final Ordering<HostResource> HOST_RESOURCE_ORDERING =
|
private static final Ordering<HostResource> HOST_RESOURCE_ORDERING =
|
||||||
Ordering.natural().onResultOf(HostResource::getFullyQualifiedHostName);
|
Ordering.natural().onResultOf(HostResource::getHostName);
|
||||||
|
|
||||||
/** Sets the ordering for designated contacts; order them in a fixed order by contact type. */
|
/** Sets the ordering for designated contacts; order them in a fixed order by contact type. */
|
||||||
private static final Ordering<DesignatedContact> DESIGNATED_CONTACT_ORDERING =
|
private static final Ordering<DesignatedContact> DESIGNATED_CONTACT_ORDERING =
|
||||||
|
@ -266,12 +266,12 @@ public class RdapJsonFormatter {
|
||||||
*/
|
*/
|
||||||
RdapDomain createRdapDomain(DomainBase domainBase, OutputDataType outputDataType) {
|
RdapDomain createRdapDomain(DomainBase domainBase, OutputDataType outputDataType) {
|
||||||
RdapDomain.Builder builder = RdapDomain.builder();
|
RdapDomain.Builder builder = RdapDomain.builder();
|
||||||
builder.linksBuilder().add(makeSelfLink("domain", domainBase.getFullyQualifiedDomainName()));
|
builder.linksBuilder().add(makeSelfLink("domain", domainBase.getDomainName()));
|
||||||
if (outputDataType != OutputDataType.FULL) {
|
if (outputDataType != OutputDataType.FULL) {
|
||||||
builder.remarksBuilder().add(RdapIcannStandardInformation.SUMMARY_DATA_REMARK);
|
builder.remarksBuilder().add(RdapIcannStandardInformation.SUMMARY_DATA_REMARK);
|
||||||
}
|
}
|
||||||
// RDAP Response Profile 15feb19 section 2.1 discusses the domain name.
|
// RDAP Response Profile 15feb19 section 2.1 discusses the domain name.
|
||||||
builder.setLdhName(domainBase.getFullyQualifiedDomainName());
|
builder.setLdhName(domainBase.getDomainName());
|
||||||
// RDAP Response Profile 15feb19 section 2.2:
|
// RDAP Response Profile 15feb19 section 2.2:
|
||||||
// The domain handle MUST be the ROID
|
// The domain handle MUST be the ROID
|
||||||
builder.setHandle(domainBase.getRepoId());
|
builder.setHandle(domainBase.getRepoId());
|
||||||
|
@ -315,7 +315,7 @@ public class RdapJsonFormatter {
|
||||||
for (String registrarRdapBase : registrar.getRdapBaseUrls()) {
|
for (String registrarRdapBase : registrar.getRdapBaseUrls()) {
|
||||||
String href =
|
String href =
|
||||||
makeServerRelativeUrl(
|
makeServerRelativeUrl(
|
||||||
registrarRdapBase, "domain", domainBase.getFullyQualifiedDomainName());
|
registrarRdapBase, "domain", domainBase.getDomainName());
|
||||||
builder
|
builder
|
||||||
.linksBuilder()
|
.linksBuilder()
|
||||||
.add(
|
.add(
|
||||||
|
@ -336,7 +336,7 @@ public class RdapJsonFormatter {
|
||||||
if (status.isEmpty()) {
|
if (status.isEmpty()) {
|
||||||
logger.atWarning().log(
|
logger.atWarning().log(
|
||||||
"Domain %s (ROID %s) doesn't have any status",
|
"Domain %s (ROID %s) doesn't have any status",
|
||||||
domainBase.getFullyQualifiedDomainName(), domainBase.getRepoId());
|
domainBase.getDomainName(), domainBase.getRepoId());
|
||||||
}
|
}
|
||||||
// RDAP Response Profile 2.6.3, must have a notice about statuses. That is in {@link
|
// RDAP Response Profile 2.6.3, must have a notice about statuses. That is in {@link
|
||||||
// RdapIcannStandardInformation#domainBoilerplateNotices}
|
// RdapIcannStandardInformation#domainBoilerplateNotices}
|
||||||
|
@ -411,13 +411,13 @@ public class RdapJsonFormatter {
|
||||||
RdapNameserver.Builder builder = RdapNameserver.builder();
|
RdapNameserver.Builder builder = RdapNameserver.builder();
|
||||||
builder
|
builder
|
||||||
.linksBuilder()
|
.linksBuilder()
|
||||||
.add(makeSelfLink("nameserver", hostResource.getFullyQualifiedHostName()));
|
.add(makeSelfLink("nameserver", hostResource.getHostName()));
|
||||||
if (outputDataType != OutputDataType.FULL) {
|
if (outputDataType != OutputDataType.FULL) {
|
||||||
builder.remarksBuilder().add(RdapIcannStandardInformation.SUMMARY_DATA_REMARK);
|
builder.remarksBuilder().add(RdapIcannStandardInformation.SUMMARY_DATA_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We need the ldhName: RDAP Response Profile 2.9.1, 4.1
|
// We need the ldhName: RDAP Response Profile 2.9.1, 4.1
|
||||||
builder.setLdhName(hostResource.getFullyQualifiedHostName());
|
builder.setLdhName(hostResource.getHostName());
|
||||||
// Handle is optional, but if given it MUST be the ROID.
|
// Handle is optional, but if given it MUST be the ROID.
|
||||||
// We will set it always as it's important as a "self link"
|
// We will set it always as it's important as a "self link"
|
||||||
builder.setHandle(hostResource.getRepoId());
|
builder.setHandle(hostResource.getRepoId());
|
||||||
|
|
|
@ -271,7 +271,7 @@ public class RdapNameserverSearchAction extends RdapSearchActionBase {
|
||||||
newCursor =
|
newCursor =
|
||||||
Optional.of(
|
Optional.of(
|
||||||
(cursorType == CursorType.NAME)
|
(cursorType == CursorType.NAME)
|
||||||
? host.getFullyQualifiedHostName()
|
? host.getHostName()
|
||||||
: host.getRepoId());
|
: host.getRepoId());
|
||||||
builder
|
builder
|
||||||
.nameserverSearchResultsBuilder()
|
.nameserverSearchResultsBuilder()
|
||||||
|
|
|
@ -62,7 +62,7 @@ final class DomainBaseToXjcConverter {
|
||||||
|
|
||||||
// o A <name> element that contains the fully qualified name of the
|
// o A <name> element that contains the fully qualified name of the
|
||||||
// domain name object.
|
// domain name object.
|
||||||
bean.setName(model.getFullyQualifiedDomainName());
|
bean.setName(model.getDomainName());
|
||||||
|
|
||||||
// o A <roid> element that contains the repository object identifier
|
// o A <roid> element that contains the repository object identifier
|
||||||
// assigned to the domain name object when it was created.
|
// assigned to the domain name object when it was created.
|
||||||
|
@ -70,7 +70,7 @@ final class DomainBaseToXjcConverter {
|
||||||
|
|
||||||
// o An OPTIONAL <uName> element that contains the name of the domain
|
// o An OPTIONAL <uName> element that contains the name of the domain
|
||||||
// name in Unicode character set. It MUST be provided if available.
|
// name in Unicode character set. It MUST be provided if available.
|
||||||
bean.setUName(Idn.toUnicode(model.getFullyQualifiedDomainName()));
|
bean.setUName(Idn.toUnicode(model.getDomainName()));
|
||||||
|
|
||||||
// o An OPTIONAL <idnTableId> element that references the IDN Table
|
// o An OPTIONAL <idnTableId> element that references the IDN Table
|
||||||
// used for the IDN. This corresponds to the "id" attribute of the
|
// used for the IDN. This corresponds to the "id" attribute of the
|
||||||
|
@ -143,7 +143,7 @@ final class DomainBaseToXjcConverter {
|
||||||
// it is that with host attributes, you inline the nameserver data
|
// it is that with host attributes, you inline the nameserver data
|
||||||
// on each domain; with host objects, you normalize the nameserver
|
// on each domain; with host objects, you normalize the nameserver
|
||||||
// data to a separate EPP object.
|
// data to a separate EPP object.
|
||||||
ImmutableSet<String> linkedNameserverHostNames = model.loadNameserverFullyQualifiedHostNames();
|
ImmutableSet<String> linkedNameserverHostNames = model.loadNameserverHostNames();
|
||||||
if (!linkedNameserverHostNames.isEmpty()) {
|
if (!linkedNameserverHostNames.isEmpty()) {
|
||||||
XjcDomainNsType nameservers = new XjcDomainNsType();
|
XjcDomainNsType nameservers = new XjcDomainNsType();
|
||||||
for (String hostName : linkedNameserverHostNames) {
|
for (String hostName : linkedNameserverHostNames) {
|
||||||
|
@ -154,7 +154,7 @@ final class DomainBaseToXjcConverter {
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case FULL:
|
case FULL:
|
||||||
String domainName = model.getFullyQualifiedDomainName();
|
String domainName = model.getDomainName();
|
||||||
|
|
||||||
// o Zero or more OPTIONAL <rgpStatus> element to represent
|
// o Zero or more OPTIONAL <rgpStatus> element to represent
|
||||||
// "pendingDelete" sub-statuses, including "redemptionPeriod",
|
// "pendingDelete" sub-statuses, including "redemptionPeriod",
|
||||||
|
|
|
@ -68,7 +68,7 @@ final class HostResourceToXjcConverter {
|
||||||
private static XjcRdeHost convertHostCommon(
|
private static XjcRdeHost convertHostCommon(
|
||||||
HostResource model, String clientId, DateTime lastTransferTime) {
|
HostResource model, String clientId, DateTime lastTransferTime) {
|
||||||
XjcRdeHost bean = new XjcRdeHost();
|
XjcRdeHost bean = new XjcRdeHost();
|
||||||
bean.setName(model.getFullyQualifiedHostName());
|
bean.setName(model.getHostName());
|
||||||
bean.setRoid(model.getRepoId());
|
bean.setRoid(model.getRepoId());
|
||||||
bean.setCrDate(model.getCreationTime());
|
bean.setCrDate(model.getCreationTime());
|
||||||
bean.setUpDate(model.getLastEppUpdateTime());
|
bean.setUpDate(model.getLastEppUpdateTime());
|
||||||
|
|
|
@ -69,7 +69,7 @@ public final class LordnTaskUtils {
|
||||||
return Joiner.on(',')
|
return Joiner.on(',')
|
||||||
.join(
|
.join(
|
||||||
domain.getRepoId(),
|
domain.getRepoId(),
|
||||||
domain.getFullyQualifiedDomainName(),
|
domain.getDomainName(),
|
||||||
domain.getSmdId(),
|
domain.getSmdId(),
|
||||||
getIanaIdentifier(domain.getCreationClientId()),
|
getIanaIdentifier(domain.getCreationClientId()),
|
||||||
transactionTime); // Used as creation time.
|
transactionTime); // Used as creation time.
|
||||||
|
@ -80,7 +80,7 @@ public final class LordnTaskUtils {
|
||||||
return Joiner.on(',')
|
return Joiner.on(',')
|
||||||
.join(
|
.join(
|
||||||
domain.getRepoId(),
|
domain.getRepoId(),
|
||||||
domain.getFullyQualifiedDomainName(),
|
domain.getDomainName(),
|
||||||
domain.getLaunchNotice().getNoticeId().getTcnId(),
|
domain.getLaunchNotice().getNoticeId().getTcnId(),
|
||||||
getIanaIdentifier(domain.getCreationClientId()),
|
getIanaIdentifier(domain.getCreationClientId()),
|
||||||
transactionTime, // Used as creation time.
|
transactionTime, // Used as creation time.
|
||||||
|
|
|
@ -293,14 +293,14 @@ public final class DomainLockUtils {
|
||||||
checkArgument(
|
checkArgument(
|
||||||
!domainBase.getStatusValues().containsAll(REGISTRY_LOCK_STATUSES),
|
!domainBase.getStatusValues().containsAll(REGISTRY_LOCK_STATUSES),
|
||||||
"Domain %s is already locked",
|
"Domain %s is already locked",
|
||||||
domainBase.getFullyQualifiedDomainName());
|
domainBase.getDomainName());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void verifyDomainLocked(DomainBase domainBase) {
|
private static void verifyDomainLocked(DomainBase domainBase) {
|
||||||
checkArgument(
|
checkArgument(
|
||||||
!Sets.intersection(domainBase.getStatusValues(), REGISTRY_LOCK_STATUSES).isEmpty(),
|
!Sets.intersection(domainBase.getStatusValues(), REGISTRY_LOCK_STATUSES).isEmpty(),
|
||||||
"Domain %s is already unlocked",
|
"Domain %s is already unlocked",
|
||||||
domainBase.getFullyQualifiedDomainName());
|
domainBase.getDomainName());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static DomainBase getDomain(String domainName, DateTime now) {
|
private static DomainBase getDomain(String domainName, DateTime now) {
|
||||||
|
|
|
@ -95,7 +95,7 @@ final class GenerateDnsReportCommand implements CommandWithRemoteApi {
|
||||||
|
|
||||||
private void write(DomainBase domain) {
|
private void write(DomainBase domain) {
|
||||||
ImmutableList<String> nameservers =
|
ImmutableList<String> nameservers =
|
||||||
ImmutableList.sortedCopyOf(domain.loadNameserverFullyQualifiedHostNames());
|
ImmutableList.sortedCopyOf(domain.loadNameserverHostNames());
|
||||||
ImmutableList<Map<String, ?>> dsData =
|
ImmutableList<Map<String, ?>> dsData =
|
||||||
domain
|
domain
|
||||||
.getDsData()
|
.getDsData()
|
||||||
|
@ -109,7 +109,7 @@ final class GenerateDnsReportCommand implements CommandWithRemoteApi {
|
||||||
"digest", base16().encode(dsData1.getDigest())))
|
"digest", base16().encode(dsData1.getDigest())))
|
||||||
.collect(toImmutableList());
|
.collect(toImmutableList());
|
||||||
ImmutableMap.Builder<String, Object> mapBuilder = new ImmutableMap.Builder<>();
|
ImmutableMap.Builder<String, Object> mapBuilder = new ImmutableMap.Builder<>();
|
||||||
mapBuilder.put("domain", domain.getFullyQualifiedDomainName());
|
mapBuilder.put("domain", domain.getDomainName());
|
||||||
if (!nameservers.isEmpty()) {
|
if (!nameservers.isEmpty()) {
|
||||||
mapBuilder.put("nameservers", nameservers);
|
mapBuilder.put("nameservers", nameservers);
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ final class GenerateDnsReportCommand implements CommandWithRemoteApi {
|
||||||
.sorted()
|
.sorted()
|
||||||
.collect(toImmutableList());
|
.collect(toImmutableList());
|
||||||
ImmutableMap<String, ?> map = ImmutableMap.of(
|
ImmutableMap<String, ?> map = ImmutableMap.of(
|
||||||
"host", nameserver.getFullyQualifiedHostName(),
|
"host", nameserver.getHostName(),
|
||||||
"ips", ipAddresses);
|
"ips", ipAddresses);
|
||||||
writeJson(map);
|
writeJson(map);
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ final class GenerateLordnCommand implements CommandWithRemoteApi {
|
||||||
claimsCsv.add(LordnTaskUtils.getCsvLineForClaimsDomain(domain, domain.getCreationTime()));
|
claimsCsv.add(LordnTaskUtils.getCsvLineForClaimsDomain(domain, domain.getCreationTime()));
|
||||||
status = "C";
|
status = "C";
|
||||||
}
|
}
|
||||||
System.out.printf("%s[%s] ", domain.getFullyQualifiedDomainName(), status);
|
System.out.printf("%s[%s] ", domain.getDomainName(), status);
|
||||||
}
|
}
|
||||||
ImmutableList<String> claimsRows = claimsCsv.build();
|
ImmutableList<String> claimsRows = claimsCsv.build();
|
||||||
ImmutableList<String> claimsAll =
|
ImmutableList<String> claimsAll =
|
||||||
|
|
|
@ -65,7 +65,7 @@ final class GetAllocationTokenCommand implements CommandWithRemoteApi {
|
||||||
} else {
|
} else {
|
||||||
System.out.printf(
|
System.out.printf(
|
||||||
"Token %s was redeemed to create domain %s at %s.\n",
|
"Token %s was redeemed to create domain %s at %s.\n",
|
||||||
token, domain.getFullyQualifiedDomainName(), domain.getCreationTime());
|
token, domain.getDomainName(), domain.getCreationTime());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -73,7 +73,7 @@ final class RenewDomainCommand extends MutatingEppToolCommand {
|
||||||
addSoyRecord(
|
addSoyRecord(
|
||||||
isNullOrEmpty(clientId) ? domain.getCurrentSponsorClientId() : clientId,
|
isNullOrEmpty(clientId) ? domain.getCurrentSponsorClientId() : clientId,
|
||||||
new SoyMapData(
|
new SoyMapData(
|
||||||
"domainName", domain.getFullyQualifiedDomainName(),
|
"domainName", domain.getDomainName(),
|
||||||
"expirationDate", domain.getRegistrationExpirationTime().toString(DATE_FORMATTER),
|
"expirationDate", domain.getRegistrationExpirationTime().toString(DATE_FORMATTER),
|
||||||
"period", String.valueOf(period)));
|
"period", String.valueOf(period)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,7 +184,7 @@ final class UpdateDomainCommand extends CreateOrUpdateDomainCommand {
|
||||||
domain);
|
domain);
|
||||||
if (!nameservers.isEmpty()) {
|
if (!nameservers.isEmpty()) {
|
||||||
ImmutableSortedSet<String> existingNameservers =
|
ImmutableSortedSet<String> existingNameservers =
|
||||||
domainBase.loadNameserverFullyQualifiedHostNames();
|
domainBase.loadNameserverHostNames();
|
||||||
populateAddRemoveLists(
|
populateAddRemoveLists(
|
||||||
ImmutableSet.copyOf(nameservers),
|
ImmutableSet.copyOf(nameservers),
|
||||||
existingNameservers,
|
existingNameservers,
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class BackfillRegistryLocksCommand extends ConfirmingCommand
|
||||||
jpaTm().transact(() -> getLockedDomainsWithoutLocks(jpaTm().getTransactionTime()));
|
jpaTm().transact(() -> getLockedDomainsWithoutLocks(jpaTm().getTransactionTime()));
|
||||||
ImmutableList<String> lockedDomainNames =
|
ImmutableList<String> lockedDomainNames =
|
||||||
lockedDomains.stream()
|
lockedDomains.stream()
|
||||||
.map(DomainBase::getFullyQualifiedDomainName)
|
.map(DomainBase::getDomainName)
|
||||||
.collect(toImmutableList());
|
.collect(toImmutableList());
|
||||||
return String.format(
|
return String.format(
|
||||||
"Locked domains for which there does not exist a RegistryLock object: %s",
|
"Locked domains for which there does not exist a RegistryLock object: %s",
|
||||||
|
@ -104,7 +104,7 @@ public class BackfillRegistryLocksCommand extends ConfirmingCommand
|
||||||
.isSuperuser(true)
|
.isSuperuser(true)
|
||||||
.setRegistrarId(registryAdminClientId)
|
.setRegistrarId(registryAdminClientId)
|
||||||
.setRepoId(domainBase.getRepoId())
|
.setRepoId(domainBase.getRepoId())
|
||||||
.setDomainName(domainBase.getFullyQualifiedDomainName())
|
.setDomainName(domainBase.getDomainName())
|
||||||
.setLockCompletionTimestamp(
|
.setLockCompletionTimestamp(
|
||||||
getLockCompletionTimestamp(domainBase, jpaTm().getTransactionTime()))
|
getLockCompletionTimestamp(domainBase, jpaTm().getTransactionTime()))
|
||||||
.setVerificationCode(
|
.setVerificationCode(
|
||||||
|
@ -113,7 +113,7 @@ public class BackfillRegistryLocksCommand extends ConfirmingCommand
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
logger.atSevere().withCause(t).log(
|
logger.atSevere().withCause(t).log(
|
||||||
"Error when creating lock object for domain %s.",
|
"Error when creating lock object for domain %s.",
|
||||||
domainBase.getFullyQualifiedDomainName());
|
domainBase.getDomainName());
|
||||||
failedDomainsBuilder.add(domainBase);
|
failedDomainsBuilder.add(domainBase);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ public class RemoveIpAddressCommand extends MutatingEppToolCommand {
|
||||||
setSoyTemplate(
|
setSoyTemplate(
|
||||||
RemoveIpAddressSoyInfo.getInstance(), RemoveIpAddressSoyInfo.REMOVE_IP_ADDRESS);
|
RemoveIpAddressSoyInfo.getInstance(), RemoveIpAddressSoyInfo.REMOVE_IP_ADDRESS);
|
||||||
addSoyRecord(registrarId, new SoyMapData(
|
addSoyRecord(registrarId, new SoyMapData(
|
||||||
"name", host.getFullyQualifiedHostName(),
|
"name", host.getHostName(),
|
||||||
"ipAddresses", ipAddresses,
|
"ipAddresses", ipAddresses,
|
||||||
"requestedByRegistrar", registrarId));
|
"requestedByRegistrar", registrarId));
|
||||||
}
|
}
|
||||||
|
|
|
@ -217,7 +217,7 @@ public class GenerateZoneFilesAction implements Runnable, JsonActionRunner.JsonA
|
||||||
for (HostResource unprojectedHost : tm().load(domain.getNameservers())) {
|
for (HostResource unprojectedHost : tm().load(domain.getNameservers())) {
|
||||||
HostResource host = loadAtPointInTime(unprojectedHost, exportTime).now();
|
HostResource host = loadAtPointInTime(unprojectedHost, exportTime).now();
|
||||||
// A null means the host was deleted (or not created) at this time.
|
// A null means the host was deleted (or not created) at this time.
|
||||||
if ((host != null) && subordinateHosts.contains(host.getFullyQualifiedHostName())) {
|
if ((host != null) && subordinateHosts.contains(host.getHostName())) {
|
||||||
String stanza = hostStanza(host, dnsDefaultATtl, domain.getTld());
|
String stanza = hostStanza(host, dnsDefaultATtl, domain.getTld());
|
||||||
if (!stanza.isEmpty()) {
|
if (!stanza.isEmpty()) {
|
||||||
emit(domain.getTld(), stanza);
|
emit(domain.getTld(), stanza);
|
||||||
|
@ -282,14 +282,14 @@ public class GenerateZoneFilesAction implements Runnable, JsonActionRunner.JsonA
|
||||||
Duration dnsDefaultNsTtl,
|
Duration dnsDefaultNsTtl,
|
||||||
Duration dnsDefaultDsTtl) {
|
Duration dnsDefaultDsTtl) {
|
||||||
StringBuilder result = new StringBuilder();
|
StringBuilder result = new StringBuilder();
|
||||||
String domainLabel = stripTld(domain.getFullyQualifiedDomainName(), domain.getTld());
|
String domainLabel = stripTld(domain.getDomainName(), domain.getTld());
|
||||||
for (HostResource nameserver : tm().load(domain.getNameservers())) {
|
for (HostResource nameserver : tm().load(domain.getNameservers())) {
|
||||||
result.append(String.format(
|
result.append(String.format(
|
||||||
NS_FORMAT,
|
NS_FORMAT,
|
||||||
domainLabel,
|
domainLabel,
|
||||||
dnsDefaultNsTtl.getStandardSeconds(),
|
dnsDefaultNsTtl.getStandardSeconds(),
|
||||||
// Load the nameservers at the export time in case they've been renamed or deleted.
|
// Load the nameservers at the export time in case they've been renamed or deleted.
|
||||||
loadAtPointInTime(nameserver, exportTime).now().getFullyQualifiedHostName()));
|
loadAtPointInTime(nameserver, exportTime).now().getHostName()));
|
||||||
}
|
}
|
||||||
for (DelegationSignerData dsData : domain.getDsData()) {
|
for (DelegationSignerData dsData : domain.getDsData()) {
|
||||||
result.append(
|
result.append(
|
||||||
|
@ -321,7 +321,7 @@ public class GenerateZoneFilesAction implements Runnable, JsonActionRunner.JsonA
|
||||||
String rrSetClass = (addr instanceof Inet4Address) ? "A" : "AAAA";
|
String rrSetClass = (addr instanceof Inet4Address) ? "A" : "AAAA";
|
||||||
result.append(String.format(
|
result.append(String.format(
|
||||||
A_FORMAT,
|
A_FORMAT,
|
||||||
stripTld(host.getFullyQualifiedHostName(), tld),
|
stripTld(host.getHostName(), tld),
|
||||||
dnsDefaultATtl.getStandardSeconds(),
|
dnsDefaultATtl.getStandardSeconds(),
|
||||||
rrSetClass,
|
rrSetClass,
|
||||||
addr.getHostAddress()));
|
addr.getHostAddress()));
|
||||||
|
|
|
@ -53,6 +53,6 @@ public final class ListHostsAction extends ListObjectsAction<HostResource> {
|
||||||
final DateTime now = clock.nowUtc();
|
final DateTime now = clock.nowUtc();
|
||||||
return Streams.stream(ofy().load().type(HostResource.class))
|
return Streams.stream(ofy().load().type(HostResource.class))
|
||||||
.filter(host -> EppResourceUtils.isActive(host, now))
|
.filter(host -> EppResourceUtils.isActive(host, now))
|
||||||
.collect(toImmutableSortedSet(comparing(HostResource::getFullyQualifiedHostName)));
|
.collect(toImmutableSortedSet(comparing(HostResource::getHostName)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,7 @@ public class RefreshDnsForAllDomainsAction implements Runnable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void map(final DomainBase domain) {
|
public void map(final DomainBase domain) {
|
||||||
String domainName = domain.getFullyQualifiedDomainName();
|
String domainName = domain.getDomainName();
|
||||||
if (tlds.contains(domain.getTld())) {
|
if (tlds.contains(domain.getTld())) {
|
||||||
if (isActive(domain, DateTime.now(DateTimeZone.UTC))) {
|
if (isActive(domain, DateTime.now(DateTimeZone.UTC))) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -65,7 +65,7 @@ public final class RegistryLockGetAction implements JsonGetAction {
|
||||||
private static final String LOCK_ENABLED_FOR_CONTACT_PARAM = "lockEnabledForContact";
|
private static final String LOCK_ENABLED_FOR_CONTACT_PARAM = "lockEnabledForContact";
|
||||||
private static final String EMAIL_PARAM = "email";
|
private static final String EMAIL_PARAM = "email";
|
||||||
private static final String LOCKS_PARAM = "locks";
|
private static final String LOCKS_PARAM = "locks";
|
||||||
private static final String FULLY_QUALIFIED_DOMAIN_NAME_PARAM = "fullyQualifiedDomainName";
|
private static final String DOMAIN_NAME_PARAM = "domainName";
|
||||||
private static final String LOCKED_TIME_PARAM = "lockedTime";
|
private static final String LOCKED_TIME_PARAM = "lockedTime";
|
||||||
private static final String LOCKED_BY_PARAM = "lockedBy";
|
private static final String LOCKED_BY_PARAM = "lockedBy";
|
||||||
private static final String IS_LOCK_PENDING_PARAM = "isLockPending";
|
private static final String IS_LOCK_PENDING_PARAM = "isLockPending";
|
||||||
|
@ -190,7 +190,7 @@ public final class RegistryLockGetAction implements JsonGetAction {
|
||||||
private ImmutableMap<String, ?> lockToMap(RegistryLock lock, boolean isAdmin) {
|
private ImmutableMap<String, ?> lockToMap(RegistryLock lock, boolean isAdmin) {
|
||||||
DateTime now = jpaTm().getTransactionTime();
|
DateTime now = jpaTm().getTransactionTime();
|
||||||
return new ImmutableMap.Builder<String, Object>()
|
return new ImmutableMap.Builder<String, Object>()
|
||||||
.put(FULLY_QUALIFIED_DOMAIN_NAME_PARAM, lock.getDomainName())
|
.put(DOMAIN_NAME_PARAM, lock.getDomainName())
|
||||||
.put(
|
.put(
|
||||||
LOCKED_TIME_PARAM, lock.getLockCompletionTimestamp().map(DateTime::toString).orElse(""))
|
LOCKED_TIME_PARAM, lock.getLockCompletionTimestamp().map(DateTime::toString).orElse(""))
|
||||||
.put(LOCKED_BY_PARAM, lock.isSuperuser() ? "admin" : lock.getRegistrarPocId())
|
.put(LOCKED_BY_PARAM, lock.isSuperuser() ? "admin" : lock.getRegistrarPocId())
|
||||||
|
|
|
@ -120,9 +120,7 @@ public class RegistryLockPostAction implements Runnable, JsonActionRunner.JsonAc
|
||||||
!Strings.isNullOrEmpty(postInput.clientId),
|
!Strings.isNullOrEmpty(postInput.clientId),
|
||||||
"Missing key for client: %s",
|
"Missing key for client: %s",
|
||||||
PARAM_CLIENT_ID);
|
PARAM_CLIENT_ID);
|
||||||
checkArgument(
|
checkArgument(!Strings.isNullOrEmpty(postInput.domainName), "Missing key for domainName");
|
||||||
!Strings.isNullOrEmpty(postInput.fullyQualifiedDomainName),
|
|
||||||
"Missing key for fullyQualifiedDomainName");
|
|
||||||
checkNotNull(postInput.isLock, "Missing key for isLock");
|
checkNotNull(postInput.isLock, "Missing key for isLock");
|
||||||
UserAuthInfo userAuthInfo =
|
UserAuthInfo userAuthInfo =
|
||||||
authResult
|
authResult
|
||||||
|
@ -136,12 +134,12 @@ public class RegistryLockPostAction implements Runnable, JsonActionRunner.JsonAc
|
||||||
RegistryLock registryLock =
|
RegistryLock registryLock =
|
||||||
postInput.isLock
|
postInput.isLock
|
||||||
? domainLockUtils.saveNewRegistryLockRequest(
|
? domainLockUtils.saveNewRegistryLockRequest(
|
||||||
postInput.fullyQualifiedDomainName,
|
postInput.domainName,
|
||||||
postInput.clientId,
|
postInput.clientId,
|
||||||
userEmail,
|
userEmail,
|
||||||
registrarAccessor.isAdmin())
|
registrarAccessor.isAdmin())
|
||||||
: domainLockUtils.saveNewRegistryUnlockRequest(
|
: domainLockUtils.saveNewRegistryUnlockRequest(
|
||||||
postInput.fullyQualifiedDomainName,
|
postInput.domainName,
|
||||||
postInput.clientId,
|
postInput.clientId,
|
||||||
registrarAccessor.isAdmin(),
|
registrarAccessor.isAdmin(),
|
||||||
Optional.ofNullable(postInput.relockDurationMillis).map(Duration::new));
|
Optional.ofNullable(postInput.relockDurationMillis).map(Duration::new));
|
||||||
|
@ -218,7 +216,7 @@ public class RegistryLockPostAction implements Runnable, JsonActionRunner.JsonAc
|
||||||
/** Value class that represents the expected input body from the UI request. */
|
/** Value class that represents the expected input body from the UI request. */
|
||||||
private static class RegistryLockPostInput {
|
private static class RegistryLockPostInput {
|
||||||
private String clientId;
|
private String clientId;
|
||||||
private String fullyQualifiedDomainName;
|
private String domainName;
|
||||||
private Boolean isLock;
|
private Boolean isLock;
|
||||||
private String password;
|
private String password;
|
||||||
private Long relockDurationMillis;
|
private Long relockDurationMillis;
|
||||||
|
|
|
@ -73,7 +73,7 @@ public final class RegistryLockVerifyAction extends HtmlAction {
|
||||||
}
|
}
|
||||||
data.put("isLock", isLock);
|
data.put("isLock", isLock);
|
||||||
data.put("success", true);
|
data.put("success", true);
|
||||||
data.put("fullyQualifiedDomainName", resultLock.getDomainName());
|
data.put("domainName", resultLock.getDomainName());
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
logger.atWarning().withCause(t).log(
|
logger.atWarning().withCause(t).log(
|
||||||
"Error when verifying verification code %s", lockVerificationCode);
|
"Error when verifying verification code %s", lockVerificationCode);
|
||||||
|
|
|
@ -90,7 +90,7 @@ final class DomainWhoisResponse extends WhoisResponseImpl {
|
||||||
new DomainEmitter()
|
new DomainEmitter()
|
||||||
.emitField(
|
.emitField(
|
||||||
"Domain Name",
|
"Domain Name",
|
||||||
maybeFormatHostname(domain.getFullyQualifiedDomainName(), preferUnicode))
|
maybeFormatHostname(domain.getDomainName(), preferUnicode))
|
||||||
.emitField("Registry Domain ID", domain.getRepoId())
|
.emitField("Registry Domain ID", domain.getRepoId())
|
||||||
.emitField("Registrar WHOIS Server", registrar.getWhoisServer())
|
.emitField("Registrar WHOIS Server", registrar.getWhoisServer())
|
||||||
.emitField("Registrar URL", registrar.getUrl())
|
.emitField("Registrar URL", registrar.getUrl())
|
||||||
|
@ -115,7 +115,7 @@ final class DomainWhoisResponse extends WhoisResponseImpl {
|
||||||
.emitContact("Billing", getContactReference(Type.BILLING), preferUnicode)
|
.emitContact("Billing", getContactReference(Type.BILLING), preferUnicode)
|
||||||
.emitSet(
|
.emitSet(
|
||||||
"Name Server",
|
"Name Server",
|
||||||
domain.loadNameserverFullyQualifiedHostNames(),
|
domain.loadNameserverHostNames(),
|
||||||
hostName -> maybeFormatHostname(hostName, preferUnicode))
|
hostName -> maybeFormatHostname(hostName, preferUnicode))
|
||||||
.emitField(
|
.emitField(
|
||||||
"DNSSEC", isNullOrEmpty(domain.getDsData()) ? "unsigned" : "signedDelegation")
|
"DNSSEC", isNullOrEmpty(domain.getDsData()) ? "unsigned" : "signedDelegation")
|
||||||
|
@ -160,7 +160,7 @@ final class DomainWhoisResponse extends WhoisResponseImpl {
|
||||||
if (contactResource == null) {
|
if (contactResource == null) {
|
||||||
logger.atSevere().log(
|
logger.atSevere().log(
|
||||||
"(BUG) Broken reference found from domain %s to contact %s",
|
"(BUG) Broken reference found from domain %s to contact %s",
|
||||||
domain.getFullyQualifiedDomainName(), contact);
|
domain.getDomainName(), contact);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
PostalInfo postalInfo =
|
PostalInfo postalInfo =
|
||||||
|
|
|
@ -52,7 +52,7 @@ final class NameserverLookupByIpCommand implements WhoisCommand {
|
||||||
.filter(
|
.filter(
|
||||||
host ->
|
host ->
|
||||||
Registries.findTldForName(
|
Registries.findTldForName(
|
||||||
InternetDomainName.from(host.getFullyQualifiedHostName()))
|
InternetDomainName.from(host.getHostName()))
|
||||||
.isPresent())
|
.isPresent())
|
||||||
.collect(toImmutableList());
|
.collect(toImmutableList());
|
||||||
if (hosts.isEmpty()) {
|
if (hosts.isEmpty()) {
|
||||||
|
|
|
@ -57,7 +57,7 @@ final class NameserverWhoisResponse extends WhoisResponseImpl {
|
||||||
checkState(registrar.isPresent(), "Could not load registrar %s", clientId);
|
checkState(registrar.isPresent(), "Could not load registrar %s", clientId);
|
||||||
emitter
|
emitter
|
||||||
.emitField(
|
.emitField(
|
||||||
"Server Name", maybeFormatHostname(host.getFullyQualifiedHostName(), preferUnicode))
|
"Server Name", maybeFormatHostname(host.getHostName(), preferUnicode))
|
||||||
.emitSet("IP Address", host.getInetAddresses(), InetAddresses::toAddrString)
|
.emitSet("IP Address", host.getInetAddresses(), InetAddresses::toAddrString)
|
||||||
.emitField("Registrar", registrar.get().getRegistrarName())
|
.emitField("Registrar", registrar.get().getRegistrarName())
|
||||||
.emitField("Registrar WHOIS Server", registrar.get().getWhoisServer())
|
.emitField("Registrar WHOIS Server", registrar.get().getWhoisServer())
|
||||||
|
|
|
@ -34,7 +34,7 @@ registry.json.locks = {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {{
|
* @typedef {{
|
||||||
* fullyQualifiedDomainName: string,
|
* domainName: string,
|
||||||
* lockedTime: string,
|
* lockedTime: string,
|
||||||
* lockedBy: string,
|
* lockedBy: string,
|
||||||
* userCanUnlock: boolean,
|
* userCanUnlock: boolean,
|
||||||
|
|
|
@ -173,7 +173,7 @@ registry.registrar.RegistryLock.prototype.lockOrUnlockDomain_ = function(isLock,
|
||||||
'POST',
|
'POST',
|
||||||
goog.json.serialize({
|
goog.json.serialize({
|
||||||
'clientId': this.clientId,
|
'clientId': this.clientId,
|
||||||
'fullyQualifiedDomainName': domain,
|
'domainName': domain,
|
||||||
'isLock': isLock,
|
'isLock': isLock,
|
||||||
'password': password,
|
'password': password,
|
||||||
'relockDurationMillis': relockDuration
|
'relockDurationMillis': relockDuration
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
{template .locksContent}
|
{template .locksContent}
|
||||||
{@param email: string}
|
{@param email: string}
|
||||||
{@param locks: list<[fullyQualifiedDomainName: string, lockedTime: string, lockedBy: string,
|
{@param locks: list<[domainName: string, lockedTime: string, lockedBy: string,
|
||||||
userCanUnlock: bool, isLockPending: bool, isUnlockPending: bool]>}
|
userCanUnlock: bool, isLockPending: bool, isUnlockPending: bool]>}
|
||||||
{@param lockEnabledForContact: bool}
|
{@param lockEnabledForContact: bool}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
|
|
||||||
/** Table that displays existing locks for this registrar. */
|
/** Table that displays existing locks for this registrar. */
|
||||||
{template .existingLocksTable}
|
{template .existingLocksTable}
|
||||||
{@param locks: list<[fullyQualifiedDomainName: string, lockedTime: string, lockedBy: string,
|
{@param locks: list<[domainName: string, lockedTime: string, lockedBy: string,
|
||||||
userCanUnlock: bool, isLockPending: bool, isUnlockPending: bool]>}
|
userCanUnlock: bool, isLockPending: bool, isUnlockPending: bool]>}
|
||||||
{@param lockEnabledForContact: bool}
|
{@param lockEnabledForContact: bool}
|
||||||
<h2>Existing locks</h2>
|
<h2>Existing locks</h2>
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
{for $lock in $locks}
|
{for $lock in $locks}
|
||||||
<tr class="{css('registry-locks-table-row')}">
|
<tr class="{css('registry-locks-table-row')}">
|
||||||
<td>{$lock.fullyQualifiedDomainName}
|
<td>{$lock.domainName}
|
||||||
{if $lock.isLockPending}<i> (pending)</i>
|
{if $lock.isLockPending}<i> (pending)</i>
|
||||||
{elseif $lock.isUnlockPending}<i> (unlock pending)</i>
|
{elseif $lock.isUnlockPending}<i> (unlock pending)</i>
|
||||||
{/if}</td>
|
{/if}</td>
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
<td>{$lock.lockedBy}</td>
|
<td>{$lock.lockedBy}</td>
|
||||||
<td>
|
<td>
|
||||||
{if not $lock.isLockPending and not $lock.isUnlockPending}
|
{if not $lock.isLockPending and not $lock.isUnlockPending}
|
||||||
<button id="button-unlock-{$lock.fullyQualifiedDomainName}"
|
<button id="button-unlock-{$lock.domainName}"
|
||||||
{if $lockEnabledForContact and $lock.userCanUnlock}
|
{if $lockEnabledForContact and $lock.userCanUnlock}
|
||||||
class="domain-unlock-button {css('kd-button')} {css('kd-button-submit')}"
|
class="domain-unlock-button {css('kd-button')} {css('kd-button-submit')}"
|
||||||
{else}
|
{else}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
{@param success: bool}
|
{@param success: bool}
|
||||||
{@param? errorMessage: string}
|
{@param? errorMessage: string}
|
||||||
{@param? isLock: bool}
|
{@param? isLock: bool}
|
||||||
{@param? fullyQualifiedDomainName: string}
|
{@param? domainName: string}
|
||||||
{call registry.soy.console.header}
|
{call registry.soy.console.header}
|
||||||
{param app: 'registrar' /}
|
{param app: 'registrar' /}
|
||||||
{param subtitle: 'Verify Registry Lock' /}
|
{param subtitle: 'Verify Registry Lock' /}
|
||||||
|
@ -63,9 +63,9 @@
|
||||||
*/
|
*/
|
||||||
{template .success}
|
{template .success}
|
||||||
{@param? isLock: bool}
|
{@param? isLock: bool}
|
||||||
{@param? fullyQualifiedDomainName: string}
|
{@param? domainName: string}
|
||||||
<h3>
|
<h3>
|
||||||
Success: {if $isLock}lock{else}unlock{/if} has been applied to {$fullyQualifiedDomainName}
|
Success: {if $isLock}lock{else}unlock{/if} has been applied to {$domainName}
|
||||||
</h3>
|
</h3>
|
||||||
{/template}
|
{/template}
|
||||||
|
|
||||||
|
|
|
@ -910,7 +910,7 @@ public class DeleteContactsAndHostsActionTest
|
||||||
String expectedResourceName;
|
String expectedResourceName;
|
||||||
if (resource instanceof HostResource) {
|
if (resource instanceof HostResource) {
|
||||||
assertThat(responseData).isInstanceOf(HostPendingActionNotificationResponse.class);
|
assertThat(responseData).isInstanceOf(HostPendingActionNotificationResponse.class);
|
||||||
expectedResourceName = ((HostResource) resource).getFullyQualifiedHostName();
|
expectedResourceName = ((HostResource) resource).getHostName();
|
||||||
} else {
|
} else {
|
||||||
assertThat(responseData).isInstanceOf(ContactPendingActionNotificationResponse.class);
|
assertThat(responseData).isInstanceOf(ContactPendingActionNotificationResponse.class);
|
||||||
expectedResourceName = ((ContactResource) resource).getContactId();
|
expectedResourceName = ((ContactResource) resource).getContactId();
|
||||||
|
|
|
@ -98,7 +98,7 @@ public class ExpandRecurringBillingEventsActionTest
|
||||||
.setId(2L)
|
.setId(2L)
|
||||||
.setReason(Reason.RENEW)
|
.setReason(Reason.RENEW)
|
||||||
.setRecurrenceEndTime(END_OF_TIME)
|
.setRecurrenceEndTime(END_OF_TIME)
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ public class ExpandRecurringBillingEventsActionTest
|
||||||
.setReason(Reason.RENEW)
|
.setReason(Reason.RENEW)
|
||||||
.setSyntheticCreationTime(beginningOfTest)
|
.setSyntheticCreationTime(beginningOfTest)
|
||||||
.setCancellationMatchingBillingEvent(recurring.createVKey())
|
.setCancellationMatchingBillingEvent(recurring.createVKey())
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName());
|
.setTargetId(domain.getDomainName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -187,7 +187,7 @@ public class ExpandRecurringBillingEventsActionTest
|
||||||
.setId(2L)
|
.setId(2L)
|
||||||
.setReason(Reason.RENEW)
|
.setReason(Reason.RENEW)
|
||||||
.setRecurrenceEndTime(deletionTime)
|
.setRecurrenceEndTime(deletionTime)
|
||||||
.setTargetId(deletedDomain.getFullyQualifiedDomainName())
|
.setTargetId(deletedDomain.getDomainName())
|
||||||
.build());
|
.build());
|
||||||
action.cursorTimeParam = Optional.of(START_OF_TIME);
|
action.cursorTimeParam = Optional.of(START_OF_TIME);
|
||||||
runMapreduce();
|
runMapreduce();
|
||||||
|
@ -197,7 +197,7 @@ public class ExpandRecurringBillingEventsActionTest
|
||||||
true);
|
true);
|
||||||
BillingEvent.OneTime expected = defaultOneTimeBuilder()
|
BillingEvent.OneTime expected = defaultOneTimeBuilder()
|
||||||
.setParent(persistedEntry)
|
.setParent(persistedEntry)
|
||||||
.setTargetId(deletedDomain.getFullyQualifiedDomainName())
|
.setTargetId(deletedDomain.getDomainName())
|
||||||
.build();
|
.build();
|
||||||
assertBillingEventsForResource(deletedDomain, expected, recurring);
|
assertBillingEventsForResource(deletedDomain, expected, recurring);
|
||||||
assertCursorAt(beginningOfTest);
|
assertCursorAt(beginningOfTest);
|
||||||
|
|
|
@ -141,7 +141,7 @@ public class BackupTestStoreTest {
|
||||||
loadPropertyFromExportedEntities(
|
loadPropertyFromExportedEntities(
|
||||||
new File(exportFolder, "/all_namespaces/kind_DomainBase/input-0"),
|
new File(exportFolder, "/all_namespaces/kind_DomainBase/input-0"),
|
||||||
DomainBase.class,
|
DomainBase.class,
|
||||||
DomainBase::getFullyQualifiedDomainName);
|
DomainBase::getDomainName);
|
||||||
assertThat(domainStrings).containsExactly("domain1.tld1");
|
assertThat(domainStrings).containsExactly("domain1.tld1");
|
||||||
ImmutableList<String> contactIds =
|
ImmutableList<String> contactIds =
|
||||||
loadPropertyFromExportedEntities(
|
loadPropertyFromExportedEntities(
|
||||||
|
|
|
@ -104,7 +104,7 @@ public class EppCommitLogsTest extends ShardableTestCase {
|
||||||
ofy().clearSessionCache();
|
ofy().clearSessionCache();
|
||||||
Key<DomainBase> key = Key.create(ofy().load().type(DomainBase.class).first().now());
|
Key<DomainBase> key = Key.create(ofy().load().type(DomainBase.class).first().now());
|
||||||
DomainBase domainAfterCreate = ofy().load().key(key).now();
|
DomainBase domainAfterCreate = ofy().load().key(key).now();
|
||||||
assertThat(domainAfterCreate.getFullyQualifiedDomainName()).isEqualTo("example.tld");
|
assertThat(domainAfterCreate.getDomainName()).isEqualTo("example.tld");
|
||||||
|
|
||||||
clock.advanceBy(standardDays(2));
|
clock.advanceBy(standardDays(2));
|
||||||
DateTime timeAtFirstUpdate = clock.nowUtc();
|
DateTime timeAtFirstUpdate = clock.nowUtc();
|
||||||
|
|
|
@ -280,7 +280,7 @@ public class EppTestCase extends ShardableTestCase {
|
||||||
DomainBase domain, DateTime createTime) {
|
DomainBase domain, DateTime createTime) {
|
||||||
return new BillingEvent.OneTime.Builder()
|
return new BillingEvent.OneTime.Builder()
|
||||||
.setReason(Reason.CREATE)
|
.setReason(Reason.CREATE)
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setClientId(domain.getCurrentSponsorClientId())
|
.setClientId(domain.getCurrentSponsorClientId())
|
||||||
.setCost(Money.parse("USD 26.00"))
|
.setCost(Money.parse("USD 26.00"))
|
||||||
.setPeriodYears(2)
|
.setPeriodYears(2)
|
||||||
|
@ -295,7 +295,7 @@ public class EppTestCase extends ShardableTestCase {
|
||||||
DomainBase domain, DateTime renewTime) {
|
DomainBase domain, DateTime renewTime) {
|
||||||
return new BillingEvent.OneTime.Builder()
|
return new BillingEvent.OneTime.Builder()
|
||||||
.setReason(Reason.RENEW)
|
.setReason(Reason.RENEW)
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setClientId(domain.getCurrentSponsorClientId())
|
.setClientId(domain.getCurrentSponsorClientId())
|
||||||
.setCost(Money.parse("USD 33.00"))
|
.setCost(Money.parse("USD 33.00"))
|
||||||
.setPeriodYears(3)
|
.setPeriodYears(3)
|
||||||
|
@ -325,7 +325,7 @@ public class EppTestCase extends ShardableTestCase {
|
||||||
return new BillingEvent.Recurring.Builder()
|
return new BillingEvent.Recurring.Builder()
|
||||||
.setReason(Reason.RENEW)
|
.setReason(Reason.RENEW)
|
||||||
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
|
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setClientId(domain.getCurrentSponsorClientId())
|
.setClientId(domain.getCurrentSponsorClientId())
|
||||||
.setEventTime(eventTime)
|
.setEventTime(eventTime)
|
||||||
.setRecurrenceEndTime(endTime)
|
.setRecurrenceEndTime(endTime)
|
||||||
|
@ -337,7 +337,7 @@ public class EppTestCase extends ShardableTestCase {
|
||||||
protected static BillingEvent.Cancellation makeCancellationBillingEventForCreate(
|
protected static BillingEvent.Cancellation makeCancellationBillingEventForCreate(
|
||||||
DomainBase domain, OneTime billingEventToCancel, DateTime createTime, DateTime deleteTime) {
|
DomainBase domain, OneTime billingEventToCancel, DateTime createTime, DateTime deleteTime) {
|
||||||
return new BillingEvent.Cancellation.Builder()
|
return new BillingEvent.Cancellation.Builder()
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setClientId(domain.getCurrentSponsorClientId())
|
.setClientId(domain.getCurrentSponsorClientId())
|
||||||
.setEventTime(deleteTime)
|
.setEventTime(deleteTime)
|
||||||
.setOneTimeEventKey(
|
.setOneTimeEventKey(
|
||||||
|
@ -352,7 +352,7 @@ public class EppTestCase extends ShardableTestCase {
|
||||||
protected static BillingEvent.Cancellation makeCancellationBillingEventForRenew(
|
protected static BillingEvent.Cancellation makeCancellationBillingEventForRenew(
|
||||||
DomainBase domain, OneTime billingEventToCancel, DateTime renewTime, DateTime deleteTime) {
|
DomainBase domain, OneTime billingEventToCancel, DateTime renewTime, DateTime deleteTime) {
|
||||||
return new BillingEvent.Cancellation.Builder()
|
return new BillingEvent.Cancellation.Builder()
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setClientId(domain.getCurrentSponsorClientId())
|
.setClientId(domain.getCurrentSponsorClientId())
|
||||||
.setEventTime(deleteTime)
|
.setEventTime(deleteTime)
|
||||||
.setOneTimeEventKey(
|
.setOneTimeEventKey(
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class TestDomainCreateFlowCustomLogic extends DomainCreateFlowCustomLogic
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EntityChanges beforeSave(BeforeSaveParameters parameters) {
|
public EntityChanges beforeSave(BeforeSaveParameters parameters) {
|
||||||
if (parameters.newDomain().getFullyQualifiedDomainName().startsWith("custom-logic-test")) {
|
if (parameters.newDomain().getDomainName().startsWith("custom-logic-test")) {
|
||||||
PollMessage extraPollMessage =
|
PollMessage extraPollMessage =
|
||||||
new PollMessage.OneTime.Builder()
|
new PollMessage.OneTime.Builder()
|
||||||
.setParent(parameters.historyEntry())
|
.setParent(parameters.historyEntry())
|
||||||
|
|
|
@ -314,7 +314,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
assertPollMessagesForResource(
|
assertPollMessagesForResource(
|
||||||
domain,
|
domain,
|
||||||
new PollMessage.Autorenew.Builder()
|
new PollMessage.Autorenew.Builder()
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setClientId("TheRegistrar")
|
.setClientId("TheRegistrar")
|
||||||
.setEventTime(domain.getRegistrationExpirationTime())
|
.setEventTime(domain.getRegistrationExpirationTime())
|
||||||
.setMsg("Domain was auto-renewed.")
|
.setMsg("Domain was auto-renewed.")
|
||||||
|
@ -1431,7 +1431,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
assertPollMessagesForResource(
|
assertPollMessagesForResource(
|
||||||
domain,
|
domain,
|
||||||
new PollMessage.Autorenew.Builder()
|
new PollMessage.Autorenew.Builder()
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setClientId("TheRegistrar")
|
.setClientId("TheRegistrar")
|
||||||
.setEventTime(domain.getRegistrationExpirationTime())
|
.setEventTime(domain.getRegistrationExpirationTime())
|
||||||
.setMsg("Domain was auto-renewed.")
|
.setMsg("Domain was auto-renewed.")
|
||||||
|
@ -1445,7 +1445,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
.setResponseData(
|
.setResponseData(
|
||||||
ImmutableList.of(
|
ImmutableList.of(
|
||||||
DomainPendingActionNotificationResponse.create(
|
DomainPendingActionNotificationResponse.create(
|
||||||
domain.getFullyQualifiedDomainName(),
|
domain.getDomainName(),
|
||||||
true,
|
true,
|
||||||
historyEntry.getTrid(),
|
historyEntry.getTrid(),
|
||||||
clock.nowUtc())))
|
clock.nowUtc())))
|
||||||
|
@ -1585,7 +1585,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
assertPollMessagesForResource(
|
assertPollMessagesForResource(
|
||||||
domain,
|
domain,
|
||||||
new PollMessage.Autorenew.Builder()
|
new PollMessage.Autorenew.Builder()
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setClientId("TheRegistrar")
|
.setClientId("TheRegistrar")
|
||||||
.setEventTime(domain.getRegistrationExpirationTime())
|
.setEventTime(domain.getRegistrationExpirationTime())
|
||||||
.setMsg("Domain was auto-renewed.")
|
.setMsg("Domain was auto-renewed.")
|
||||||
|
|
|
@ -782,7 +782,7 @@ public class DomainDeleteFlowTest extends ResourceFlowTestCase<DomainDeleteFlow,
|
||||||
.setSuperordinateDomain(reloadResourceByForeignKey().createVKey())
|
.setSuperordinateDomain(reloadResourceByForeignKey().createVKey())
|
||||||
.build());
|
.build());
|
||||||
persistResource(
|
persistResource(
|
||||||
domain.asBuilder().addSubordinateHost(subordinateHost.getFullyQualifiedHostName()).build());
|
domain.asBuilder().addSubordinateHost(subordinateHost.getHostName()).build());
|
||||||
EppException thrown = assertThrows(DomainToDeleteHasHostsException.class, this::runFlow);
|
EppException thrown = assertThrows(DomainToDeleteHasHostsException.class, this::runFlow);
|
||||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,7 +103,7 @@ public class DomainInfoFlowTest extends ResourceFlowTestCase<DomainInfoFlow, Dom
|
||||||
domain =
|
domain =
|
||||||
persistResource(
|
persistResource(
|
||||||
new DomainBase.Builder()
|
new DomainBase.Builder()
|
||||||
.setFullyQualifiedDomainName(domainName)
|
.setDomainName(domainName)
|
||||||
.setRepoId("2FF-TLD")
|
.setRepoId("2FF-TLD")
|
||||||
.setPersistedCurrentSponsorClientId("NewRegistrar")
|
.setPersistedCurrentSponsorClientId("NewRegistrar")
|
||||||
.setCreationClientId("TheRegistrar")
|
.setCreationClientId("TheRegistrar")
|
||||||
|
@ -128,7 +128,7 @@ public class DomainInfoFlowTest extends ResourceFlowTestCase<DomainInfoFlow, Dom
|
||||||
host3 =
|
host3 =
|
||||||
persistResource(
|
persistResource(
|
||||||
new HostResource.Builder()
|
new HostResource.Builder()
|
||||||
.setFullyQualifiedHostName("ns2.example.tld")
|
.setHostName("ns2.example.tld")
|
||||||
.setRepoId("3FF-TLD")
|
.setRepoId("3FF-TLD")
|
||||||
.setSuperordinateDomain(domain.createVKey())
|
.setSuperordinateDomain(domain.createVKey())
|
||||||
.build());
|
.build());
|
||||||
|
@ -139,7 +139,7 @@ public class DomainInfoFlowTest extends ResourceFlowTestCase<DomainInfoFlow, Dom
|
||||||
.asBuilder()
|
.asBuilder()
|
||||||
.setSubordinateHosts(
|
.setSubordinateHosts(
|
||||||
ImmutableSet.of(
|
ImmutableSet.of(
|
||||||
host1.getFullyQualifiedHostName(), host3.getFullyQualifiedHostName()))
|
host1.getHostName(), host3.getHostName()))
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -258,7 +258,7 @@ public class DomainTransferApproveFlowTest
|
||||||
OneTime transferBillingEvent =
|
OneTime transferBillingEvent =
|
||||||
new BillingEvent.OneTime.Builder()
|
new BillingEvent.OneTime.Builder()
|
||||||
.setReason(Reason.TRANSFER)
|
.setReason(Reason.TRANSFER)
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setEventTime(clock.nowUtc())
|
.setEventTime(clock.nowUtc())
|
||||||
.setBillingTime(clock.nowUtc().plus(registry.getTransferGracePeriodLength()))
|
.setBillingTime(clock.nowUtc().plus(registry.getTransferGracePeriodLength()))
|
||||||
.setClientId("NewRegistrar")
|
.setClientId("NewRegistrar")
|
||||||
|
|
|
@ -112,7 +112,7 @@ public class DomainTransferFlowTestCase<F extends Flow, R extends EppResource>
|
||||||
persistResource(
|
persistResource(
|
||||||
new HostResource.Builder()
|
new HostResource.Builder()
|
||||||
.setRepoId("2-".concat(Ascii.toUpperCase(tld)))
|
.setRepoId("2-".concat(Ascii.toUpperCase(tld)))
|
||||||
.setFullyQualifiedHostName("ns1." + label + "." + tld)
|
.setHostName("ns1." + label + "." + tld)
|
||||||
.setPersistedCurrentSponsorClientId("TheRegistrar")
|
.setPersistedCurrentSponsorClientId("TheRegistrar")
|
||||||
.setCreationClientId("TheRegistrar")
|
.setCreationClientId("TheRegistrar")
|
||||||
.setCreationTimeForTest(DateTime.parse("1999-04-03T22:00:00.0Z"))
|
.setCreationTimeForTest(DateTime.parse("1999-04-03T22:00:00.0Z"))
|
||||||
|
@ -122,7 +122,7 @@ public class DomainTransferFlowTestCase<F extends Flow, R extends EppResource>
|
||||||
persistResource(
|
persistResource(
|
||||||
domain
|
domain
|
||||||
.asBuilder()
|
.asBuilder()
|
||||||
.addSubordinateHost(subordinateHost.getFullyQualifiedHostName())
|
.addSubordinateHost(subordinateHost.getHostName())
|
||||||
.build());
|
.build());
|
||||||
historyEntryDomainCreate = getOnlyHistoryEntryOfType(domain, DOMAIN_CREATE);
|
historyEntryDomainCreate = getOnlyHistoryEntryOfType(domain, DOMAIN_CREATE);
|
||||||
}
|
}
|
||||||
|
@ -142,7 +142,7 @@ public class DomainTransferFlowTestCase<F extends Flow, R extends EppResource>
|
||||||
return new BillingEvent.Recurring.Builder()
|
return new BillingEvent.Recurring.Builder()
|
||||||
.setReason(Reason.RENEW)
|
.setReason(Reason.RENEW)
|
||||||
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
|
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setClientId("TheRegistrar")
|
.setClientId("TheRegistrar")
|
||||||
.setEventTime(REGISTRATION_EXPIRATION_TIME)
|
.setEventTime(REGISTRATION_EXPIRATION_TIME)
|
||||||
.setRecurrenceEndTime(TRANSFER_EXPIRATION_TIME)
|
.setRecurrenceEndTime(TRANSFER_EXPIRATION_TIME)
|
||||||
|
@ -155,7 +155,7 @@ public class DomainTransferFlowTestCase<F extends Flow, R extends EppResource>
|
||||||
return new BillingEvent.Recurring.Builder()
|
return new BillingEvent.Recurring.Builder()
|
||||||
.setReason(Reason.RENEW)
|
.setReason(Reason.RENEW)
|
||||||
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
|
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setClientId("NewRegistrar")
|
.setClientId("NewRegistrar")
|
||||||
.setEventTime(EXTENDED_REGISTRATION_EXPIRATION_TIME)
|
.setEventTime(EXTENDED_REGISTRATION_EXPIRATION_TIME)
|
||||||
.setRecurrenceEndTime(END_OF_TIME)
|
.setRecurrenceEndTime(END_OF_TIME)
|
||||||
|
|
|
@ -252,7 +252,7 @@ public class DomainTransferRequestFlowTest
|
||||||
Optional.of(
|
Optional.of(
|
||||||
new BillingEvent.OneTime.Builder()
|
new BillingEvent.OneTime.Builder()
|
||||||
.setReason(Reason.TRANSFER)
|
.setReason(Reason.TRANSFER)
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setEventTime(implicitTransferTime)
|
.setEventTime(implicitTransferTime)
|
||||||
.setBillingTime(
|
.setBillingTime(
|
||||||
implicitTransferTime.plus(registry.getTransferGracePeriodLength()))
|
implicitTransferTime.plus(registry.getTransferGracePeriodLength()))
|
||||||
|
@ -594,7 +594,7 @@ public class DomainTransferRequestFlowTest
|
||||||
// The transfer is going to happen immediately. To observe the domain in the pending transfer
|
// The transfer is going to happen immediately. To observe the domain in the pending transfer
|
||||||
// state, grab it directly from the database.
|
// state, grab it directly from the database.
|
||||||
domain = Iterables.getOnlyElement(ofy().load().type(DomainBase.class).list());
|
domain = Iterables.getOnlyElement(ofy().load().type(DomainBase.class).list());
|
||||||
assertThat(domain.getFullyQualifiedDomainName()).isEqualTo("example.tld");
|
assertThat(domain.getDomainName()).isEqualTo("example.tld");
|
||||||
} else {
|
} else {
|
||||||
// Transfer should have been requested.
|
// Transfer should have been requested.
|
||||||
domain = reloadResourceByForeignKey();
|
domain = reloadResourceByForeignKey();
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class HostInfoFlowTest extends ResourceFlowTestCase<HostInfoFlow, HostRes
|
||||||
private HostResource persistHostResource() throws Exception {
|
private HostResource persistHostResource() throws Exception {
|
||||||
return persistResource(
|
return persistResource(
|
||||||
new HostResource.Builder()
|
new HostResource.Builder()
|
||||||
.setFullyQualifiedHostName(getUniqueIdFromCommand())
|
.setHostName(getUniqueIdFromCommand())
|
||||||
.setRepoId("1FF-FOOBAR")
|
.setRepoId("1FF-FOOBAR")
|
||||||
.setPersistedCurrentSponsorClientId("my sponsor")
|
.setPersistedCurrentSponsorClientId("my sponsor")
|
||||||
.setStatusValues(ImmutableSet.of(StatusValue.CLIENT_UPDATE_PROHIBITED))
|
.setStatusValues(ImmutableSet.of(StatusValue.CLIENT_UPDATE_PROHIBITED))
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class DomainBaseSqlTest {
|
||||||
|
|
||||||
domain =
|
domain =
|
||||||
new DomainBase.Builder()
|
new DomainBase.Builder()
|
||||||
.setFullyQualifiedDomainName("example.com")
|
.setDomainName("example.com")
|
||||||
.setRepoId("4-COM")
|
.setRepoId("4-COM")
|
||||||
.setCreationClientId("registrar1")
|
.setCreationClientId("registrar1")
|
||||||
.setLastEppUpdateTime(fakeClock.nowUtc())
|
.setLastEppUpdateTime(fakeClock.nowUtc())
|
||||||
|
@ -105,7 +105,7 @@ public class DomainBaseSqlTest {
|
||||||
host =
|
host =
|
||||||
new HostResource.Builder()
|
new HostResource.Builder()
|
||||||
.setRepoId("host1")
|
.setRepoId("host1")
|
||||||
.setFullyQualifiedHostName("ns1.example.com")
|
.setHostName("ns1.example.com")
|
||||||
.setCreationClientId("registrar1")
|
.setCreationClientId("registrar1")
|
||||||
.setPersistedCurrentSponsorClientId("registrar2")
|
.setPersistedCurrentSponsorClientId("registrar2")
|
||||||
.build();
|
.build();
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class DomainBaseTest extends EntityTestCase {
|
||||||
VKey<HostResource> hostKey =
|
VKey<HostResource> hostKey =
|
||||||
persistResource(
|
persistResource(
|
||||||
new HostResource.Builder()
|
new HostResource.Builder()
|
||||||
.setFullyQualifiedHostName("ns1.example.com")
|
.setHostName("ns1.example.com")
|
||||||
.setSuperordinateDomain(VKey.createOfy(DomainBase.class, domainKey))
|
.setSuperordinateDomain(VKey.createOfy(DomainBase.class, domainKey))
|
||||||
.setRepoId("1-COM")
|
.setRepoId("1-COM")
|
||||||
.build())
|
.build())
|
||||||
|
@ -107,7 +107,7 @@ public class DomainBaseTest extends EntityTestCase {
|
||||||
persistResource(
|
persistResource(
|
||||||
cloneAndSetAutoTimestamps(
|
cloneAndSetAutoTimestamps(
|
||||||
new DomainBase.Builder()
|
new DomainBase.Builder()
|
||||||
.setFullyQualifiedDomainName("example.com")
|
.setDomainName("example.com")
|
||||||
.setRepoId("4-COM")
|
.setRepoId("4-COM")
|
||||||
.setCreationClientId("a registrar")
|
.setCreationClientId("a registrar")
|
||||||
.setLastEppUpdateTime(fakeClock.nowUtc())
|
.setLastEppUpdateTime(fakeClock.nowUtc())
|
||||||
|
@ -611,7 +611,7 @@ public class DomainBaseTest extends EntityTestCase {
|
||||||
IllegalArgumentException thrown =
|
IllegalArgumentException thrown =
|
||||||
assertThrows(
|
assertThrows(
|
||||||
IllegalArgumentException.class,
|
IllegalArgumentException.class,
|
||||||
() -> domain.asBuilder().setFullyQualifiedDomainName("AAA.BBB"));
|
() -> domain.asBuilder().setDomainName("AAA.BBB"));
|
||||||
assertThat(thrown)
|
assertThat(thrown)
|
||||||
.hasMessageThat()
|
.hasMessageThat()
|
||||||
.contains("Domain name must be in puny-coded, lower-case form");
|
.contains("Domain name must be in puny-coded, lower-case form");
|
||||||
|
@ -622,7 +622,7 @@ public class DomainBaseTest extends EntityTestCase {
|
||||||
IllegalArgumentException thrown =
|
IllegalArgumentException thrown =
|
||||||
assertThrows(
|
assertThrows(
|
||||||
IllegalArgumentException.class,
|
IllegalArgumentException.class,
|
||||||
() -> domain.asBuilder().setFullyQualifiedDomainName("みんな.みんな"));
|
() -> domain.asBuilder().setDomainName("みんな.みんな"));
|
||||||
assertThat(thrown)
|
assertThat(thrown)
|
||||||
.hasMessageThat()
|
.hasMessageThat()
|
||||||
.contains("Domain name must be in puny-coded, lower-case form");
|
.contains("Domain name must be in puny-coded, lower-case form");
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class HostHistoryTest extends EntityTestCase {
|
||||||
HostResource host =
|
HostResource host =
|
||||||
new HostResource.Builder()
|
new HostResource.Builder()
|
||||||
.setRepoId("host1")
|
.setRepoId("host1")
|
||||||
.setFullyQualifiedHostName("ns1.example.com")
|
.setHostName("ns1.example.com")
|
||||||
.setCreationClientId("TheRegistrar")
|
.setCreationClientId("TheRegistrar")
|
||||||
.setPersistedCurrentSponsorClientId("TheRegistrar")
|
.setPersistedCurrentSponsorClientId("TheRegistrar")
|
||||||
.setInetAddresses(ImmutableSet.of())
|
.setInetAddresses(ImmutableSet.of())
|
||||||
|
@ -81,7 +81,7 @@ public class HostHistoryTest extends EntityTestCase {
|
||||||
assertThat(one.getReason()).isEqualTo(two.getReason());
|
assertThat(one.getReason()).isEqualTo(two.getReason());
|
||||||
assertThat(one.getTrid()).isEqualTo(two.getTrid());
|
assertThat(one.getTrid()).isEqualTo(two.getTrid());
|
||||||
assertThat(one.getType()).isEqualTo(two.getType());
|
assertThat(one.getType()).isEqualTo(two.getType());
|
||||||
assertThat(one.getHostBase().getFullyQualifiedHostName())
|
assertThat(one.getHostBase().getHostName())
|
||||||
.isEqualTo(two.getHostBase().getFullyQualifiedHostName());
|
.isEqualTo(two.getHostBase().getHostName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ public class HostResourceTest extends EntityTestCase {
|
||||||
cloneAndSetAutoTimestamps(
|
cloneAndSetAutoTimestamps(
|
||||||
new HostResource.Builder()
|
new HostResource.Builder()
|
||||||
.setRepoId("DEADBEEF-COM")
|
.setRepoId("DEADBEEF-COM")
|
||||||
.setFullyQualifiedHostName("ns1.example.com")
|
.setHostName("ns1.example.com")
|
||||||
.setCreationClientId("a registrar")
|
.setCreationClientId("a registrar")
|
||||||
.setLastEppUpdateTime(fakeClock.nowUtc())
|
.setLastEppUpdateTime(fakeClock.nowUtc())
|
||||||
.setLastEppUpdateClientId("another registrar")
|
.setLastEppUpdateClientId("another registrar")
|
||||||
|
@ -172,7 +172,7 @@ public class HostResourceTest extends EntityTestCase {
|
||||||
IllegalArgumentException thrown =
|
IllegalArgumentException thrown =
|
||||||
assertThrows(
|
assertThrows(
|
||||||
IllegalArgumentException.class,
|
IllegalArgumentException.class,
|
||||||
() -> host.asBuilder().setFullyQualifiedHostName("AAA.BBB.CCC"));
|
() -> host.asBuilder().setHostName("AAA.BBB.CCC"));
|
||||||
assertThat(thrown)
|
assertThat(thrown)
|
||||||
.hasMessageThat()
|
.hasMessageThat()
|
||||||
.contains("Host name must be in puny-coded, lower-case form");
|
.contains("Host name must be in puny-coded, lower-case form");
|
||||||
|
@ -183,7 +183,7 @@ public class HostResourceTest extends EntityTestCase {
|
||||||
IllegalArgumentException thrown =
|
IllegalArgumentException thrown =
|
||||||
assertThrows(
|
assertThrows(
|
||||||
IllegalArgumentException.class,
|
IllegalArgumentException.class,
|
||||||
() -> host.asBuilder().setFullyQualifiedHostName("みんな.みんな.みんな"));
|
() -> host.asBuilder().setHostName("みんな.みんな.みんな"));
|
||||||
assertThat(thrown)
|
assertThat(thrown)
|
||||||
.hasMessageThat()
|
.hasMessageThat()
|
||||||
.contains("Host name must be in puny-coded, lower-case form");
|
.contains("Host name must be in puny-coded, lower-case form");
|
||||||
|
@ -222,7 +222,7 @@ public class HostResourceTest extends EntityTestCase {
|
||||||
new HostResource.Builder()
|
new HostResource.Builder()
|
||||||
.setCreationTime(day2)
|
.setCreationTime(day2)
|
||||||
.setRepoId("DEADBEEF-COM")
|
.setRepoId("DEADBEEF-COM")
|
||||||
.setFullyQualifiedHostName("ns1.example.com")
|
.setHostName("ns1.example.com")
|
||||||
.setCreationClientId("a registrar")
|
.setCreationClientId("a registrar")
|
||||||
.setLastEppUpdateTime(fakeClock.nowUtc())
|
.setLastEppUpdateTime(fakeClock.nowUtc())
|
||||||
.setLastEppUpdateClientId("another registrar")
|
.setLastEppUpdateClientId("another registrar")
|
||||||
|
|
|
@ -136,7 +136,7 @@ public class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDom
|
||||||
}
|
}
|
||||||
|
|
||||||
private HostResource addHostToMap(HostResource host) {
|
private HostResource addHostToMap(HostResource host) {
|
||||||
hostNameToHostMap.put(host.getFullyQualifiedHostName(), host);
|
hostNameToHostMap.put(host.getHostName(), host);
|
||||||
return host;
|
return host;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -262,7 +262,7 @@ public class DomainBaseToXjcConverterTest {
|
||||||
.setDsData(
|
.setDsData(
|
||||||
ImmutableSet.of(
|
ImmutableSet.of(
|
||||||
DelegationSignerData.create(123, 200, 230, base16().decode("1234567890"))))
|
DelegationSignerData.create(123, 200, 230, base16().decode("1234567890"))))
|
||||||
.setFullyQualifiedDomainName(Idn.toASCII("love.みんな"))
|
.setDomainName(Idn.toASCII("love.みんな"))
|
||||||
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
||||||
.setLastEppUpdateClientId("IntoTheTempest")
|
.setLastEppUpdateClientId("IntoTheTempest")
|
||||||
.setLastEppUpdateTime(DateTime.parse("1920-01-01T00:00:00Z"))
|
.setLastEppUpdateTime(DateTime.parse("1920-01-01T00:00:00Z"))
|
||||||
|
@ -407,7 +407,7 @@ public class DomainBaseToXjcConverterTest {
|
||||||
.setCreationClientId("LawyerCat")
|
.setCreationClientId("LawyerCat")
|
||||||
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
|
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
|
||||||
.setPersistedCurrentSponsorClientId("BusinessCat")
|
.setPersistedCurrentSponsorClientId("BusinessCat")
|
||||||
.setFullyQualifiedHostName(Idn.toASCII(fqhn))
|
.setHostName(Idn.toASCII(fqhn))
|
||||||
.setInetAddresses(ImmutableSet.of(InetAddresses.forString(ip)))
|
.setInetAddresses(ImmutableSet.of(InetAddresses.forString(ip)))
|
||||||
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
||||||
.setLastEppUpdateClientId("CeilingCat")
|
.setLastEppUpdateClientId("CeilingCat")
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class HostResourceToXjcConverterTest {
|
||||||
.setCreationClientId("LawyerCat")
|
.setCreationClientId("LawyerCat")
|
||||||
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
|
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
|
||||||
.setPersistedCurrentSponsorClientId("BusinessCat")
|
.setPersistedCurrentSponsorClientId("BusinessCat")
|
||||||
.setFullyQualifiedHostName("ns1.love.foobar")
|
.setHostName("ns1.love.foobar")
|
||||||
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("127.0.0.1")))
|
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("127.0.0.1")))
|
||||||
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
||||||
.setLastEppUpdateClientId("CeilingCat")
|
.setLastEppUpdateClientId("CeilingCat")
|
||||||
|
@ -127,7 +127,7 @@ public class HostResourceToXjcConverterTest {
|
||||||
.setCreationClientId("LawyerCat")
|
.setCreationClientId("LawyerCat")
|
||||||
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
|
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
|
||||||
.setPersistedCurrentSponsorClientId("BusinessCat")
|
.setPersistedCurrentSponsorClientId("BusinessCat")
|
||||||
.setFullyQualifiedHostName("ns1.love.lol")
|
.setHostName("ns1.love.lol")
|
||||||
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("127.0.0.1")))
|
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("127.0.0.1")))
|
||||||
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
||||||
.setLastEppUpdateClientId("CeilingCat")
|
.setLastEppUpdateClientId("CeilingCat")
|
||||||
|
@ -176,7 +176,7 @@ public class HostResourceToXjcConverterTest {
|
||||||
.setCreationClientId("LawyerCat")
|
.setCreationClientId("LawyerCat")
|
||||||
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
|
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
|
||||||
.setPersistedCurrentSponsorClientId("BusinessCat")
|
.setPersistedCurrentSponsorClientId("BusinessCat")
|
||||||
.setFullyQualifiedHostName("ns1.love.lol")
|
.setHostName("ns1.love.lol")
|
||||||
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("cafe::abba")))
|
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("cafe::abba")))
|
||||||
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
||||||
.setLastEppUpdateClientId("CeilingCat")
|
.setLastEppUpdateClientId("CeilingCat")
|
||||||
|
@ -199,7 +199,7 @@ public class HostResourceToXjcConverterTest {
|
||||||
.setCreationClientId("LawyerCat")
|
.setCreationClientId("LawyerCat")
|
||||||
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
|
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
|
||||||
.setPersistedCurrentSponsorClientId("BusinessCat")
|
.setPersistedCurrentSponsorClientId("BusinessCat")
|
||||||
.setFullyQualifiedHostName("ns1.love.lol")
|
.setHostName("ns1.love.lol")
|
||||||
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("cafe::abba")))
|
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("cafe::abba")))
|
||||||
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
||||||
.setLastEppUpdateClientId("CeilingCat")
|
.setLastEppUpdateClientId("CeilingCat")
|
||||||
|
@ -218,7 +218,7 @@ public class HostResourceToXjcConverterTest {
|
||||||
.setCreationClientId("LawyerCat")
|
.setCreationClientId("LawyerCat")
|
||||||
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
|
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
|
||||||
.setPersistedCurrentSponsorClientId("BusinessCat")
|
.setPersistedCurrentSponsorClientId("BusinessCat")
|
||||||
.setFullyQualifiedHostName("ns1.love.lol")
|
.setHostName("ns1.love.lol")
|
||||||
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("cafe::abba")))
|
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("cafe::abba")))
|
||||||
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
||||||
.setLastEppUpdateClientId("CeilingCat")
|
.setLastEppUpdateClientId("CeilingCat")
|
||||||
|
|
|
@ -60,7 +60,7 @@ final class RdeFixtures {
|
||||||
static DomainBase makeDomainBase(FakeClock clock, String tld) {
|
static DomainBase makeDomainBase(FakeClock clock, String tld) {
|
||||||
DomainBase domain =
|
DomainBase domain =
|
||||||
new DomainBase.Builder()
|
new DomainBase.Builder()
|
||||||
.setFullyQualifiedDomainName("example." + tld)
|
.setDomainName("example." + tld)
|
||||||
.setRepoId(generateNewDomainRoid(tld))
|
.setRepoId(generateNewDomainRoid(tld))
|
||||||
.setRegistrant(
|
.setRegistrant(
|
||||||
makeContactResource(clock, "5372808-ERL", "(◕‿◕) nevermore", "prophet@evil.みんな")
|
makeContactResource(clock, "5372808-ERL", "(◕‿◕) nevermore", "prophet@evil.みんな")
|
||||||
|
@ -109,7 +109,7 @@ final class RdeFixtures {
|
||||||
.setDsData(
|
.setDsData(
|
||||||
ImmutableSet.of(
|
ImmutableSet.of(
|
||||||
DelegationSignerData.create(123, 200, 230, base16().decode("1234567890"))))
|
DelegationSignerData.create(123, 200, 230, base16().decode("1234567890"))))
|
||||||
.setFullyQualifiedDomainName(Idn.toASCII("love." + tld))
|
.setDomainName(Idn.toASCII("love." + tld))
|
||||||
.setLastTransferTime(DateTime.parse("1990-01-01T00:00:00Z"))
|
.setLastTransferTime(DateTime.parse("1990-01-01T00:00:00Z"))
|
||||||
.setLastEppUpdateClientId("IntoTheTempest")
|
.setLastEppUpdateClientId("IntoTheTempest")
|
||||||
.setLastEppUpdateTime(clock.nowUtc())
|
.setLastEppUpdateTime(clock.nowUtc())
|
||||||
|
@ -250,7 +250,7 @@ final class RdeFixtures {
|
||||||
.setCreationClientId("LawyerCat")
|
.setCreationClientId("LawyerCat")
|
||||||
.setCreationTimeForTest(clock.nowUtc())
|
.setCreationTimeForTest(clock.nowUtc())
|
||||||
.setPersistedCurrentSponsorClientId("BusinessCat")
|
.setPersistedCurrentSponsorClientId("BusinessCat")
|
||||||
.setFullyQualifiedHostName(Idn.toASCII(fqhn))
|
.setHostName(Idn.toASCII(fqhn))
|
||||||
.setInetAddresses(ImmutableSet.of(InetAddresses.forString(ip)))
|
.setInetAddresses(ImmutableSet.of(InetAddresses.forString(ip)))
|
||||||
.setLastTransferTime(DateTime.parse("1990-01-01T00:00:00Z"))
|
.setLastTransferTime(DateTime.parse("1990-01-01T00:00:00Z"))
|
||||||
.setLastEppUpdateClientId("CeilingCat")
|
.setLastEppUpdateClientId("CeilingCat")
|
||||||
|
|
|
@ -120,7 +120,7 @@ public class DatastoreHelper {
|
||||||
|
|
||||||
public static HostResource newHostResource(String hostName) {
|
public static HostResource newHostResource(String hostName) {
|
||||||
return new HostResource.Builder()
|
return new HostResource.Builder()
|
||||||
.setFullyQualifiedHostName(hostName)
|
.setHostName(hostName)
|
||||||
.setCreationClientId("TheRegistrar")
|
.setCreationClientId("TheRegistrar")
|
||||||
.setPersistedCurrentSponsorClientId("TheRegistrar")
|
.setPersistedCurrentSponsorClientId("TheRegistrar")
|
||||||
.setCreationTimeForTest(START_OF_TIME)
|
.setCreationTimeForTest(START_OF_TIME)
|
||||||
|
@ -150,7 +150,7 @@ public class DatastoreHelper {
|
||||||
VKey<ContactResource> contactKey = contact.createVKey();
|
VKey<ContactResource> contactKey = contact.createVKey();
|
||||||
return new DomainBase.Builder()
|
return new DomainBase.Builder()
|
||||||
.setRepoId(repoId)
|
.setRepoId(repoId)
|
||||||
.setFullyQualifiedDomainName(domainName)
|
.setDomainName(domainName)
|
||||||
.setCreationClientId("TheRegistrar")
|
.setCreationClientId("TheRegistrar")
|
||||||
.setPersistedCurrentSponsorClientId("TheRegistrar")
|
.setPersistedCurrentSponsorClientId("TheRegistrar")
|
||||||
.setCreationTimeForTest(START_OF_TIME)
|
.setCreationTimeForTest(START_OF_TIME)
|
||||||
|
@ -433,13 +433,13 @@ public class DatastoreHelper {
|
||||||
DateTime eventTime) {
|
DateTime eventTime) {
|
||||||
return new BillingEvent.OneTime.Builder()
|
return new BillingEvent.OneTime.Builder()
|
||||||
.setReason(Reason.TRANSFER)
|
.setReason(Reason.TRANSFER)
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setEventTime(eventTime)
|
.setEventTime(eventTime)
|
||||||
.setBillingTime(
|
.setBillingTime(
|
||||||
eventTime.plus(Registry.get(domain.getTld()).getTransferGracePeriodLength()))
|
eventTime.plus(Registry.get(domain.getTld()).getTransferGracePeriodLength()))
|
||||||
.setClientId("NewRegistrar")
|
.setClientId("NewRegistrar")
|
||||||
.setPeriodYears(1)
|
.setPeriodYears(1)
|
||||||
.setCost(getDomainRenewCost(domain.getFullyQualifiedDomainName(), costLookupTime, 1))
|
.setCost(getDomainRenewCost(domain.getDomainName(), costLookupTime, 1))
|
||||||
.setParent(historyEntry)
|
.setParent(historyEntry)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
@ -500,7 +500,7 @@ public class DatastoreHelper {
|
||||||
DomainBase domain =
|
DomainBase domain =
|
||||||
new DomainBase.Builder()
|
new DomainBase.Builder()
|
||||||
.setRepoId(generateNewDomainRoid(tld))
|
.setRepoId(generateNewDomainRoid(tld))
|
||||||
.setFullyQualifiedDomainName(domainName)
|
.setDomainName(domainName)
|
||||||
.setPersistedCurrentSponsorClientId("TheRegistrar")
|
.setPersistedCurrentSponsorClientId("TheRegistrar")
|
||||||
.setCreationClientId("TheRegistrar")
|
.setCreationClientId("TheRegistrar")
|
||||||
.setCreationTimeForTest(creationTime)
|
.setCreationTimeForTest(creationTime)
|
||||||
|
@ -568,7 +568,7 @@ public class DatastoreHelper {
|
||||||
new BillingEvent.Recurring.Builder()
|
new BillingEvent.Recurring.Builder()
|
||||||
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
|
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
|
||||||
.setReason(Reason.RENEW)
|
.setReason(Reason.RENEW)
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setClientId("NewRegistrar")
|
.setClientId("NewRegistrar")
|
||||||
.setEventTime(extendedRegistrationExpirationTime)
|
.setEventTime(extendedRegistrationExpirationTime)
|
||||||
.setRecurrenceEndTime(END_OF_TIME)
|
.setRecurrenceEndTime(END_OF_TIME)
|
||||||
|
@ -576,7 +576,7 @@ public class DatastoreHelper {
|
||||||
.build());
|
.build());
|
||||||
PollMessage.Autorenew gainingClientAutorenewPollMessage = persistResource(
|
PollMessage.Autorenew gainingClientAutorenewPollMessage = persistResource(
|
||||||
new PollMessage.Autorenew.Builder()
|
new PollMessage.Autorenew.Builder()
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setClientId("NewRegistrar")
|
.setClientId("NewRegistrar")
|
||||||
.setEventTime(extendedRegistrationExpirationTime)
|
.setEventTime(extendedRegistrationExpirationTime)
|
||||||
.setAutorenewEndTime(END_OF_TIME)
|
.setAutorenewEndTime(END_OF_TIME)
|
||||||
|
|
|
@ -43,7 +43,7 @@ public final class DomainBaseSubject
|
||||||
public And<DomainBaseSubject> hasFullyQualifiedDomainName(String fullyQualifiedDomainName) {
|
public And<DomainBaseSubject> hasFullyQualifiedDomainName(String fullyQualifiedDomainName) {
|
||||||
return hasValue(
|
return hasValue(
|
||||||
fullyQualifiedDomainName,
|
fullyQualifiedDomainName,
|
||||||
actual.getFullyQualifiedDomainName(),
|
actual.getDomainName(),
|
||||||
"has fullyQualifiedDomainName");
|
"has fullyQualifiedDomainName");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ public final class FullFieldsTestEntityHelper {
|
||||||
HostResource.Builder builder =
|
HostResource.Builder builder =
|
||||||
new HostResource.Builder()
|
new HostResource.Builder()
|
||||||
.setRepoId(generateNewContactHostRoid())
|
.setRepoId(generateNewContactHostRoid())
|
||||||
.setFullyQualifiedHostName(Idn.toASCII(fqhn))
|
.setHostName(Idn.toASCII(fqhn))
|
||||||
.setCreationTimeForTest(DateTime.parse("2000-10-08T00:45:00Z"))
|
.setCreationTimeForTest(DateTime.parse("2000-10-08T00:45:00Z"))
|
||||||
.setPersistedCurrentSponsorClientId(registrarClientId);
|
.setPersistedCurrentSponsorClientId(registrarClientId);
|
||||||
if ((ip1 != null) || (ip2 != null)) {
|
if ((ip1 != null) || (ip2 != null)) {
|
||||||
|
@ -344,7 +344,7 @@ public final class FullFieldsTestEntityHelper {
|
||||||
Registrar registrar) {
|
Registrar registrar) {
|
||||||
DomainBase.Builder builder =
|
DomainBase.Builder builder =
|
||||||
new DomainBase.Builder()
|
new DomainBase.Builder()
|
||||||
.setFullyQualifiedDomainName(Idn.toASCII(domain))
|
.setDomainName(Idn.toASCII(domain))
|
||||||
.setRepoId(generateNewDomainRoid(getTldFromDomainName(Idn.toASCII(domain))))
|
.setRepoId(generateNewDomainRoid(getTldFromDomainName(Idn.toASCII(domain))))
|
||||||
.setLastEppUpdateTime(DateTime.parse("2009-05-29T20:13:00Z"))
|
.setLastEppUpdateTime(DateTime.parse("2009-05-29T20:13:00Z"))
|
||||||
.setCreationTimeForTest(DateTime.parse("2000-10-08T00:45:00Z"))
|
.setCreationTimeForTest(DateTime.parse("2000-10-08T00:45:00Z"))
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class LordnTaskUtilsTest {
|
||||||
|
|
||||||
private DomainBase.Builder newDomainBuilder() {
|
private DomainBase.Builder newDomainBuilder() {
|
||||||
return new DomainBase.Builder()
|
return new DomainBase.Builder()
|
||||||
.setFullyQualifiedDomainName("fleece.example")
|
.setDomainName("fleece.example")
|
||||||
.setRegistrant(persistActiveContact("jd1234").createVKey())
|
.setRegistrant(persistActiveContact("jd1234").createVKey())
|
||||||
.setSmdId("smdzzzz")
|
.setSmdId("smdzzzz")
|
||||||
.setCreationClientId("TheRegistrar");
|
.setCreationClientId("TheRegistrar");
|
||||||
|
|
|
@ -146,7 +146,7 @@ public class EppLifecycleToolsTest extends EppTestCase {
|
||||||
BillingEvent.OneTime renewBillingEvent =
|
BillingEvent.OneTime renewBillingEvent =
|
||||||
new BillingEvent.OneTime.Builder()
|
new BillingEvent.OneTime.Builder()
|
||||||
.setReason(Reason.RENEW)
|
.setReason(Reason.RENEW)
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setClientId(domain.getCurrentSponsorClientId())
|
.setClientId(domain.getCurrentSponsorClientId())
|
||||||
.setCost(Money.parse("USD 44.00"))
|
.setCost(Money.parse("USD 44.00"))
|
||||||
.setPeriodYears(4)
|
.setPeriodYears(4)
|
||||||
|
|
|
@ -90,7 +90,7 @@ public class LockDomainCommandTest extends CommandTestCase<LockDomainCommand> {
|
||||||
.add("--client=NewRegistrar")
|
.add("--client=NewRegistrar")
|
||||||
.addAll(
|
.addAll(
|
||||||
domains.stream()
|
domains.stream()
|
||||||
.map(DomainBase::getFullyQualifiedDomainName)
|
.map(DomainBase::getDomainName)
|
||||||
.collect(Collectors.toList()))
|
.collect(Collectors.toList()))
|
||||||
.build());
|
.build());
|
||||||
for (DomainBase domain : domains) {
|
for (DomainBase domain : domains) {
|
||||||
|
|
|
@ -101,7 +101,7 @@ public class UnlockDomainCommandTest extends CommandTestCase<UnlockDomainCommand
|
||||||
.add("--client=NewRegistrar")
|
.add("--client=NewRegistrar")
|
||||||
.addAll(
|
.addAll(
|
||||||
domains.stream()
|
domains.stream()
|
||||||
.map(DomainBase::getFullyQualifiedDomainName)
|
.map(DomainBase::getDomainName)
|
||||||
.collect(Collectors.toList()))
|
.collect(Collectors.toList()))
|
||||||
.build());
|
.build());
|
||||||
for (DomainBase domain : domains) {
|
for (DomainBase domain : domains) {
|
||||||
|
|
|
@ -124,7 +124,7 @@ public class UnrenewDomainCommandTest extends CommandTestCase<UnrenewDomainComma
|
||||||
.setParent(synthetic)
|
.setParent(synthetic)
|
||||||
.setReason(Reason.RENEW)
|
.setReason(Reason.RENEW)
|
||||||
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
|
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
|
||||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
.setTargetId(domain.getDomainName())
|
||||||
.setClientId("TheRegistrar")
|
.setClientId("TheRegistrar")
|
||||||
.setEventTime(newExpirationTime)
|
.setEventTime(newExpirationTime)
|
||||||
.build());
|
.build());
|
||||||
|
|
|
@ -111,7 +111,7 @@ public class BackfillRegistryLocksCommandTest
|
||||||
.isSuperuser(true)
|
.isSuperuser(true)
|
||||||
.setRegistrarId("adminreg")
|
.setRegistrarId("adminreg")
|
||||||
.setRepoId(domain.getRepoId())
|
.setRepoId(domain.getRepoId())
|
||||||
.setDomainName(domain.getFullyQualifiedDomainName())
|
.setDomainName(domain.getDomainName())
|
||||||
.setLockCompletionTimestamp(fakeClock.nowUtc())
|
.setLockCompletionTimestamp(fakeClock.nowUtc())
|
||||||
.setVerificationCode(command.stringGenerator.createString(32))
|
.setVerificationCode(command.stringGenerator.createString(32))
|
||||||
.build());
|
.build());
|
||||||
|
|
|
@ -189,7 +189,7 @@ public final class RegistryLockGetActionTest {
|
||||||
"locks",
|
"locks",
|
||||||
ImmutableList.of(
|
ImmutableList.of(
|
||||||
new ImmutableMap.Builder<>()
|
new ImmutableMap.Builder<>()
|
||||||
.put("fullyQualifiedDomainName", "adminexample.test")
|
.put("domainName", "adminexample.test")
|
||||||
.put("lockedTime", "2000-06-09T22:00:00.001Z")
|
.put("lockedTime", "2000-06-09T22:00:00.001Z")
|
||||||
.put("lockedBy", "admin")
|
.put("lockedBy", "admin")
|
||||||
.put("userCanUnlock", false)
|
.put("userCanUnlock", false)
|
||||||
|
@ -197,7 +197,7 @@ public final class RegistryLockGetActionTest {
|
||||||
.put("isUnlockPending", false)
|
.put("isUnlockPending", false)
|
||||||
.build(),
|
.build(),
|
||||||
new ImmutableMap.Builder<>()
|
new ImmutableMap.Builder<>()
|
||||||
.put("fullyQualifiedDomainName", "example.test")
|
.put("domainName", "example.test")
|
||||||
.put("lockedTime", "2000-06-09T22:00:00.000Z")
|
.put("lockedTime", "2000-06-09T22:00:00.000Z")
|
||||||
.put("lockedBy", "johndoe@theregistrar.com")
|
.put("lockedBy", "johndoe@theregistrar.com")
|
||||||
.put("userCanUnlock", true)
|
.put("userCanUnlock", true)
|
||||||
|
@ -205,7 +205,7 @@ public final class RegistryLockGetActionTest {
|
||||||
.put("isUnlockPending", false)
|
.put("isUnlockPending", false)
|
||||||
.build(),
|
.build(),
|
||||||
new ImmutableMap.Builder<>()
|
new ImmutableMap.Builder<>()
|
||||||
.put("fullyQualifiedDomainName", "expiredunlock.test")
|
.put("domainName", "expiredunlock.test")
|
||||||
.put("lockedTime", "2000-06-08T22:00:00.000Z")
|
.put("lockedTime", "2000-06-08T22:00:00.000Z")
|
||||||
.put("lockedBy", "johndoe@theregistrar.com")
|
.put("lockedBy", "johndoe@theregistrar.com")
|
||||||
.put("userCanUnlock", true)
|
.put("userCanUnlock", true)
|
||||||
|
@ -213,7 +213,7 @@ public final class RegistryLockGetActionTest {
|
||||||
.put("isUnlockPending", false)
|
.put("isUnlockPending", false)
|
||||||
.build(),
|
.build(),
|
||||||
new ImmutableMap.Builder<>()
|
new ImmutableMap.Builder<>()
|
||||||
.put("fullyQualifiedDomainName", "incompleteunlock.test")
|
.put("domainName", "incompleteunlock.test")
|
||||||
.put("lockedTime", "2000-06-09T22:00:00.001Z")
|
.put("lockedTime", "2000-06-09T22:00:00.001Z")
|
||||||
.put("lockedBy", "johndoe@theregistrar.com")
|
.put("lockedBy", "johndoe@theregistrar.com")
|
||||||
.put("userCanUnlock", true)
|
.put("userCanUnlock", true)
|
||||||
|
@ -221,7 +221,7 @@ public final class RegistryLockGetActionTest {
|
||||||
.put("isUnlockPending", true)
|
.put("isUnlockPending", true)
|
||||||
.build(),
|
.build(),
|
||||||
new ImmutableMap.Builder<>()
|
new ImmutableMap.Builder<>()
|
||||||
.put("fullyQualifiedDomainName", "pending.test")
|
.put("domainName", "pending.test")
|
||||||
.put("lockedTime", "")
|
.put("lockedTime", "")
|
||||||
.put("lockedBy", "johndoe@theregistrar.com")
|
.put("lockedBy", "johndoe@theregistrar.com")
|
||||||
.put("userCanUnlock", true)
|
.put("userCanUnlock", true)
|
||||||
|
|
|
@ -225,7 +225,7 @@ public final class RegistryLockPostActionTest {
|
||||||
action.handleJsonRequest(
|
action.handleJsonRequest(
|
||||||
ImmutableMap.of(
|
ImmutableMap.of(
|
||||||
"clientId", "TheRegistrar",
|
"clientId", "TheRegistrar",
|
||||||
"fullyQualifiedDomainName", "example.tld",
|
"domainName", "example.tld",
|
||||||
"isLock", true));
|
"isLock", true));
|
||||||
assertSuccess(response, "lock", "johndoe@theregistrar.com");
|
assertSuccess(response, "lock", "johndoe@theregistrar.com");
|
||||||
}
|
}
|
||||||
|
@ -253,7 +253,7 @@ public final class RegistryLockPostActionTest {
|
||||||
Map<String, ?> response =
|
Map<String, ?> response =
|
||||||
action.handleJsonRequest(
|
action.handleJsonRequest(
|
||||||
ImmutableMap.of("clientId", "TheRegistrar", "password", "hi", "isLock", true));
|
ImmutableMap.of("clientId", "TheRegistrar", "password", "hi", "isLock", true));
|
||||||
assertFailureWithMessage(response, "Missing key for fullyQualifiedDomainName");
|
assertFailureWithMessage(response, "Missing key for domainName");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -262,7 +262,7 @@ public final class RegistryLockPostActionTest {
|
||||||
action.handleJsonRequest(
|
action.handleJsonRequest(
|
||||||
ImmutableMap.of(
|
ImmutableMap.of(
|
||||||
"clientId", "TheRegistrar",
|
"clientId", "TheRegistrar",
|
||||||
"fullyQualifiedDomainName", "example.tld",
|
"domainName", "example.tld",
|
||||||
"password", "hi"));
|
"password", "hi"));
|
||||||
assertFailureWithMessage(response, "Missing key for isLock");
|
assertFailureWithMessage(response, "Missing key for isLock");
|
||||||
}
|
}
|
||||||
|
@ -281,7 +281,7 @@ public final class RegistryLockPostActionTest {
|
||||||
action.handleJsonRequest(
|
action.handleJsonRequest(
|
||||||
ImmutableMap.of(
|
ImmutableMap.of(
|
||||||
"clientId", "TheRegistrar",
|
"clientId", "TheRegistrar",
|
||||||
"fullyQualifiedDomainName", "example.tld",
|
"domainName", "example.tld",
|
||||||
"isLock", true));
|
"isLock", true));
|
||||||
assertFailureWithMessage(response, "Incorrect registry lock password for contact");
|
assertFailureWithMessage(response, "Incorrect registry lock password for contact");
|
||||||
}
|
}
|
||||||
|
@ -295,7 +295,7 @@ public final class RegistryLockPostActionTest {
|
||||||
action.handleJsonRequest(
|
action.handleJsonRequest(
|
||||||
ImmutableMap.of(
|
ImmutableMap.of(
|
||||||
"clientId", "TheRegistrar",
|
"clientId", "TheRegistrar",
|
||||||
"fullyQualifiedDomainName", "example.tld",
|
"domainName", "example.tld",
|
||||||
"isLock", true,
|
"isLock", true,
|
||||||
"password", "hi"));
|
"password", "hi"));
|
||||||
assertFailureWithMessage(response, "Incorrect registry lock password for contact");
|
assertFailureWithMessage(response, "Incorrect registry lock password for contact");
|
||||||
|
@ -307,7 +307,7 @@ public final class RegistryLockPostActionTest {
|
||||||
action.handleJsonRequest(
|
action.handleJsonRequest(
|
||||||
ImmutableMap.of(
|
ImmutableMap.of(
|
||||||
"clientId", "TheRegistrar",
|
"clientId", "TheRegistrar",
|
||||||
"fullyQualifiedDomainName", "example.tld",
|
"domainName", "example.tld",
|
||||||
"isLock", true,
|
"isLock", true,
|
||||||
"password", "badPassword"));
|
"password", "badPassword"));
|
||||||
assertFailureWithMessage(response, "Incorrect registry lock password for contact");
|
assertFailureWithMessage(response, "Incorrect registry lock password for contact");
|
||||||
|
@ -319,7 +319,7 @@ public final class RegistryLockPostActionTest {
|
||||||
action.handleJsonRequest(
|
action.handleJsonRequest(
|
||||||
ImmutableMap.of(
|
ImmutableMap.of(
|
||||||
"clientId", "TheRegistrar",
|
"clientId", "TheRegistrar",
|
||||||
"fullyQualifiedDomainName", "bad.tld",
|
"domainName", "bad.tld",
|
||||||
"isLock", true,
|
"isLock", true,
|
||||||
"password", "hi"));
|
"password", "hi"));
|
||||||
assertFailureWithMessage(response, "Unknown domain bad.tld");
|
assertFailureWithMessage(response, "Unknown domain bad.tld");
|
||||||
|
@ -382,7 +382,7 @@ public final class RegistryLockPostActionTest {
|
||||||
return ImmutableMap.of(
|
return ImmutableMap.of(
|
||||||
"isLock", lock,
|
"isLock", lock,
|
||||||
"clientId", "TheRegistrar",
|
"clientId", "TheRegistrar",
|
||||||
"fullyQualifiedDomainName", "example.tld",
|
"domainName", "example.tld",
|
||||||
"password", "hi");
|
"password", "hi");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -488,7 +488,7 @@ public class RegistrarConsoleScreenshotTest extends WebDriverTestCase {
|
||||||
.isSuperuser(false)
|
.isSuperuser(false)
|
||||||
.setRegistrarId("TheRegistrar")
|
.setRegistrarId("TheRegistrar")
|
||||||
.setRegistrarPocId("Marla.Singer@crr.com")
|
.setRegistrarPocId("Marla.Singer@crr.com")
|
||||||
.setDomainName(pendingUnlockDomain.getFullyQualifiedDomainName())
|
.setDomainName(pendingUnlockDomain.getDomainName())
|
||||||
.setRepoId(pendingUnlockDomain.getRepoId())
|
.setRepoId(pendingUnlockDomain.getRepoId())
|
||||||
.setLockCompletionTimestamp(START_OF_TIME)
|
.setLockCompletionTimestamp(START_OF_TIME)
|
||||||
.setUnlockRequestTimestamp(START_OF_TIME)
|
.setUnlockRequestTimestamp(START_OF_TIME)
|
||||||
|
@ -561,7 +561,7 @@ public class RegistrarConsoleScreenshotTest extends WebDriverTestCase {
|
||||||
.setRegistrarId("TheRegistrar")
|
.setRegistrarId("TheRegistrar")
|
||||||
.setRegistrarPocId("Marla.Singer@crr.com")
|
.setRegistrarPocId("Marla.Singer@crr.com")
|
||||||
.setLockCompletionTimestamp(START_OF_TIME)
|
.setLockCompletionTimestamp(START_OF_TIME)
|
||||||
.setDomainName(domainBase.getFullyQualifiedDomainName())
|
.setDomainName(domainBase.getDomainName())
|
||||||
.setRepoId(domainBase.getRepoId())
|
.setRepoId(domainBase.getRepoId())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,12 +86,12 @@ public class DomainWhoisResponseTest {
|
||||||
createTld("tld");
|
createTld("tld");
|
||||||
|
|
||||||
hostResource1 = persistResource(new HostResource.Builder()
|
hostResource1 = persistResource(new HostResource.Builder()
|
||||||
.setFullyQualifiedHostName("ns01.exampleregistrar.tld")
|
.setHostName("ns01.exampleregistrar.tld")
|
||||||
.setRepoId("1-ROID")
|
.setRepoId("1-ROID")
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
hostResource2 = persistResource(new HostResource.Builder()
|
hostResource2 = persistResource(new HostResource.Builder()
|
||||||
.setFullyQualifiedHostName("ns02.exampleregistrar.tld")
|
.setHostName("ns02.exampleregistrar.tld")
|
||||||
.setRepoId("2-ROID")
|
.setRepoId("2-ROID")
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ public class DomainWhoisResponseTest {
|
||||||
domainBase =
|
domainBase =
|
||||||
persistResource(
|
persistResource(
|
||||||
new DomainBase.Builder()
|
new DomainBase.Builder()
|
||||||
.setFullyQualifiedDomainName("example.tld")
|
.setDomainName("example.tld")
|
||||||
.setRepoId("3-TLD")
|
.setRepoId("3-TLD")
|
||||||
.setLastEppUpdateTime(DateTime.parse("2009-05-29T20:13:00Z"))
|
.setLastEppUpdateTime(DateTime.parse("2009-05-29T20:13:00Z"))
|
||||||
.setCreationTimeForTest(DateTime.parse("2000-10-08T00:45:00Z"))
|
.setCreationTimeForTest(DateTime.parse("2000-10-08T00:45:00Z"))
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class NameserverWhoisResponseTest {
|
||||||
createTld("tld");
|
createTld("tld");
|
||||||
|
|
||||||
hostResource1 = new HostResource.Builder()
|
hostResource1 = new HostResource.Builder()
|
||||||
.setFullyQualifiedHostName("ns1.example.tld")
|
.setHostName("ns1.example.tld")
|
||||||
.setPersistedCurrentSponsorClientId("example")
|
.setPersistedCurrentSponsorClientId("example")
|
||||||
.setInetAddresses(ImmutableSet.of(
|
.setInetAddresses(ImmutableSet.of(
|
||||||
InetAddresses.forString("192.0.2.123"),
|
InetAddresses.forString("192.0.2.123"),
|
||||||
|
@ -64,7 +64,7 @@ public class NameserverWhoisResponseTest {
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
hostResource2 = new HostResource.Builder()
|
hostResource2 = new HostResource.Builder()
|
||||||
.setFullyQualifiedHostName("ns2.example.tld")
|
.setHostName("ns2.example.tld")
|
||||||
.setPersistedCurrentSponsorClientId("example")
|
.setPersistedCurrentSponsorClientId("example")
|
||||||
.setInetAddresses(ImmutableSet.of(
|
.setInetAddresses(ImmutableSet.of(
|
||||||
InetAddresses.forString("192.0.2.123"),
|
InetAddresses.forString("192.0.2.123"),
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
-- Copyright 2020 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.
|
||||||
|
|
||||||
|
ALTER TABLE "Domain" RENAME COLUMN "fully_qualified_domain_name" TO "domain_name";
|
||||||
|
ALTER TABLE "HostResource" RENAME COLUMN "fully_qualified_host_name" TO "host_name";
|
||||||
|
ALTER TABLE "HostHistory" RENAME COLUMN "fully_qualified_host_name" TO "host_name";
|
|
@ -162,7 +162,7 @@ create sequence history_id_sequence start 1 increment 1;
|
||||||
auth_info_repo_id text,
|
auth_info_repo_id text,
|
||||||
auth_info_value text,
|
auth_info_value text,
|
||||||
billing_contact text,
|
billing_contact text,
|
||||||
fully_qualified_domain_name text,
|
domain_name text,
|
||||||
idn_table_name text,
|
idn_table_name text,
|
||||||
last_transfer_time timestamptz,
|
last_transfer_time timestamptz,
|
||||||
launch_notice_accepted_time timestamptz,
|
launch_notice_accepted_time timestamptz,
|
||||||
|
@ -220,7 +220,7 @@ create sequence history_id_sequence start 1 increment 1;
|
||||||
history_server_transaction_id text,
|
history_server_transaction_id text,
|
||||||
history_type text not null,
|
history_type text not null,
|
||||||
history_xml_bytes bytea not null,
|
history_xml_bytes bytea not null,
|
||||||
fully_qualified_host_name text,
|
host_name text,
|
||||||
inet_addresses text[],
|
inet_addresses text[],
|
||||||
last_superordinate_change timestamptz,
|
last_superordinate_change timestamptz,
|
||||||
last_transfer_time timestamptz,
|
last_transfer_time timestamptz,
|
||||||
|
@ -245,7 +245,7 @@ create sequence history_id_sequence start 1 increment 1;
|
||||||
last_epp_update_registrar_id text,
|
last_epp_update_registrar_id text,
|
||||||
last_epp_update_time timestamptz,
|
last_epp_update_time timestamptz,
|
||||||
statuses text[],
|
statuses text[],
|
||||||
fully_qualified_host_name text,
|
host_name text,
|
||||||
inet_addresses text[],
|
inet_addresses text[],
|
||||||
last_superordinate_change timestamptz,
|
last_superordinate_change timestamptz,
|
||||||
last_transfer_time timestamptz,
|
last_transfer_time timestamptz,
|
||||||
|
@ -429,11 +429,11 @@ create index IDX1p3esngcwwu6hstyua6itn6ff on "Contact" (search_name);
|
||||||
create index IDX8nr0ke9mrrx4ewj6pd2ag4rmr on "Domain" (creation_time);
|
create index IDX8nr0ke9mrrx4ewj6pd2ag4rmr on "Domain" (creation_time);
|
||||||
create index IDXhsjqiy2lyobfymplb28nm74lm on "Domain" (current_sponsor_registrar_id);
|
create index IDXhsjqiy2lyobfymplb28nm74lm on "Domain" (current_sponsor_registrar_id);
|
||||||
create index IDX5mnf0wn20tno4b9do88j61klr on "Domain" (deletion_time);
|
create index IDX5mnf0wn20tno4b9do88j61klr on "Domain" (deletion_time);
|
||||||
create index IDX1rcgkdd777bpvj0r94sltwd5y on "Domain" (fully_qualified_domain_name);
|
create index IDXc5aw4pk1vkd6ymhvkpanmoadv on "Domain" (domain_name);
|
||||||
create index IDXrwl38wwkli1j7gkvtywi9jokq on "Domain" (tld);
|
create index IDXrwl38wwkli1j7gkvtywi9jokq on "Domain" (tld);
|
||||||
create index IDXfg2nnjlujxo6cb9fha971bq2n on "HostHistory" (creation_time);
|
create index IDXfg2nnjlujxo6cb9fha971bq2n on "HostHistory" (creation_time);
|
||||||
create index IDX1iy7njgb7wjmj9piml4l2g0qi on "HostHistory" (history_registrar_id);
|
create index IDX1iy7njgb7wjmj9piml4l2g0qi on "HostHistory" (history_registrar_id);
|
||||||
create index IDXj77pfwhui9f0i7wjq6lmibovj on "HostHistory" (fully_qualified_host_name);
|
create index IDXkkwbwcwvrdkkqothkiye4jiff on "HostHistory" (host_name);
|
||||||
create index IDXknk8gmj7s47q56cwpa6rmpt5l on "HostHistory" (history_type);
|
create index IDXknk8gmj7s47q56cwpa6rmpt5l on "HostHistory" (history_type);
|
||||||
create index IDX67qwkjtlq5q8dv6egtrtnhqi7 on "HostHistory" (history_modification_time);
|
create index IDX67qwkjtlq5q8dv6egtrtnhqi7 on "HostHistory" (history_modification_time);
|
||||||
create index IDXe7wu46c7wpvfmfnj4565abibp on "PollMessage" (registrar_id);
|
create index IDXe7wu46c7wpvfmfnj4565abibp on "PollMessage" (registrar_id);
|
||||||
|
|
|
@ -281,7 +281,7 @@ CREATE TABLE public."Domain" (
|
||||||
statuses text[],
|
statuses text[],
|
||||||
auth_info_repo_id text,
|
auth_info_repo_id text,
|
||||||
auth_info_value text,
|
auth_info_value text,
|
||||||
fully_qualified_domain_name text,
|
domain_name text,
|
||||||
idn_table_name text,
|
idn_table_name text,
|
||||||
last_transfer_time timestamp with time zone,
|
last_transfer_time timestamp with time zone,
|
||||||
launch_notice_accepted_time timestamp with time zone,
|
launch_notice_accepted_time timestamp with time zone,
|
||||||
|
@ -352,7 +352,7 @@ CREATE TABLE public."HostHistory" (
|
||||||
history_server_transaction_id text,
|
history_server_transaction_id text,
|
||||||
history_type text NOT NULL,
|
history_type text NOT NULL,
|
||||||
history_xml_bytes bytea NOT NULL,
|
history_xml_bytes bytea NOT NULL,
|
||||||
fully_qualified_host_name text,
|
host_name text,
|
||||||
inet_addresses text[],
|
inet_addresses text[],
|
||||||
last_superordinate_change timestamp with time zone,
|
last_superordinate_change timestamp with time zone,
|
||||||
last_transfer_time timestamp with time zone,
|
last_transfer_time timestamp with time zone,
|
||||||
|
@ -381,7 +381,7 @@ CREATE TABLE public."HostResource" (
|
||||||
last_epp_update_registrar_id text,
|
last_epp_update_registrar_id text,
|
||||||
last_epp_update_time timestamp with time zone,
|
last_epp_update_time timestamp with time zone,
|
||||||
statuses text[],
|
statuses text[],
|
||||||
fully_qualified_host_name text,
|
host_name text,
|
||||||
last_superordinate_change timestamp with time zone,
|
last_superordinate_change timestamp with time zone,
|
||||||
last_transfer_time timestamp with time zone,
|
last_transfer_time timestamp with time zone,
|
||||||
superordinate_domain text,
|
superordinate_domain text,
|
||||||
|
@ -898,7 +898,7 @@ CREATE INDEX idx1p3esngcwwu6hstyua6itn6ff ON public."Contact" USING btree (searc
|
||||||
-- Name: idx1rcgkdd777bpvj0r94sltwd5y; Type: INDEX; Schema: public; Owner: -
|
-- Name: idx1rcgkdd777bpvj0r94sltwd5y; Type: INDEX; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
|
|
||||||
CREATE INDEX idx1rcgkdd777bpvj0r94sltwd5y ON public."Domain" USING btree (fully_qualified_domain_name);
|
CREATE INDEX idx1rcgkdd777bpvj0r94sltwd5y ON public."Domain" USING btree (domain_name);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -1024,7 +1024,7 @@ CREATE INDEX idxhmv411mdqo5ibn4vy7ykxpmlv ON public."BillingEvent" USING btree (
|
||||||
-- Name: idxj77pfwhui9f0i7wjq6lmibovj; Type: INDEX; Schema: public; Owner: -
|
-- Name: idxj77pfwhui9f0i7wjq6lmibovj; Type: INDEX; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
|
|
||||||
CREATE INDEX idxj77pfwhui9f0i7wjq6lmibovj ON public."HostHistory" USING btree (fully_qualified_host_name);
|
CREATE INDEX idxj77pfwhui9f0i7wjq6lmibovj ON public."HostHistory" USING btree (host_name);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue