From a88b242385ac26e75bd0e963894eed48352d38dc Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Thu, 5 Sep 2013 17:38:31 +0100 Subject: [PATCH] Wed Apr 4 19:13:59 BST 2012 Brian Warner * move IServer from storage_client.py to interfaces.py --- src/allmydata/interfaces.py | 9 +++++++++ src/allmydata/storage_client.py | 13 ++----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/allmydata/interfaces.py b/src/allmydata/interfaces.py index a8b11802..facfc922 100644 --- a/src/allmydata/interfaces.py +++ b/src/allmydata/interfaces.py @@ -428,6 +428,15 @@ class IStorageBroker(Interface): repeatable way, to distribute load over many peers. """ +class IServer(Interface): + """I live in the client, and represent a single server.""" + def start_connecting(tub, trigger_cb): + pass + def get_nickname(): + pass + def get_rref(): + pass + class IMutableSlotWriter(Interface): """ diff --git a/src/allmydata/storage_client.py b/src/allmydata/storage_client.py index b282dedd..425d2e48 100644 --- a/src/allmydata/storage_client.py +++ b/src/allmydata/storage_client.py @@ -30,9 +30,9 @@ the foolscap-based server implemented in src/allmydata/storage/*.py . import time -from zope.interface import implements, Interface +from zope.interface import implements from foolscap.api import eventually -from allmydata.interfaces import IStorageBroker +from allmydata.interfaces import IStorageBroker, IServer from allmydata.util import idlib, log from allmydata.util.assertutil import precondition from allmydata.util.rrefutil import add_version_to_remote_reference @@ -137,15 +137,6 @@ class StorageFarmBroker: return self.servers[serverid].get_nickname() return None -class IServer(Interface): - """I live in the client, and represent a single server.""" - def start_connecting(tub, trigger_cb): - pass - def get_nickname(): - pass - def get_rref(): - pass - class NativeStorageServer: """I hold information about a storage server that we want to connect to. If we are connected, I hold the RemoteReference, their host address, and -- 2.45.2