From 38935bbca64adf80e32e4586822bbce6e9be1045 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Thu, 8 Dec 2016 15:22:49 -0800 Subject: [PATCH] remove old unused connection-status APIs --- src/allmydata/introducer/client.py | 6 ------ src/allmydata/storage_client.py | 9 --------- src/allmydata/test/web/test_web.py | 18 ++---------------- 3 files changed, 2 insertions(+), 31 deletions(-) diff --git a/src/allmydata/introducer/client.py b/src/allmydata/introducer/client.py index 83ce2975c..cc3b3dadb 100644 --- a/src/allmydata/introducer/client.py +++ b/src/allmydata/introducer/client.py @@ -339,9 +339,3 @@ class IntroducerClient(service.Service, Referenceable): def get_since(self): return self._since - - def get_last_received_data_time(self): - if self._publisher is None: - return None - else: - return self._publisher.getDataLastReceivedAt() diff --git a/src/allmydata/storage_client.py b/src/allmydata/storage_client.py index 73736f2ad..8c3854225 100644 --- a/src/allmydata/storage_client.py +++ b/src/allmydata/storage_client.py @@ -374,15 +374,6 @@ class NativeStorageServer(service.MultiService): def is_connected(self): return self._is_connected - def get_last_connect_time(self): - return self.last_connect_time - def get_last_loss_time(self): - return self.last_loss_time - def get_last_received_data_time(self): - if self.rref is None: - return None - else: - return self.rref.getDataLastReceivedAt() def get_available_space(self): version = self.get_version() diff --git a/src/allmydata/test/web/test_web.py b/src/allmydata/test/web/test_web.py index e607c8a6e..3d6f00b0a 100644 --- a/src/allmydata/test/web/test_web.py +++ b/src/allmydata/test/web/test_web.py @@ -165,20 +165,12 @@ class FakeDisplayableServer(StubServer): self.last_loss_time = last_loss_time self.last_rx_time = last_rx_time self.last_connect_time = last_connect_time - def on_status_changed(self, cb): + def on_status_changed(self, cb): # TODO: try to remove me cb(self) - def is_connected(self): + def is_connected(self): # TODO: remove me return self.connected def get_permutation_seed(self): return "" - def get_remote_host(self): - return "" - def get_last_loss_time(self): - return self.last_loss_time - def get_last_received_data_time(self): - return self.last_rx_time - def get_last_connect_time(self): - return self.last_connect_time def get_announcement(self): return self.announcement def get_nickname(self): @@ -674,12 +666,6 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi class MockIntroducerClient(object): def __init__(self, connected): self.connected = connected - def connected_to_introducer(self): - return self.connected - def get_since(self): - return 0 - def get_last_received_data_time(self): - return 0 def connection_status(self): return ConnectionStatus(self.connected, "summary", "description", 0, 0)