mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +02:00
Handle LINKED correctly in RDAP
LINKED is a virtual status that needs to be computed on the fly when creating an RDAP response. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=145583415
This commit is contained in:
parent
8071a1bdb5
commit
4a730e0c9e
25 changed files with 306 additions and 60 deletions
|
@ -15,7 +15,9 @@
|
|||
package google.registry.rdap;
|
||||
|
||||
import static com.google.common.base.Strings.nullToEmpty;
|
||||
import static google.registry.model.EppResourceUtils.isLinked;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.util.CollectionUtils.union;
|
||||
import static google.registry.util.DomainNameUtils.ACE_PREFIX;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
|
@ -551,7 +553,10 @@ public class RdapJsonFormatter {
|
|||
if (hasUnicodeComponents(hostResource.getFullyQualifiedHostName())) {
|
||||
jsonBuilder.put("unicodeName", Idn.toUnicode(hostResource.getFullyQualifiedHostName()));
|
||||
}
|
||||
jsonBuilder.put("status", makeStatusValueList(hostResource.getStatusValues()));
|
||||
jsonBuilder.put("status", makeStatusValueList(
|
||||
isLinked(Key.create(hostResource), now)
|
||||
? union(hostResource.getStatusValues(), StatusValue.LINKED)
|
||||
: hostResource.getStatusValues()));
|
||||
jsonBuilder.put("links", ImmutableList.of(
|
||||
makeLink("nameserver", hostResource.getFullyQualifiedHostName(), linkBase)));
|
||||
List<ImmutableMap<String, Object>> remarks;
|
||||
|
@ -630,7 +635,10 @@ public class RdapJsonFormatter {
|
|||
ImmutableMap.Builder<String, Object> jsonBuilder = new ImmutableMap.Builder<>();
|
||||
jsonBuilder.put("objectClassName", "entity");
|
||||
jsonBuilder.put("handle", contactResource.getRepoId());
|
||||
jsonBuilder.put("status", makeStatusValueList(contactResource.getStatusValues()));
|
||||
jsonBuilder.put("status", makeStatusValueList(
|
||||
isLinked(Key.create(contactResource), now)
|
||||
? union(contactResource.getStatusValues(), StatusValue.LINKED)
|
||||
: contactResource.getStatusValues()));
|
||||
if (contactType.isPresent()) {
|
||||
jsonBuilder.put("roles",
|
||||
ImmutableList.of(convertContactTypeToRdapRole(contactType.get())));
|
||||
|
|
|
@ -78,19 +78,19 @@ public class RdapEntityActionTest {
|
|||
"evilregistrar", "Yes Virginia <script>", Registrar.State.ACTIVE, 101L));
|
||||
persistSimpleResources(makeRegistrarContacts(registrarLol));
|
||||
registrant = makeAndPersistContactResource(
|
||||
"8372808-ERL",
|
||||
"8372808-REG",
|
||||
"(◕‿◕)",
|
||||
"lol@cat.みんな",
|
||||
ImmutableList.of("1 Smiley Row", "Suite みんな"),
|
||||
clock.nowUtc());
|
||||
adminContact = makeAndPersistContactResource(
|
||||
"8372808-ERL",
|
||||
"8372808-ADM",
|
||||
"(◕‿◕)",
|
||||
"lol@cat.みんな",
|
||||
ImmutableList.of("1 Smiley Row", "Suite みんな"),
|
||||
clock.nowUtc());
|
||||
techContact = makeAndPersistContactResource(
|
||||
"8372808-ERL",
|
||||
"8372808-TEC",
|
||||
"(◕‿◕)",
|
||||
"lol@cat.みんな",
|
||||
ImmutableList.of("1 Smiley Row", "Suite みんな"),
|
||||
|
@ -130,13 +130,13 @@ public class RdapEntityActionTest {
|
|||
host2,
|
||||
registrar1tld));
|
||||
disconnectedContact = makeAndPersistContactResource(
|
||||
"8372808-ERL",
|
||||
"8372808-DIS",
|
||||
"(◕‿◕)",
|
||||
"lol@cat.みんな",
|
||||
ImmutableList.of("1 Smiley Row", "Suite みんな"),
|
||||
clock.nowUtc());
|
||||
deletedContact = persistResource(makeContactResource(
|
||||
"8372808-ERL",
|
||||
"8372808-DEL",
|
||||
"(◕‿◕)",
|
||||
"lol@cat.みんな",
|
||||
ImmutableList.of("1 Smiley Row", "Suite みんな"))
|
||||
|
@ -211,21 +211,24 @@ public class RdapEntityActionTest {
|
|||
@Test
|
||||
public void testValidRegistrantContact_works() throws Exception {
|
||||
assertThat(generateActualJson(registrant.getRepoId())).isEqualTo(
|
||||
generateExpectedJsonWithTopLevelEntries(registrant.getRepoId(), "rdap_contact.json"));
|
||||
generateExpectedJsonWithTopLevelEntries(
|
||||
registrant.getRepoId(), "rdap_associated_contact.json"));
|
||||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAdminContact_works() throws Exception {
|
||||
assertThat(generateActualJson(adminContact.getRepoId())).isEqualTo(
|
||||
generateExpectedJsonWithTopLevelEntries(adminContact.getRepoId(), "rdap_contact.json"));
|
||||
generateExpectedJsonWithTopLevelEntries(
|
||||
adminContact.getRepoId(), "rdap_associated_contact.json"));
|
||||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidTechContact_works() throws Exception {
|
||||
assertThat(generateActualJson(techContact.getRepoId())).isEqualTo(
|
||||
generateExpectedJsonWithTopLevelEntries(techContact.getRepoId(), "rdap_contact.json"));
|
||||
generateExpectedJsonWithTopLevelEntries(
|
||||
techContact.getRepoId(), "rdap_associated_contact.json"));
|
||||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
}
|
||||
|
||||
|
@ -272,7 +275,8 @@ public class RdapEntityActionTest {
|
|||
@Test
|
||||
public void testQueryParameter_ignored() throws Exception {
|
||||
assertThat(generateActualJson(techContact.getRepoId() + "?key=value")).isEqualTo(
|
||||
generateExpectedJsonWithTopLevelEntries(techContact.getRepoId(), "rdap_contact.json"));
|
||||
generateExpectedJsonWithTopLevelEntries(
|
||||
techContact.getRepoId(), "rdap_associated_contact.json"));
|
||||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,9 +74,11 @@ public class RdapJsonFormatterTest {
|
|||
private HostResource hostResourceIpv6;
|
||||
private HostResource hostResourceBoth;
|
||||
private HostResource hostResourceNoAddresses;
|
||||
private HostResource hostResourceNotLinked;
|
||||
private ContactResource contactResourceRegistrant;
|
||||
private ContactResource contactResourceAdmin;
|
||||
private ContactResource contactResourceTech;
|
||||
private ContactResource contactResourceNotLinked;
|
||||
|
||||
private static final String LINK_BASE = "http://myserver.example.com/";
|
||||
private static final String LINK_BASE_NO_TRAILING_SLASH = "http://myserver.example.com";
|
||||
|
@ -116,6 +118,12 @@ public class RdapJsonFormatterTest {
|
|||
"bog@cat.みんな",
|
||||
ImmutableList.of("Chamber Door", "upper level"),
|
||||
clock.nowUtc().minusYears(3));
|
||||
contactResourceNotLinked = makeAndPersistContactResource(
|
||||
"8372808-QRL",
|
||||
"The Wizard",
|
||||
"dog@cat.みんな",
|
||||
ImmutableList.of("Somewhere", "Over the Rainbow"),
|
||||
clock.nowUtc().minusYears(4));
|
||||
hostResourceIpv4 = makeAndPersistHostResource(
|
||||
"ns1.cat.みんな", "1.2.3.4", clock.nowUtc().minusYears(1));
|
||||
hostResourceIpv6 = makeAndPersistHostResource(
|
||||
|
@ -124,6 +132,8 @@ public class RdapJsonFormatterTest {
|
|||
"ns3.cat.みんな", "1.2.3.4", "bad:f00d:cafe:0:0:0:15:beef", clock.nowUtc().minusYears(3));
|
||||
hostResourceNoAddresses = makeAndPersistHostResource(
|
||||
"ns4.cat.みんな", null, clock.nowUtc().minusYears(4));
|
||||
hostResourceNotLinked = makeAndPersistHostResource(
|
||||
"ns5.cat.みんな", null, clock.nowUtc().minusYears(5));
|
||||
domainResourceFull = persistResource(
|
||||
makeDomainResource(
|
||||
"cat.みんな",
|
||||
|
@ -143,6 +153,18 @@ public class RdapJsonFormatterTest {
|
|||
null,
|
||||
registrar));
|
||||
|
||||
// Create an unused domain that references hostResourceBoth and hostResourceNoAddresses so that
|
||||
// they will have "associated" (ie, StatusValue.LINKED) status.
|
||||
persistResource(
|
||||
makeDomainResource(
|
||||
"dog.みんな",
|
||||
contactResourceRegistrant,
|
||||
contactResourceAdmin,
|
||||
contactResourceTech,
|
||||
hostResourceBoth,
|
||||
hostResourceNoAddresses,
|
||||
registrar));
|
||||
|
||||
// history entries
|
||||
persistResource(
|
||||
makeHistoryEntry(
|
||||
|
@ -223,21 +245,36 @@ public class RdapJsonFormatterTest {
|
|||
@Test
|
||||
public void testHost_ipv4() throws Exception {
|
||||
assertThat(rdapJsonFormatter.makeRdapJsonForHost(
|
||||
hostResourceIpv4, false, LINK_BASE, WHOIS_SERVER, clock.nowUtc(), OutputDataType.FULL))
|
||||
hostResourceIpv4,
|
||||
false,
|
||||
LINK_BASE,
|
||||
WHOIS_SERVER,
|
||||
clock.nowUtc(),
|
||||
OutputDataType.FULL))
|
||||
.isEqualTo(loadJson("rdapjson_host_ipv4.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHost_ipv6() throws Exception {
|
||||
assertThat(rdapJsonFormatter.makeRdapJsonForHost(
|
||||
hostResourceIpv6, false, LINK_BASE, WHOIS_SERVER, clock.nowUtc(), OutputDataType.FULL))
|
||||
hostResourceIpv6,
|
||||
false,
|
||||
LINK_BASE,
|
||||
WHOIS_SERVER,
|
||||
clock.nowUtc(),
|
||||
OutputDataType.FULL))
|
||||
.isEqualTo(loadJson("rdapjson_host_ipv6.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHost_both() throws Exception {
|
||||
assertThat(rdapJsonFormatter.makeRdapJsonForHost(
|
||||
hostResourceBoth, false, LINK_BASE, WHOIS_SERVER, clock.nowUtc(), OutputDataType.FULL))
|
||||
hostResourceBoth,
|
||||
false,
|
||||
LINK_BASE,
|
||||
WHOIS_SERVER,
|
||||
clock.nowUtc(),
|
||||
OutputDataType.FULL))
|
||||
.isEqualTo(loadJson("rdapjson_host_both.json"));
|
||||
}
|
||||
|
||||
|
@ -265,6 +302,18 @@ public class RdapJsonFormatterTest {
|
|||
.isEqualTo(loadJson("rdapjson_host_no_addresses.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHost_notLinked() throws Exception {
|
||||
assertThat(rdapJsonFormatter.makeRdapJsonForHost(
|
||||
hostResourceNotLinked,
|
||||
false,
|
||||
LINK_BASE,
|
||||
WHOIS_SERVER,
|
||||
clock.nowUtc(),
|
||||
OutputDataType.FULL))
|
||||
.isEqualTo(loadJson("rdapjson_host_not_linked.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRegistrant() throws Exception {
|
||||
assertThat(
|
||||
|
@ -363,6 +412,20 @@ public class RdapJsonFormatterTest {
|
|||
.isEqualTo(loadJson("rdapjson_rolelesscontact.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUnlinkedContact() throws Exception {
|
||||
assertThat(
|
||||
rdapJsonFormatter.makeRdapJsonForContact(
|
||||
contactResourceNotLinked,
|
||||
false,
|
||||
Optional.<DesignatedContact.Type>absent(),
|
||||
LINK_BASE,
|
||||
WHOIS_SERVER,
|
||||
clock.nowUtc(),
|
||||
OutputDataType.FULL))
|
||||
.isEqualTo(loadJson("rdapjson_unlinkedcontact.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDomain_full() throws Exception {
|
||||
assertThat(rdapJsonFormatter.makeRdapJsonForDomain(
|
||||
|
|
|
@ -267,16 +267,20 @@ public class RdapNameserverSearchActionTest {
|
|||
assertThat(generateActualJsonWithName("ns1.cat.lol"))
|
||||
.isEqualTo(
|
||||
generateExpectedJsonForNameserver(
|
||||
"ns1.cat.lol", null, "2-ROID", "v4", "1.2.3.4", "rdap_host.json"));
|
||||
"ns1.cat.lol", null, "2-ROID", "v4", "1.2.3.4", "rdap_host_linked.json"));
|
||||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNameMatch_ns2_cat_lol_found() throws Exception {
|
||||
assertThat(generateActualJsonWithName("ns2.cat.lol"))
|
||||
.isEqualTo(
|
||||
generateExpectedJsonForNameserver(
|
||||
"ns2.cat.lol", null, "4-ROID", "v6", "bad:f00d:cafe::15:beef", "rdap_host.json"));
|
||||
.isEqualTo(generateExpectedJsonForNameserver(
|
||||
"ns2.cat.lol",
|
||||
null,
|
||||
"4-ROID",
|
||||
"v6",
|
||||
"bad:f00d:cafe::15:beef",
|
||||
"rdap_host_linked.json"));
|
||||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
}
|
||||
|
||||
|
@ -392,7 +396,7 @@ public class RdapNameserverSearchActionTest {
|
|||
"4-ROID",
|
||||
"v6",
|
||||
"bad:f00d:cafe::15:beef",
|
||||
"rdap_host.json"));
|
||||
"rdap_host_linked.json"));
|
||||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
}
|
||||
|
||||
|
@ -401,7 +405,7 @@ public class RdapNameserverSearchActionTest {
|
|||
assertThat(generateActualJsonWithIp("1.2.3.4"))
|
||||
.isEqualTo(
|
||||
generateExpectedJsonForNameserver(
|
||||
"ns1.cat.lol", null, "2-ROID", "v4", "1.2.3.4", "rdap_host.json"));
|
||||
"ns1.cat.lol", null, "2-ROID", "v4", "1.2.3.4", "rdap_host_linked.json"));
|
||||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
}
|
||||
|
||||
|
|
49
javatests/google/registry/rdap/testdata/rdap_associated_contact.json
vendored
Normal file
49
javatests/google/registry/rdap/testdata/rdap_associated_contact.json
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
"objectClassName" : "entity",
|
||||
"handle" : "%NAME%",
|
||||
"status" : ["active", "associated"],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
"value" : "https://example.com/rdap/entity/%NAME%",
|
||||
"rel" : "self",
|
||||
"href": "https://example.com/rdap/entity/%NAME%",
|
||||
"type" : "application/rdap+json"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "last update of RDAP database",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"vcardArray" :
|
||||
[
|
||||
"vcard",
|
||||
[
|
||||
["version", {}, "text", "4.0"],
|
||||
["fn", {}, "text", "%FULLNAME%"],
|
||||
["org", {}, "text", "GOOGLE INCORPORATED <script>"],
|
||||
["adr", {}, "text",
|
||||
[
|
||||
"",
|
||||
"",
|
||||
[ %ADDRESS% ],
|
||||
"KOKOMO",
|
||||
"BM",
|
||||
"31337",
|
||||
"United States"
|
||||
]
|
||||
],
|
||||
["tel", {"type" : ["voice"]}, "uri", "tel:+1.2126660420"],
|
||||
["tel", {"type" : ["fax"]}, "uri", "tel:+1.2126660420"],
|
||||
["email", {}, "text", "%EMAIL%"]
|
||||
]
|
||||
]
|
||||
}
|
||||
|
|
@ -36,7 +36,8 @@
|
|||
"nameservers": [
|
||||
{
|
||||
"status": [
|
||||
"active"
|
||||
"active",
|
||||
"associated"
|
||||
],
|
||||
"handle": "8-ROID",
|
||||
"links": [
|
||||
|
@ -68,7 +69,8 @@
|
|||
},
|
||||
{
|
||||
"status": [
|
||||
"active"
|
||||
"active",
|
||||
"associated"
|
||||
],
|
||||
"handle": "A-ROID",
|
||||
"links": [
|
||||
|
@ -103,7 +105,8 @@
|
|||
"entities": [
|
||||
{
|
||||
"status": [
|
||||
"active"
|
||||
"active",
|
||||
"associated"
|
||||
],
|
||||
"handle": "4-ROID",
|
||||
"roles": [
|
||||
|
@ -195,7 +198,8 @@
|
|||
},
|
||||
{
|
||||
"status": [
|
||||
"active"
|
||||
"active",
|
||||
"associated"
|
||||
],
|
||||
"handle": "6-ROID",
|
||||
"roles": [
|
||||
|
@ -287,7 +291,8 @@
|
|||
},
|
||||
{
|
||||
"status": [
|
||||
"active"
|
||||
"active",
|
||||
"associated"
|
||||
],
|
||||
"handle": "2-ROID",
|
||||
"roles": [
|
||||
|
|
|
@ -37,7 +37,8 @@
|
|||
"nameservers": [
|
||||
{
|
||||
"status": [
|
||||
"active"
|
||||
"active",
|
||||
"associated"
|
||||
],
|
||||
"handle": "8-ROID",
|
||||
"links": [
|
||||
|
@ -69,7 +70,8 @@
|
|||
},
|
||||
{
|
||||
"status": [
|
||||
"active"
|
||||
"active",
|
||||
"associated"
|
||||
],
|
||||
"handle": "A-ROID",
|
||||
"links": [
|
||||
|
@ -104,7 +106,8 @@
|
|||
"entities": [
|
||||
{
|
||||
"status": [
|
||||
"active"
|
||||
"active",
|
||||
"associated"
|
||||
],
|
||||
"handle": "4-ROID",
|
||||
"roles": [
|
||||
|
@ -196,7 +199,8 @@
|
|||
},
|
||||
{
|
||||
"status": [
|
||||
"active"
|
||||
"active",
|
||||
"associated"
|
||||
],
|
||||
"handle": "6-ROID",
|
||||
"roles": [
|
||||
|
@ -288,7 +292,8 @@
|
|||
},
|
||||
{
|
||||
"status": [
|
||||
"active"
|
||||
"active",
|
||||
"associated"
|
||||
],
|
||||
"handle": "2-ROID",
|
||||
"roles": [
|
||||
|
|
33
javatests/google/registry/rdap/testdata/rdap_host_linked.json
vendored
Normal file
33
javatests/google/registry/rdap/testdata/rdap_host_linked.json
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"status": [
|
||||
"active",
|
||||
"associated"
|
||||
],
|
||||
"ldhName": "%NAME%",
|
||||
"handle": "%HANDLE%",
|
||||
"links": [
|
||||
{
|
||||
"href": "https://example.tld/rdap/nameserver/%NAME%",
|
||||
"type": "application/rdap+json",
|
||||
"rel": "self",
|
||||
"value": "https://example.tld/rdap/nameserver/%NAME%"
|
||||
}
|
||||
],
|
||||
"ipAddresses": {
|
||||
"%ADDRESSTYPE%": [
|
||||
"%ADDRESS%"
|
||||
]
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "1999-01-01T00:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "last update of RDAP database",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"objectClassName": "nameserver"
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
{
|
||||
"objectClassName" : "nameserver",
|
||||
"handle" : "4-ROID",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"ldhName" : "ns2.cat.lol",
|
||||
"links" :
|
||||
[
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"objectClassName" : "entity",
|
||||
"handle" : "4-ROID",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"roles" : ["administrative"],
|
||||
"links" :
|
||||
[
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"objectClassName" : "domain",
|
||||
"handle" : "10-Q9JYB4C",
|
||||
"handle" : "14-Q9JYB4C",
|
||||
"ldhName" : "cat.xn--q9jyb4c",
|
||||
"unicodeName" : "cat.みんな",
|
||||
"status" :
|
||||
|
@ -42,10 +42,10 @@
|
|||
[
|
||||
{
|
||||
"objectClassName" : "nameserver",
|
||||
"handle" : "8-ROID",
|
||||
"handle" : "A-ROID",
|
||||
"ldhName" : "ns1.cat.xn--q9jyb4c",
|
||||
"unicodeName" : "ns1.cat.みんな",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
|
@ -73,10 +73,10 @@
|
|||
},
|
||||
{
|
||||
"objectClassName" : "nameserver",
|
||||
"handle" : "A-ROID",
|
||||
"handle" : "C-ROID",
|
||||
"ldhName" : "ns2.cat.xn--q9jyb4c",
|
||||
"unicodeName" : "ns2.cat.みんな",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
|
@ -108,7 +108,7 @@
|
|||
{
|
||||
"objectClassName" : "entity",
|
||||
"handle" : "4-ROID",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"roles" : ["administrative"],
|
||||
"links" :
|
||||
[
|
||||
|
@ -157,7 +157,7 @@
|
|||
{
|
||||
"objectClassName" : "entity",
|
||||
"handle" : "6-ROID",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"roles" : ["technical"],
|
||||
"links" :
|
||||
[
|
||||
|
@ -206,7 +206,7 @@
|
|||
{
|
||||
"objectClassName" : "entity",
|
||||
"handle" : "2-ROID",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"roles" : ["registrant"],
|
||||
"links" :
|
||||
[
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"objectClassName" : "domain",
|
||||
"handle" : "11-Q9JYB4C",
|
||||
"handle" : "15-Q9JYB4C",
|
||||
"ldhName" : "fish.xn--q9jyb4c",
|
||||
"unicodeName" : "fish.みんな",
|
||||
"status" :
|
||||
|
@ -44,7 +44,7 @@
|
|||
{
|
||||
"objectClassName" : "entity",
|
||||
"handle" : "4-ROID",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"roles" : ["administrative"],
|
||||
"links" :
|
||||
[
|
||||
|
@ -93,7 +93,7 @@
|
|||
{
|
||||
"objectClassName" : "entity",
|
||||
"handle" : "6-ROID",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"roles" : ["technical"],
|
||||
"links" :
|
||||
[
|
||||
|
@ -142,7 +142,7 @@
|
|||
{
|
||||
"objectClassName" : "entity",
|
||||
"handle" : "2-ROID",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"roles" : ["registrant"],
|
||||
"links" :
|
||||
[
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"objectClassName" : "domain",
|
||||
"handle" : "10-Q9JYB4C",
|
||||
"handle" : "14-Q9JYB4C",
|
||||
"ldhName" : "cat.xn--q9jyb4c",
|
||||
"unicodeName" : "cat.みんな",
|
||||
"status" :
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"objectClassName" : "nameserver",
|
||||
"handle" : "C-ROID",
|
||||
"handle" : "E-ROID",
|
||||
"ldhName" : "ns3.cat.xn--q9jyb4c",
|
||||
"unicodeName" : "ns3.cat.みんな",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"objectClassName" : "nameserver",
|
||||
"handle" : "C-ROID",
|
||||
"handle" : "E-ROID",
|
||||
"ldhName" : "ns3.cat.xn--q9jyb4c",
|
||||
"unicodeName" : "ns3.cat.みんな",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"objectClassName" : "nameserver",
|
||||
"handle" : "8-ROID",
|
||||
"handle" : "A-ROID",
|
||||
"ldhName" : "ns1.cat.xn--q9jyb4c",
|
||||
"unicodeName" : "ns1.cat.みんな",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"objectClassName" : "nameserver",
|
||||
"handle" : "A-ROID",
|
||||
"handle" : "C-ROID",
|
||||
"ldhName" : "ns2.cat.xn--q9jyb4c",
|
||||
"unicodeName" : "ns2.cat.みんな",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"objectClassName" : "nameserver",
|
||||
"handle" : "E-ROID",
|
||||
"handle" : "10-ROID",
|
||||
"ldhName" : "ns4.cat.xn--q9jyb4c",
|
||||
"unicodeName" : "ns4.cat.みんな",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
|
|
27
javatests/google/registry/rdap/testdata/rdapjson_host_not_linked.json
vendored
Normal file
27
javatests/google/registry/rdap/testdata/rdapjson_host_not_linked.json
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"objectClassName" : "nameserver",
|
||||
"handle" : "12-ROID",
|
||||
"ldhName" : "ns5.cat.xn--q9jyb4c",
|
||||
"unicodeName" : "ns5.cat.みんな",
|
||||
"status" : ["active"],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
"value" : "http://myserver.example.com/nameserver/ns5.cat.xn--q9jyb4c",
|
||||
"rel" : "self",
|
||||
"href" : "http://myserver.example.com/nameserver/ns5.cat.xn--q9jyb4c",
|
||||
"type" : "application/rdap+json"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "1995-01-01T00:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "last update of RDAP database",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"objectClassName" : "entity",
|
||||
"handle" : "2-ROID",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"roles" : ["registrant"],
|
||||
"links" :
|
||||
[
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"objectClassName" : "entity",
|
||||
"handle" : "2-ROID",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"roles" : ["registrant"],
|
||||
"links" :
|
||||
[
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"objectClassName" : "entity",
|
||||
"handle" : "2-ROID",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"roles" : ["registrant"],
|
||||
"links" :
|
||||
[
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"objectClassName" : "entity",
|
||||
"handle" : "6-ROID",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"objectClassName" : "entity",
|
||||
"handle" : "6-ROID",
|
||||
"status" : ["active"],
|
||||
"status" : ["active", "associated"],
|
||||
"roles" : ["technical"],
|
||||
"links" :
|
||||
[
|
||||
|
|
48
javatests/google/registry/rdap/testdata/rdapjson_unlinkedcontact.json
vendored
Normal file
48
javatests/google/registry/rdap/testdata/rdapjson_unlinkedcontact.json
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
"objectClassName" : "entity",
|
||||
"handle" : "8-ROID",
|
||||
"status" : ["active"],
|
||||
"links" :
|
||||
[
|
||||
{
|
||||
"value" : "http://myserver.example.com/entity/8-ROID",
|
||||
"rel" : "self",
|
||||
"href" : "http://myserver.example.com/entity/8-ROID",
|
||||
"type" : "application/rdap+json"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"eventAction": "registration",
|
||||
"eventActor": "foo",
|
||||
"eventDate": "1996-01-01T00:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"eventAction": "last update of RDAP database",
|
||||
"eventDate": "2000-01-01T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"vcardArray" :
|
||||
[
|
||||
"vcard",
|
||||
[
|
||||
["version", {}, "text", "4.0"],
|
||||
["fn", {}, "text", "The Wizard"],
|
||||
["org", {}, "text", "GOOGLE INCORPORATED <script>"],
|
||||
["adr", {}, "text", [
|
||||
"",
|
||||
"",
|
||||
[
|
||||
"Somewhere",
|
||||
"Over the Rainbow"
|
||||
],
|
||||
"KOKOMO",
|
||||
"BM",
|
||||
"31337",
|
||||
"United States"]],
|
||||
["tel", {"type" : ["voice"]}, "uri", "tel:+1.2126660420"],
|
||||
["tel", {"type" : ["fax"]}, "uri", "tel:+1.2126660420"],
|
||||
["email", {}, "text", "dog@cat.みんな"]
|
||||
]
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue