[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [onionoo/master] Remove pool assignments from bridge details documents.



commit 30809d9e600019c0e3a14967f963e9f13527c8d1
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Tue Dec 2 11:36:59 2014 +0100

    Remove pool assignments from bridge details documents.
    
    Related to #11052.
---
 .../org/torproject/onionoo/docs/DetailsDocument.java |    8 --------
 .../org/torproject/onionoo/docs/DetailsStatus.java   |   10 ----------
 .../torproject/onionoo/server/ResponseBuilder.java   |    2 --
 .../onionoo/updater/NodeDetailsStatusUpdater.java    |   18 ------------------
 .../onionoo/writer/DetailsDocumentWriter.java        |    1 -
 web/protocol.html                                    |    3 ++-
 6 files changed, 2 insertions(+), 40 deletions(-)

diff --git a/src/main/java/org/torproject/onionoo/docs/DetailsDocument.java b/src/main/java/org/torproject/onionoo/docs/DetailsDocument.java
index 9e0a067..06b74cf 100644
--- a/src/main/java/org/torproject/onionoo/docs/DetailsDocument.java
+++ b/src/main/java/org/torproject/onionoo/docs/DetailsDocument.java
@@ -349,14 +349,6 @@ public class DetailsDocument extends Document {
     return this.hibernating;
   }
 
-  private String pool_assignment;
-  public void setPoolAssignment(String poolAssignment) {
-    this.pool_assignment = poolAssignment;
-  }
-  public String getPoolAssignment() {
-    return this.pool_assignment;
-  }
-
   private List<String> transports;
   public void setTransports(List<String> transports) {
     this.transports = (transports != null && !transports.isEmpty()) ?
diff --git a/src/main/java/org/torproject/onionoo/docs/DetailsStatus.java b/src/main/java/org/torproject/onionoo/docs/DetailsStatus.java
index 085ce8d..96b01c2 100644
--- a/src/main/java/org/torproject/onionoo/docs/DetailsStatus.java
+++ b/src/main/java/org/torproject/onionoo/docs/DetailsStatus.java
@@ -290,16 +290,6 @@ public class DetailsStatus extends Document {
     return this.recommended_version;
   }
 
-  /* From bridge pool assignments: */
-
-  private String pool_assignment;
-  public void setPoolAssignment(String poolAssignment) {
-    this.pool_assignment = poolAssignment;
-  }
-  public String getPoolAssignment() {
-    return this.pool_assignment;
-  }
-
   /* From exit lists: */
 
   private Map<String, Long> exit_addresses;
diff --git a/src/main/java/org/torproject/onionoo/server/ResponseBuilder.java b/src/main/java/org/torproject/onionoo/server/ResponseBuilder.java
index ee92e95..fc22a7c 100644
--- a/src/main/java/org/torproject/onionoo/server/ResponseBuilder.java
+++ b/src/main/java/org/torproject/onionoo/server/ResponseBuilder.java
@@ -264,8 +264,6 @@ public class ResponseBuilder {
                 detailsDocument.getRecommendedVersion());
           } else if (field.equals("hibernating")) {
             dd.setHibernating(detailsDocument.getHibernating());
-          } else if (field.equals("pool_assignment")) {
-            dd.setPoolAssignment(detailsDocument.getPoolAssignment());
           } else if (field.equals("transports")) {
             dd.setTransports(detailsDocument.getTransports());
           }
diff --git a/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java b/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java
index 102c6df..5b879a6 100644
--- a/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java
+++ b/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java
@@ -16,7 +16,6 @@ import java.util.TreeSet;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.torproject.descriptor.BridgeNetworkStatus;
-import org.torproject.descriptor.BridgePoolAssignment;
 import org.torproject.descriptor.Descriptor;
 import org.torproject.descriptor.ExitList;
 import org.torproject.descriptor.ExitListEntry;
@@ -116,8 +115,6 @@ public class NodeDetailsStatusUpdater implements DescriptorListener,
     this.descriptorSource.registerDescriptorListener(this,
         DescriptorType.BRIDGE_EXTRA_INFOS);
     this.descriptorSource.registerDescriptorListener(this,
-        DescriptorType.BRIDGE_POOL_ASSIGNMENTS);
-    this.descriptorSource.registerDescriptorListener(this,
         DescriptorType.EXIT_LISTS);
   }
 
@@ -138,8 +135,6 @@ public class NodeDetailsStatusUpdater implements DescriptorListener,
     } else if (descriptor instanceof ExtraInfoDescriptor && !relay) {
       this.processBridgeExtraInfoDescriptor(
           (ExtraInfoDescriptor) descriptor);
-    } else if (descriptor instanceof BridgePoolAssignment) {
-      this.processBridgePoolAssignment((BridgePoolAssignment) descriptor);
     } else if (descriptor instanceof BridgeNetworkStatus) {
       this.processBridgeNetworkStatus((BridgeNetworkStatus) descriptor);
     }
@@ -313,14 +308,6 @@ public class NodeDetailsStatusUpdater implements DescriptorListener,
     }
   }
 
-  private Map<String, String> bridgePoolAssignments =
-      new HashMap<String, String>();
-
-  private void processBridgePoolAssignment(
-      BridgePoolAssignment bridgePoolAssignment) {
-    this.bridgePoolAssignments.putAll(bridgePoolAssignment.getEntries());
-  }
-
   private void processBridgeNetworkStatus(BridgeNetworkStatus status) {
     long publishedMillis = status.getPublishedMillis();
     if (publishedMillis > this.bridgesLastPublishedMillis) {
@@ -733,11 +720,6 @@ public class NodeDetailsStatusUpdater implements DescriptorListener,
         nodeStatus.setLastRdnsLookup(this.startedRdnsLookups);
       }
 
-      if (this.bridgePoolAssignments.containsKey(fingerprint)) {
-        detailsStatus.setPoolAssignment(
-            this.bridgePoolAssignments.get(fingerprint));
-      }
-
       detailsStatus.setRelay(nodeStatus.isRelay());
       detailsStatus.setRunning(nodeStatus.getLastSeenMillis() ==
           (nodeStatus.isRelay()
diff --git a/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java b/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java
index 59bb269..1a1ddc3 100644
--- a/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java
+++ b/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java
@@ -150,7 +150,6 @@ public class DetailsDocumentWriter implements DocumentWriter {
     detailsDocument.setAdvertisedBandwidth(
         detailsStatus.getAdvertisedBandwidth());
     detailsDocument.setPlatform(detailsStatus.getPlatform());
-    detailsDocument.setPoolAssignment(detailsStatus.getPoolAssignment());
     detailsDocument.setTransports(detailsStatus.getTransports());
     this.documentStore.store(detailsDocument, fingerprint);
   }
diff --git a/web/protocol.html b/web/protocol.html
index 3766d90..5f3b85f 100644
--- a/web/protocol.html
+++ b/web/protocol.html
@@ -1384,13 +1384,14 @@ information cannot be found.
 </li>
 
 <li>
-<b>pool_assignment</b>
+<b><font color="red">pool_assignment</font></b>
 <code class="typeof">string</code>
 <span class="required-false">optional</span>
 <p>
 Information of the pool that BridgeDB
 assigned this bridge to, including further assignment information if
 available.
+<font color="red">Removed on December 2, 2014.</font>
 </p>
 </li>
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits