move IServer from storage_client.py to interfaces.py
authorBrian Warner <warner@lothar.com>
Wed, 4 Apr 2012 18:13:59 +0000 (11:13 -0700)
committerBrian Warner <warner@lothar.com>
Wed, 4 Apr 2012 18:13:59 +0000 (11:13 -0700)
src/allmydata/interfaces.py
src/allmydata/storage_client.py

index db1c6b522fa5f38b6ca0b7b6b55c01ea2e2c2a96..a73ce8602acd182c50ff87d7379b23a4fd3e5675 100644 (file)
@@ -420,6 +420,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):
     """
index 72e6319afb2d4e594db4f4f241ce5ff080ef089f..763c2a063e3f0b59ca5d8248b3d83d9cae918b7c 100644 (file)
@@ -30,9 +30,9 @@ the foolscap-based server implemented in src/allmydata/storage/*.py .
 
 
 import re, 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 log, base32
 from allmydata.util.assertutil import precondition
 from allmydata.util.rrefutil import add_version_to_remote_reference
@@ -139,15 +139,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