1 | Sat Aug 7 20:39:28 BST 2010 writefaruq@gmail.com |
---|
2 | * multiple-introducer-client-side-001-x1.dpatch |
---|
3 | client.py: Fixed warn_flag error |
---|
4 | |
---|
5 | |
---|
6 | Mon Aug 9 07:58:35 BST 2010 writefaruq@gmail.com |
---|
7 | * multiple-introducer-client-side-001-x2.dpatch |
---|
8 | client.py: Done minor tweaks for handling test with empty FURL in tahoe.cfg file |
---|
9 | test/test_web.py: Changed single introducer's attributes (e.g. introducer_furl) into that of multiple introduers |
---|
10 | web/root.py: Done minor tweak for handling test with no connected_introducers |
---|
11 | |
---|
12 | |
---|
13 | New patches: |
---|
14 | |
---|
15 | [multiple-introducer-client-side-001-x1.dpatch |
---|
16 | writefaruq@gmail.com**20100807193928 |
---|
17 | Ignore-this: da33ee539951a2e8c97b0520398f6569 |
---|
18 | client.py: Fixed warn_flag error |
---|
19 | |
---|
20 | ] { |
---|
21 | hunk ./src/allmydata/client.py 188 |
---|
22 | |
---|
23 | def init_introducer_clients(self): |
---|
24 | self.introducer_furls = [] |
---|
25 | - |
---|
26 | + self.warn_flag = False |
---|
27 | # Try to load ""BASEDIR/introducers" cfg file |
---|
28 | cfg = os.path.join(self.basedir, MULTI_INTRODUCERS_CFG) |
---|
29 | if os.path.exists(cfg): |
---|
30 | hunk ./src/allmydata/client.py 210 |
---|
31 | f.write('\n') |
---|
32 | f.close() |
---|
33 | if furl_count > 1: |
---|
34 | + self.warn_flag = True |
---|
35 | self.log("introducers config file modified.") |
---|
36 | print "Warning! introducers config file modified." |
---|
37 | |
---|
38 | } |
---|
39 | [multiple-introducer-client-side-001-x2.dpatch |
---|
40 | writefaruq@gmail.com**20100809065835 |
---|
41 | Ignore-this: e6ba4cbb52b1e25d9c45b4a1b1d5a5f8 |
---|
42 | client.py: Done minor tweaks for handling test with empty FURL in tahoe.cfg file |
---|
43 | test/test_web.py: Changed single introducer's attributes (e.g. introducer_furl) into that of multiple introduers |
---|
44 | web/root.py: Done minor tweak for handling test with no connected_introducers |
---|
45 | |
---|
46 | ] { |
---|
47 | hunk ./src/allmydata/client.py 203 |
---|
48 | |
---|
49 | # read furl from tahoe.cfg |
---|
50 | ifurl = self.get_config("client", "introducer.furl", None) |
---|
51 | - if ifurl not in self.introducer_furls: |
---|
52 | + if ifurl and ifurl not in self.introducer_furls: |
---|
53 | self.introducer_furls.append(ifurl) |
---|
54 | f = open(cfg, 'a') |
---|
55 | hunk ./src/allmydata/client.py 206 |
---|
56 | - f.writelines(ifurl) |
---|
57 | + f.write(ifurl) |
---|
58 | f.write('\n') |
---|
59 | f.close() |
---|
60 | if furl_count > 1: |
---|
61 | hunk ./src/allmydata/test/test_web.py 104 |
---|
62 | service.MultiService.__init__(self) |
---|
63 | self.nodeid = "fake_nodeid" |
---|
64 | self.nickname = "fake_nickname" |
---|
65 | - self.introducer_furl = "None" |
---|
66 | + self.introducer_furls = "None" |
---|
67 | self.stats_provider = FakeStatsProvider() |
---|
68 | self._secret_holder = SecretHolder("lease secret", "convergence secret") |
---|
69 | self.helper = None |
---|
70 | hunk ./src/allmydata/test/test_web.py 110 |
---|
71 | self.convergence = "some random string" |
---|
72 | self.storage_broker = StorageFarmBroker(None, permute_peers=True) |
---|
73 | - self.introducer_client = None |
---|
74 | + self.introducer_clients = None |
---|
75 | self.history = FakeHistory() |
---|
76 | self.uploader = FakeUploader() |
---|
77 | self.uploader.setServiceParent(self) |
---|
78 | hunk ./src/allmydata/web/root.py 222 |
---|
79 | |
---|
80 | # In case we configure multiple introducers |
---|
81 | def data_introducers(self, ctx, data): |
---|
82 | + connection_status = [] |
---|
83 | connection_status = self.client.connected_to_introducer() |
---|
84 | s = [] |
---|
85 | hunk ./src/allmydata/web/root.py 225 |
---|
86 | - furls = self.client.introducer_furls |
---|
87 | + furls = self.client.introducer_furls |
---|
88 | for furl in furls: |
---|
89 | hunk ./src/allmydata/web/root.py 227 |
---|
90 | - i = furls.index(furl) |
---|
91 | - if connection_status[i]: |
---|
92 | - s.append( (furl, "Yes") ) |
---|
93 | - else: |
---|
94 | - s.append( (furl, "No") ) |
---|
95 | + if connection_status: |
---|
96 | + i = furls.index(furl) |
---|
97 | + if connection_status[i]: |
---|
98 | + s.append( (furl, "Yes") ) |
---|
99 | + else: |
---|
100 | + s.append( (furl, "No") ) |
---|
101 | s.sort() |
---|
102 | return s |
---|
103 | |
---|
104 | } |
---|
105 | |
---|
106 | Context: |
---|
107 | |
---|
108 | [multi-introducer: add tests of multi-introducers as attached by Faruq to ref #68 |
---|
109 | zooko@zooko.com**20100807063706 |
---|
110 | Ignore-this: b4341b039d7888dd164370f033266a54 |
---|
111 | http://tahoe-lafs.org/trac/tahoe-lafs/attachment/ticket/68/test_multi_introducers.4.py |
---|
112 | ] |
---|
113 | [multiple-introducer-client-side-002.dpatch |
---|
114 | writefaruq@gmail.com**20100801150056 |
---|
115 | Ignore-this: df8eab0bfc5cd05c242b47b8b414454 |
---|
116 | docs/architecture.txt: Added description of using multiple introducers |
---|
117 | docs/configuration.txt: Changed the method of configuring introducer(s) |
---|
118 | docs/running.html: Introduced the multiple introducers |
---|
119 | ] |
---|
120 | [multiple-introducer-client-side-001.dpatch |
---|
121 | writefaruq@gmail.com**20100801142304 |
---|
122 | Ignore-this: c122fc67dfc567c22f1be713f949f415 |
---|
123 | 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. |
---|
124 | |
---|
125 | ] |
---|
126 | [TAG allmydata-tahoe-1.8.0c1 |
---|
127 | david-sarah@jacaranda.org**20100807004546 |
---|
128 | Ignore-this: 484ff2513774f3b48ca49c992e878b89 |
---|
129 | ] |
---|
130 | Patch bundle hash: |
---|
131 | 8e85e242e9379715bae2900d92c12a8bac981250 |
---|