Sat Aug 7 20:39:28 BST 2010 writefaruq@gmail.com * multiple-introducer-client-side-001-x1.dpatch client.py: Fixed warn_flag error Mon Aug 9 07:58:35 BST 2010 writefaruq@gmail.com * multiple-introducer-client-side-001-x2.dpatch client.py: Done minor tweaks for handling test with empty FURL in tahoe.cfg file test/test_web.py: Changed single introducer's attributes (e.g. introducer_furl) into that of multiple introduers web/root.py: Done minor tweak for handling test with no connected_introducers New patches: [multiple-introducer-client-side-001-x1.dpatch writefaruq@gmail.com**20100807193928 Ignore-this: da33ee539951a2e8c97b0520398f6569 client.py: Fixed warn_flag error ] { hunk ./src/allmydata/client.py 188 def init_introducer_clients(self): self.introducer_furls = [] - + self.warn_flag = False # Try to load ""BASEDIR/introducers" cfg file cfg = os.path.join(self.basedir, MULTI_INTRODUCERS_CFG) if os.path.exists(cfg): hunk ./src/allmydata/client.py 210 f.write('\n') f.close() if furl_count > 1: + self.warn_flag = True self.log("introducers config file modified.") print "Warning! introducers config file modified." } [multiple-introducer-client-side-001-x2.dpatch writefaruq@gmail.com**20100809065835 Ignore-this: e6ba4cbb52b1e25d9c45b4a1b1d5a5f8 client.py: Done minor tweaks for handling test with empty FURL in tahoe.cfg file test/test_web.py: Changed single introducer's attributes (e.g. introducer_furl) into that of multiple introduers web/root.py: Done minor tweak for handling test with no connected_introducers ] { hunk ./src/allmydata/client.py 203 # read furl from tahoe.cfg ifurl = self.get_config("client", "introducer.furl", None) - if ifurl not in self.introducer_furls: + if ifurl and ifurl not in self.introducer_furls: self.introducer_furls.append(ifurl) f = open(cfg, 'a') hunk ./src/allmydata/client.py 206 - f.writelines(ifurl) + f.write(ifurl) f.write('\n') f.close() if furl_count > 1: hunk ./src/allmydata/test/test_web.py 104 service.MultiService.__init__(self) self.nodeid = "fake_nodeid" self.nickname = "fake_nickname" - self.introducer_furl = "None" + self.introducer_furls = "None" self.stats_provider = FakeStatsProvider() self._secret_holder = SecretHolder("lease secret", "convergence secret") self.helper = None hunk ./src/allmydata/test/test_web.py 110 self.convergence = "some random string" self.storage_broker = StorageFarmBroker(None, permute_peers=True) - self.introducer_client = None + self.introducer_clients = None self.history = FakeHistory() self.uploader = FakeUploader() self.uploader.setServiceParent(self) hunk ./src/allmydata/web/root.py 222 # In case we configure multiple introducers def data_introducers(self, ctx, data): + connection_status = [] connection_status = self.client.connected_to_introducer() s = [] hunk ./src/allmydata/web/root.py 225 - furls = self.client.introducer_furls + furls = self.client.introducer_furls for furl in furls: hunk ./src/allmydata/web/root.py 227 - i = furls.index(furl) - if connection_status[i]: - s.append( (furl, "Yes") ) - else: - s.append( (furl, "No") ) + if connection_status: + i = furls.index(furl) + if connection_status[i]: + s.append( (furl, "Yes") ) + else: + s.append( (furl, "No") ) s.sort() return s } Context: [multi-introducer: add tests of multi-introducers as attached by Faruq to ref #68 zooko@zooko.com**20100807063706 Ignore-this: b4341b039d7888dd164370f033266a54 http://tahoe-lafs.org/trac/tahoe-lafs/attachment/ticket/68/test_multi_introducers.4.py ] [multiple-introducer-client-side-002.dpatch writefaruq@gmail.com**20100801150056 Ignore-this: df8eab0bfc5cd05c242b47b8b414454 docs/architecture.txt: Added description of using multiple introducers docs/configuration.txt: Changed the method of configuring introducer(s) docs/running.html: Introduced the multiple introducers ] [multiple-introducer-client-side-001.dpatch writefaruq@gmail.com**20100801142304 Ignore-this: c122fc67dfc567c22f1be713f949f415 This patch reads a multiple introducers config file "basedir/introducers" and creates necessary connections to all introducers and shows them on client's WUI or welcome page. ] [TAG allmydata-tahoe-1.8.0c1 david-sarah@jacaranda.org**20100807004546 Ignore-this: 484ff2513774f3b48ca49c992e878b89 ] Patch bundle hash: 8e85e242e9379715bae2900d92c12a8bac981250