]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commit - src/allmydata/interfaces.py
split IDisplayableServer from IServer, add sb.get_stub_server()
authorBrian Warner <warner@lothar.com>
Tue, 22 May 2012 04:17:27 +0000 (21:17 -0700)
committerBrian Warner <warner@lothar.com>
Tue, 22 May 2012 04:17:27 +0000 (21:17 -0700)
commit97a1eb6ebf682e84627e6c74e6dd64e72a7f48e7
tree2f00127397f16b880bc3af5024a5488e3e01041b
parent3d771132a843a85578dc23a6cac55b4fae09fc64
split IDisplayableServer from IServer, add sb.get_stub_server()

IDisplayableServer includes just enough functionality to call
.get_name() and friends, which is all that the UploadResults really
need. IServer is a superset that includes actual share-manipulation
methods. StubServer instances provide only IDisplayableServer, while
actual NativeStorageServer instances provide the full IServer interface.

When the Helper sends a serverid (so we know what to call the server but
nothing else about it, and have no corresponding NativeStorageServer
object to reference), but we want to store an IDisplayableServer in the
UploadResults, we create a synthetic StubServer "server" and store that
instead.
src/allmydata/interfaces.py
src/allmydata/storage_client.py