commit ac26b0e18fbd7cf22cb830da0a6b0c707b110d82
Author: Karsten Loesing <karsten.loesing(a)gmx.net>
Date: Sat Jan 9 17:08:31 2016 +0100
Remove deprecated "family" field from details documents.
On August 25, 2015, we added the optional "alleged_family" and
"effective_family" fields and deprecated the likewise optional
"family" field in details documents. As of yesterday, Atlas (#16961),
Globe (#16962), and Compass (#17720) stopped using the "family" field
and switched over to the new fields. It's time to finally remove the
"family" field from details documents.
Implements #18026.
---
build.xml | 2 +-
src/main/java/org/torproject/onionoo/docs/DetailsDocument.java | 8 --------
src/main/java/org/torproject/onionoo/docs/DetailsStatus.java | 8 --------
.../java/org/torproject/onionoo/server/ResponseBuilder.java | 4 +---
.../torproject/onionoo/updater/NodeDetailsStatusUpdater.java | 1 -
.../org/torproject/onionoo/writer/DetailsDocumentWriter.java | 1 -
web/protocol.html | 7 +++++--
7 files changed, 7 insertions(+), 24 deletions(-)
diff --git a/build.xml b/build.xml
index de5d84a..8de738a 100644
--- a/build.xml
+++ b/build.xml
@@ -1,6 +1,6 @@
<project default="dist" name="onionoo" basedir=".">
- <property name="onionoo.protocol.version" value="3.0"/>
+ <property name="onionoo.protocol.version" value="3.1"/>
<property name="release.version"
value="${onionoo.protocol.version}.0"/>
<property name="javasources" value="src/main/java"/>
diff --git a/src/main/java/org/torproject/onionoo/docs/DetailsDocument.java b/src/main/java/org/torproject/onionoo/docs/DetailsDocument.java
index 69d8efe..38bbc3b 100644
--- a/src/main/java/org/torproject/onionoo/docs/DetailsDocument.java
+++ b/src/main/java/org/torproject/onionoo/docs/DetailsDocument.java
@@ -281,14 +281,6 @@ public class DetailsDocument extends Document {
return unescapeJSON(this.platform);
}
- private List<String> family;
- public void setFamily(List<String> family) {
- this.family = family;
- }
- public List<String> getFamily() {
- return this.family;
- }
-
private SortedSet<String> alleged_family;
public void setAllegedFamily(SortedSet<String> allegedFamily) {
this.alleged_family = allegedFamily;
diff --git a/src/main/java/org/torproject/onionoo/docs/DetailsStatus.java b/src/main/java/org/torproject/onionoo/docs/DetailsStatus.java
index 62e621b..460fb97 100644
--- a/src/main/java/org/torproject/onionoo/docs/DetailsStatus.java
+++ b/src/main/java/org/torproject/onionoo/docs/DetailsStatus.java
@@ -102,14 +102,6 @@ public class DetailsStatus extends Document {
return unescapeJSON(this.platform);
}
- private List<String> family;
- public void setFamily(List<String> family) {
- this.family = family;
- }
- public List<String> getFamily() {
- return this.family;
- }
-
private SortedSet<String> alleged_family;
public void setAllegedFamily(SortedSet<String> allegedFamily) {
this.alleged_family = allegedFamily;
diff --git a/src/main/java/org/torproject/onionoo/server/ResponseBuilder.java b/src/main/java/org/torproject/onionoo/server/ResponseBuilder.java
index 4afa782..76790d5 100644
--- a/src/main/java/org/torproject/onionoo/server/ResponseBuilder.java
+++ b/src/main/java/org/torproject/onionoo/server/ResponseBuilder.java
@@ -70,7 +70,7 @@ public class ResponseBuilder {
return this.charsWritten;
}
- private static final String PROTOCOL_VERSION = "3.0";
+ private static final String PROTOCOL_VERSION = "3.1";
private static final String NEXT_MAJOR_VERSION_SCHEDULED = null;
@@ -248,8 +248,6 @@ public class ResponseBuilder {
dd.setContact(detailsDocument.getContact());
} else if (field.equals("platform")) {
dd.setPlatform(detailsDocument.getPlatform());
- } else if (field.equals("family")) {
- dd.setFamily(detailsDocument.getFamily());
} else if (field.equals("consensus_weight_fraction")) {
dd.setConsensusWeightFraction(
detailsDocument.getConsensusWeightFraction());
diff --git a/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java b/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java
index d28e249..b9552bf 100644
--- a/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java
+++ b/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java
@@ -172,7 +172,6 @@ public class NodeDetailsStatusUpdater implements DescriptorListener,
detailsStatus.setExitPolicy(descriptor.getExitPolicyLines());
detailsStatus.setContact(descriptor.getContact());
detailsStatus.setPlatform(descriptor.getPlatform());
- detailsStatus.setFamily(descriptor.getFamilyEntries());
if (descriptor.getFamilyEntries() != null) {
SortedSet<String> declaredFamily = new TreeSet<String>();
for (String familyMember : descriptor.getFamilyEntries()) {
diff --git a/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java b/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java
index 6747c2c..8360a05 100644
--- a/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java
+++ b/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java
@@ -111,7 +111,6 @@ public class DetailsDocumentWriter implements DocumentWriter {
detailsDocument.setExitPolicy(detailsStatus.getExitPolicy());
detailsDocument.setContact(detailsStatus.getContact());
detailsDocument.setPlatform(detailsStatus.getPlatform());
- detailsDocument.setFamily(detailsStatus.getFamily());
if (detailsStatus.getAllegedFamily() != null &&
!detailsStatus.getAllegedFamily().isEmpty()) {
SortedSet<String> allegedFamily = new TreeSet<String>();
diff --git a/web/protocol.html b/web/protocol.html
index eee99ba..98c3343 100644
--- a/web/protocol.html
+++ b/web/protocol.html
@@ -185,6 +185,8 @@ documents on August 13, 2015.</li>
documents on August 25, 2015.</li>
<li><strong>3.0</strong>: Extended search parameter to match any 4 hex
characters of a space-separated fingerprint on November 15, 2015.</li>
+<li><strong>3.1</strong>: Removed optional "family" field on January 18,
+2016.</li>
</ul>
</div> <!-- box -->
@@ -1179,7 +1181,7 @@ the relay did not report which version it runs.
</li>
<li>
-<b>family</b>
+<b><font color="red">family</font></b>
<code class="typeof">array of strings</code>
<span class="required-false">optional</span>
<p>
@@ -1190,7 +1192,8 @@ relay part of their family, so that the effective family of this relay may
be smaller.
Omitted if empty or if descriptor containing this information cannot be
found.
-<font color="blue">Deprecated on August 25, 2015.</font>
+<font color="red">Deprecated on August 25, 2015, removed on January 18,
+2016.</font>
</p>
</li>