Merge lp:~ubuntuone-control-tower/ubuntu/lucid/ubuntuone-storage-protocol/trunk into lp:ubuntu/lucid/ubuntuone-storage-protocol
- Lucid (10.04)
- trunk
- Merge into lucid
Proposed by
dobey
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~ubuntuone-control-tower/ubuntu/lucid/ubuntuone-storage-protocol/trunk |
Merge into: | lp:ubuntu/lucid/ubuntuone-storage-protocol |
Diff against target: |
2775 lines (+430/-2164) 8 files modified
PKG-INFO (+1/-1) debian/changelog (+8/-0) debian/control (+1/-2) setup.py (+1/-1) tests/test_throttling.py (+314/-7) ubuntuone/storageprotocol/client.py (+105/-30) ubuntuone/storageprotocol/dircontent_pb2.py (+0/-105) ubuntuone/storageprotocol/protocol_pb2.py (+0/-2018) |
To merge this branch: | bzr merge lp:~ubuntuone-control-tower/ubuntu/lucid/ubuntuone-storage-protocol/trunk |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu branches | Pending | ||
Review via email: mp+20665@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
- 12. By James Westby
-
New upstream release.
- 13. By James Westby
-
Upload to lucid.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'PKG-INFO' |
2 | --- PKG-INFO 2010-02-17 23:23:52 +0000 |
3 | +++ PKG-INFO 2010-03-04 17:22:18 +0000 |
4 | @@ -1,6 +1,6 @@ |
5 | Metadata-Version: 1.0 |
6 | Name: ubuntuone-storage-protocol |
7 | -Version: 1.1.2 |
8 | +Version: 1.1.3 |
9 | Summary: UNKNOWN |
10 | Home-page: UNKNOWN |
11 | Author: UNKNOWN |
12 | |
13 | === modified file 'debian/changelog' |
14 | --- debian/changelog 2010-02-18 03:23:01 +0000 |
15 | +++ debian/changelog 2010-03-04 17:22:18 +0000 |
16 | @@ -1,3 +1,11 @@ |
17 | +ubuntuone-storage-protocol (1.1.3-0ubuntu1) UNRELEASED; urgency=low |
18 | + |
19 | + * New upstream release. |
20 | + * Remove Vcs-Bzr and sync with ubuntu pkg branch |
21 | + * Update homepage URL |
22 | + |
23 | + -- Rodney Dawes <rodney.dawes@canonical.com> Thu, 04 Mar 2010 11:16:34 -0500 |
24 | + |
25 | ubuntuone-storage-protocol (1.1.2-0ubuntu1) lucid; urgency=low |
26 | |
27 | * New upstream release. |
28 | |
29 | === modified file 'debian/control' |
30 | --- debian/control 2009-12-07 17:00:00 +0000 |
31 | +++ debian/control 2010-03-04 17:22:18 +0000 |
32 | @@ -12,8 +12,7 @@ |
33 | python-twisted-core, |
34 | python-oauth (>= 1.0~svn1092) |
35 | Standards-Version: 3.8.3 |
36 | -Homepage: https://ubuntuone.com |
37 | -Vcs-Bzr: https://code.launchpad.net/~ubuntuone-control-tower/ubuntu/lucid/ubuntuone-storage-protocol/trunk |
38 | +Homepage: https://one.ubuntu.com |
39 | |
40 | Package: python-ubuntuone-storageprotocol |
41 | Architecture: all |
42 | |
43 | === modified file 'setup.py' |
44 | --- setup.py 2010-02-17 23:23:52 +0000 |
45 | +++ setup.py 2010-03-04 17:22:18 +0000 |
46 | @@ -119,7 +119,7 @@ |
47 | |
48 | |
49 | setup(name='ubuntuone-storage-protocol', |
50 | - version='1.1.2', |
51 | + version='1.1.3', |
52 | packages=['ubuntuone', |
53 | 'ubuntuone.storageprotocol'], |
54 | data_files=[('/etc/ssl/certs', |
55 | |
56 | === modified file 'tests/test_throttling.py' |
57 | --- tests/test_throttling.py 2010-02-17 23:23:52 +0000 |
58 | +++ tests/test_throttling.py 2010-03-04 17:22:18 +0000 |
59 | @@ -25,6 +25,7 @@ |
60 | |
61 | from ubuntuone.storageprotocol import client |
62 | |
63 | + |
64 | class FakeClient(object): |
65 | """Fake a Client class that is handy for tests.""" |
66 | |
67 | @@ -55,7 +56,7 @@ |
68 | self.client = FakeClient() |
69 | self.factories = [] |
70 | self.clock = task.Clock() |
71 | - # use task.Clock instead of the reactor for the callLater |
72 | + # use our custom clock instead of the reactor for the callLater |
73 | self.old_callLater = client.ThrottlingStorageClientFactory.callLater |
74 | client.ThrottlingStorageClientFactory.callLater = self.clock.callLater |
75 | |
76 | @@ -64,22 +65,26 @@ |
77 | f.unregisterProtocol(None) |
78 | client.ThrottlingStorageClientFactory.callLater = self.old_callLater |
79 | |
80 | - def create_factory(self, read_limit, write_limit): |
81 | + def create_factory(self, enabled, read_limit, write_limit): |
82 | """Create a ThrottlingStorageClientFactory with the specified args.""" |
83 | - tscf = client.ThrottlingStorageClientFactory(read_limit, write_limit) |
84 | + tscf = client.ThrottlingStorageClientFactory(enabled, read_limit, |
85 | + write_limit) |
86 | tscf.client = self.client |
87 | self.factories.append(tscf) |
88 | return tscf |
89 | |
90 | + def destroy_factory(self, factory): |
91 | + """Turn off a factory and delete it form self.factories.""" |
92 | + del self.factories[self.factories.index(factory)] |
93 | + factory.unregisterProtocol(None) |
94 | + |
95 | |
96 | class TestProducingState(BaseThrottlingTestCase): |
97 | - """Test for filename validation and normalization.""" |
98 | - |
99 | - timeout = 5 |
100 | + """Tests for 'producing' state with different limit values.""" |
101 | |
102 | def setUp(self): |
103 | BaseThrottlingTestCase.setUp(self) |
104 | - self.tscf = self.create_factory(3, 3) |
105 | + self.tscf = self.create_factory(True, 3, 3) |
106 | |
107 | def test_under_write_limit(self): |
108 | """Don't pas the write limit, no event.""" |
109 | @@ -151,3 +156,305 @@ |
110 | self.clock.advance(2) |
111 | self.assertEqual(self.client.events, ["thR", "unthR"]) |
112 | |
113 | + |
114 | +class TestLimitValuesInitialization(BaseThrottlingTestCase): |
115 | + """Test read/write limit values.""" |
116 | + |
117 | + def _test_inactive_limits(self, read_limit, write_limit): |
118 | + """Test read_limit and write_limit with throttling enabled.""" |
119 | + def check(tscf): |
120 | + """Check that there is no delayed calls nor events.""" |
121 | + self.assertEquals(2, len(self.clock.getDelayedCalls())) |
122 | + self.assertNotEquals(None, tscf.resetReadThisSecondID) |
123 | + self.assertEquals(None, tscf.unthrottleReadsID) |
124 | + self.assertNotEquals(None, tscf.resetWriteThisSecondID) |
125 | + self.assertEquals(None, tscf.unthrottleWritesID) |
126 | + self.assertEqual(self.client.events, []) |
127 | + tscf = self.create_factory(True, read_limit, write_limit) |
128 | + check(tscf) |
129 | + self.clock.advance(1.1) |
130 | + check(tscf) |
131 | + |
132 | + def test_both_None(self): |
133 | + """Test for both limits None.""" |
134 | + self._test_inactive_limits(None, None) |
135 | + |
136 | + def test_limits_0(self): |
137 | + """Test for both limits 0.""" |
138 | + self.assertRaises(ValueError, self._test_inactive_limits, 0, 0) |
139 | + self.assertRaises(ValueError, self._test_inactive_limits, 1, 0) |
140 | + self.assertRaises(ValueError, self._test_inactive_limits, 0, 1) |
141 | + |
142 | + def test_both_negative(self): |
143 | + """Test for both limits -1.""" |
144 | + self.assertRaises(ValueError, self._test_inactive_limits, -1, -1) |
145 | + |
146 | + def test_read_2_write_None(self): |
147 | + """Test "off" writeLimit value and throttling enabled.""" |
148 | + tscf = self.create_factory(True, 2, None) |
149 | + # check that resetReadThisSecondID is running |
150 | + self.assertEquals(2, len(self.clock.getDelayedCalls())) |
151 | + self.assertNotEquals(None, tscf.resetReadThisSecondID) |
152 | + self.assertEquals(None, tscf.unthrottleReadsID) |
153 | + self.assertNotEquals(None, tscf.resetWriteThisSecondID) |
154 | + self.assertEquals(None, tscf.unthrottleWritesID) |
155 | + tscf.registerRead(4) |
156 | + self.clock.advance(0.5) |
157 | + self.assertEqual(self.client.events, ["thR"]) |
158 | + self.assertNotEquals(None, tscf.resetReadThisSecondID) |
159 | + self.assertNotEquals(None, tscf.unthrottleReadsID) |
160 | + |
161 | + def test_read_None_write_2(self): |
162 | + """Test "off" readLimit value and throttling enabled.""" |
163 | + tscf = self.create_factory(True, None, 2) |
164 | + # check that resetWriteThisSecondID is running |
165 | + self.assertEquals(2, len(self.clock.getDelayedCalls())) |
166 | + self.assertNotEquals(None, tscf.resetReadThisSecondID) |
167 | + self.assertEquals(None, tscf.unthrottleReadsID) |
168 | + self.assertNotEquals(None, tscf.resetWriteThisSecondID) |
169 | + self.assertEquals(None, tscf.unthrottleWritesID) |
170 | + tscf.registerWritten(4) |
171 | + self.clock.advance(0.5) |
172 | + self.assertEqual(self.client.events, ["thW"]) |
173 | + self.assertNotEquals(None, tscf.resetWriteThisSecondID) |
174 | + self.assertNotEquals(None, tscf.unthrottleWritesID) |
175 | + |
176 | + def test_change_to_inavlid(self): |
177 | + """Test setting invalid limit values after initialization.""" |
178 | + # yes, this is a unittest, I need to access protected members |
179 | + # pylint: disable-msg=W0212 |
180 | + tscf = self.create_factory(True, 2, 2) |
181 | + self.assertRaises(ValueError, tscf._set_read_limit, -1) |
182 | + self.assertRaises(ValueError, tscf._set_write_limit, -1) |
183 | + |
184 | + |
185 | +class TestResetLoops(BaseThrottlingTestCase): |
186 | + """Test the read/writeThisSecond reset loops.""" |
187 | + |
188 | + def test_read_this_second_loop(self): |
189 | + """Test the reset loop for reads""" |
190 | + tscf = self.create_factory(True, 4, 4) |
191 | + tscf.registerRead(4) |
192 | + self.assertEquals(4, tscf.readThisSecond) |
193 | + self.clock.advance(1) |
194 | + self.assertEquals(0, tscf.readThisSecond) |
195 | + |
196 | + def test_write_this_second_loop(self): |
197 | + """Test the reset loop for writes""" |
198 | + tscf = self.create_factory(True, 4, 4) |
199 | + tscf.registerWritten(4) |
200 | + self.assertEquals(4, tscf.writtenThisSecond) |
201 | + self.clock.advance(1) |
202 | + self.assertEquals(0, tscf.writtenThisSecond) |
203 | + |
204 | + |
205 | +class TestCheckBandwidth(BaseThrottlingTestCase): |
206 | + """Test the check[Read|Write]Bandwidth methods.""" |
207 | + |
208 | + def _test_with_limits(self, read, write): |
209 | + """Test the check[Read|Wrte]Bandwidth using read and write limits.""" |
210 | + tscf = self.create_factory(True, read, write) |
211 | + tscf.registerRead(4) |
212 | + tscf.registerWritten(4) |
213 | + self.assertEquals(4, tscf.readThisSecond) |
214 | + self.assertEquals(4, tscf.writtenThisSecond) |
215 | + self.assertEquals(None, tscf.unthrottleReadsID) |
216 | + self.assertEquals(None, tscf.unthrottleReadsID) |
217 | + self.clock.advance(1) |
218 | + self.assertEquals(None, tscf.unthrottleReadsID) |
219 | + self.assertEquals(None, tscf.unthrottleWritesID) |
220 | + self.assertEquals(0, tscf.readThisSecond) |
221 | + self.assertEquals(0, tscf.writtenThisSecond) |
222 | + |
223 | + def test_limits_0(self): |
224 | + """Test the check[Read|Wrte]Bandwidth with both = 0.""" |
225 | + self.assertRaises(ValueError, self._test_with_limits, 0, 0) |
226 | + self.assertRaises(ValueError, self._test_with_limits, 1, 0) |
227 | + self.assertRaises(ValueError, self._test_with_limits, 0, 1) |
228 | + |
229 | + def test_limits_None(self): |
230 | + """Test the check[Read|Wrte]Bandwidth with both = None.""" |
231 | + self._test_with_limits(None, None) |
232 | + |
233 | + def test_positive_limits(self): |
234 | + """Test the check[Read|Wrte]Bandwidth with both > 0.""" |
235 | + tscf = self.create_factory(True, 2, 2) |
236 | + tscf.registerRead(4) |
237 | + tscf.registerWritten(4) |
238 | + self.assertEquals(4, tscf.readThisSecond) |
239 | + self.assertEquals(4, tscf.writtenThisSecond) |
240 | + self.assertNotEquals(None, tscf.unthrottleReadsID) |
241 | + self.assertNotEquals(None, tscf.unthrottleReadsID) |
242 | + self.clock.advance(.9) |
243 | + self.assertNotEquals(None, tscf.unthrottleReadsID) |
244 | + self.assertNotEquals(None, tscf.unthrottleReadsID) |
245 | + self.clock.advance(.1) |
246 | + self.assertEquals(0, tscf.readThisSecond) |
247 | + self.assertEquals(0, tscf.writtenThisSecond) |
248 | + self.assertEquals(None, tscf.unthrottleReadsID) |
249 | + self.assertEquals(None, tscf.unthrottleWritesID) |
250 | + |
251 | + |
252 | +class TestThrottlingLimits(BaseThrottlingTestCase): |
253 | + """Test read/write limit behaviour and changes in runtime.""" |
254 | + |
255 | + def test_limit_None_then_gt_0(self): |
256 | + """Test both None and change it to > 0.""" |
257 | + def check(tscf, events=None, delayed_calls=2): |
258 | + """Check that there is no delayed calls nor events.""" |
259 | + self.assertEquals(delayed_calls, len(self.clock.getDelayedCalls())) |
260 | + self.assertEqual(self.client.events, events or []) |
261 | + tscf = self.create_factory(True, None, None) |
262 | + self.clock.advance(1.1) |
263 | + check(tscf) |
264 | + tscf.readLimit = 2 |
265 | + tscf.writeLimit = 2 |
266 | + tscf.registerRead(4) |
267 | + tscf.registerWritten(4) |
268 | + self.clock.advance(0.9) |
269 | + expected_events = ['thR', 'thW'] |
270 | + check(tscf, delayed_calls=4, events=expected_events) |
271 | + self.clock.advance(1) |
272 | + expected_events += ['unthR', 'unthW'] |
273 | + check(tscf, events=expected_events) |
274 | + self.clock.advance(1.1) |
275 | + check(tscf, events=expected_events) |
276 | + tscf.registerRead(4) |
277 | + tscf.registerWritten(4) |
278 | + expected_events += ['thR', 'thW'] |
279 | + check(tscf, delayed_calls=4, events=expected_events) |
280 | + self.clock.advance(.9) |
281 | + check(tscf, delayed_calls=4, events=expected_events) |
282 | + self.clock.advance(.1) |
283 | + expected_events += ['unthR', 'unthW'] |
284 | + check(tscf, delayed_calls=2, events=expected_events) |
285 | + tscf.registerRead(1) |
286 | + tscf.registerWritten(1) |
287 | + check(tscf, delayed_calls=2, events=expected_events) |
288 | + |
289 | + def test_read_2_write_None(self): |
290 | + """Test readLimit > 0 and writeLimit = None""" |
291 | + tscf = self.create_factory(True, 2, None) |
292 | + # check that resetReadThisSecondID is running |
293 | + self.assertEquals(2, len(self.clock.getDelayedCalls())) |
294 | + tscf.registerRead(4) |
295 | + self.clock.advance(0.9) |
296 | + expected_events = ['thR'] |
297 | + self.assertEqual(self.client.events, expected_events) |
298 | + self.clock.advance(0.9) |
299 | + expected_events += ['unthR'] |
300 | + self.assertEqual(self.client.events, expected_events) |
301 | + self.clock.advance(.1) |
302 | + self.assertEqual(self.client.events, expected_events) |
303 | + # single throttling |
304 | + tscf.registerRead(2) |
305 | + self.clock.advance(0.1) |
306 | + expected_events += ['thR', 'unthR'] |
307 | + self.assertEqual(self.client.events, expected_events) |
308 | + |
309 | + def test_read_None_write_2(self): |
310 | + """Test readLimit = None and writeLimit > 0""" |
311 | + tscf = self.create_factory(True, None, 2) |
312 | + # check that resetReadThisSecondID is running |
313 | + self.assertEquals(2, len(self.clock.getDelayedCalls())) |
314 | + tscf.registerWritten(4) |
315 | + self.clock.advance(0.9) |
316 | + expected_events = ['thW'] |
317 | + self.assertEqual(self.client.events, expected_events) |
318 | + self.clock.advance(0.9) |
319 | + expected_events += ['unthW'] |
320 | + self.assertEqual(self.client.events, expected_events) |
321 | + self.clock.advance(.1) |
322 | + self.assertEqual(self.client.events, expected_events) |
323 | + # single throttling (trigger a callLater(0, ..) |
324 | + tscf.registerWritten(2) |
325 | + self.clock.advance(0.1) |
326 | + expected_events += ['thW', 'unthW'] |
327 | + self.assertEqual(self.client.events, expected_events) |
328 | + |
329 | + def test_change_read_to_None(self): |
330 | + """Test changing the read limit from > 0 to None.""" |
331 | + tscf = self.create_factory(True, 2, None) |
332 | + self.assertEquals(2, len(self.clock.getDelayedCalls())) |
333 | + tscf.registerRead(4) |
334 | + expected_events = ['thR'] |
335 | + self.assertEqual(self.client.events, expected_events) |
336 | + self.clock.advance(1.1) |
337 | + expected_events += ['unthR'] |
338 | + self.assertEqual(self.client.events, expected_events) |
339 | + tscf.readLimit = None |
340 | + self.clock.advance(1) |
341 | + self.assertEqual(self.client.events, expected_events) |
342 | + tscf.registerRead(4) |
343 | + self.clock.advance(1.1) |
344 | + # no new events, throttling reads is off |
345 | + self.assertEqual(self.client.events, expected_events) |
346 | + |
347 | + def test_change_write_to_None(self): |
348 | + """Test changing the write limit from > 0 to None.""" |
349 | + tscf = self.create_factory(True, None, 2) |
350 | + self.assertEquals(2, len(self.clock.getDelayedCalls())) |
351 | + tscf.registerWritten(4) |
352 | + expected_events = ['thW'] |
353 | + self.assertEqual(self.client.events, expected_events) |
354 | + self.clock.advance(1.1) |
355 | + expected_events += ['unthW'] |
356 | + self.assertEqual(self.client.events, expected_events) |
357 | + tscf.writeLimit = None |
358 | + self.clock.advance(1) |
359 | + self.assertEqual(self.client.events, expected_events) |
360 | + tscf.registerWritten(4) |
361 | + self.clock.advance(1.1) |
362 | + # no new events, throttling reads is off |
363 | + self.assertEqual(self.client.events, expected_events) |
364 | + |
365 | + |
366 | +class TestEnablement(BaseThrottlingTestCase): |
367 | + """Tests for en/disabling throttling.""" |
368 | + |
369 | + def test_disabling(self): |
370 | + """Tests that disabling throttling at runtime works as expected.""" |
371 | + tscf = self.create_factory(True, 2, 2) |
372 | + self.assertNotEquals(None, tscf.resetReadThisSecondID) |
373 | + self.assertNotEquals(None, tscf.resetWriteThisSecondID) |
374 | + tscf.registerRead(2) |
375 | + tscf.registerWritten(2) |
376 | + self.assertNotEquals(None, tscf.unthrottleReadsID) |
377 | + self.assertNotEquals(None, tscf.unthrottleReadsID) |
378 | + self.clock.advance(1.1) |
379 | + self.assertEquals(None, tscf.unthrottleReadsID) |
380 | + self.assertEquals(None, tscf.unthrottleWritesID) |
381 | + tscf.disable_throttling() |
382 | + self.assertFalse(tscf.throttling_enabled, |
383 | + "Throttling should be disabled.") |
384 | + for delayed in [tscf.unthrottleReadsID, tscf.resetReadThisSecondID, |
385 | + tscf.unthrottleWritesID, tscf.resetWriteThisSecondID]: |
386 | + cancelled = delayed is None or delayed.cancelled |
387 | + self.assertTrue(cancelled) |
388 | + |
389 | + def test_enabling(self): |
390 | + """Tests that enabling throttling at runtime works as expected.""" |
391 | + tscf = self.create_factory(False, 2, 2) |
392 | + self.assertEquals(None, tscf.resetReadThisSecondID) |
393 | + self.assertEquals(None, tscf.resetWriteThisSecondID) |
394 | + tscf.registerRead(2) |
395 | + tscf.registerWritten(2) |
396 | + self.assertEquals(None, tscf.unthrottleReadsID) |
397 | + self.assertEquals(None, tscf.unthrottleReadsID) |
398 | + self.clock.advance(1) |
399 | + self.assertEquals(None, tscf.unthrottleReadsID) |
400 | + self.assertEquals(None, tscf.unthrottleWritesID) |
401 | + self.assertEquals(None, tscf.resetReadThisSecondID) |
402 | + self.assertEquals(None, tscf.resetWriteThisSecondID) |
403 | + tscf.enable_throttling() |
404 | + self.assertTrue(tscf.throttling_enabled, |
405 | + "Throttling should be enabled.") |
406 | + self.assertNotEquals(None, tscf.resetReadThisSecondID) |
407 | + self.assertNotEquals(None, tscf.resetWriteThisSecondID) |
408 | + tscf.registerRead(3) |
409 | + tscf.registerWritten(3) |
410 | + for delayed in [tscf.unthrottleReadsID, tscf.resetReadThisSecondID, |
411 | + tscf.unthrottleWritesID, tscf.resetWriteThisSecondID]: |
412 | + cancelled = delayed.cancelled |
413 | + self.assertFalse(cancelled) |
414 | + |
415 | |
416 | === modified file 'ubuntuone/storageprotocol/client.py' |
417 | --- ubuntuone/storageprotocol/client.py 2010-02-17 23:23:52 +0000 |
418 | +++ ubuntuone/storageprotocol/client.py 2010-03-04 17:22:18 +0000 |
419 | @@ -1410,16 +1410,22 @@ |
420 | protocol = StorageClient |
421 | |
422 | |
423 | -class ThrottlingStorageClientFactory(StorageClientFactory): |
424 | +class ThrottlingStorageClientFactory(StorageClientFactory, object): |
425 | """The throttling version of StorageClientFactory.""" |
426 | |
427 | protocol = ThrottlingStorageClient |
428 | client = None |
429 | |
430 | - def __init__(self, read_limit=None, write_limit=None): |
431 | + def __init__(self, throttling_enabled=False, |
432 | + read_limit=None, write_limit=None): |
433 | """Create the instance.""" |
434 | - self.readLimit = read_limit # max bytes we should read per second |
435 | - self.writeLimit = write_limit # max bytes we should write per second |
436 | + self._readLimit = None # max bytes we should read per second |
437 | + self._writeLimit = None # max bytes we should write per second |
438 | + self._throttling_reads = False |
439 | + self._throttling_writes = False |
440 | + self._set_read_limit(read_limit) |
441 | + self._set_write_limit(write_limit) |
442 | + self.throttling_enabled = throttling_enabled |
443 | self.readThisSecond = 0 |
444 | self.writtenThisSecond = 0 |
445 | self.unthrottleReadsID = None |
446 | @@ -1427,15 +1433,46 @@ |
447 | self.unthrottleWritesID = None |
448 | self.resetWriteThisSecondID = None |
449 | self.stopped = True |
450 | + if self.throttling_enabled: |
451 | + self.enable_throttling() |
452 | + else: |
453 | + self.disable_throttling() |
454 | + |
455 | + def valid_limit(self, limit): |
456 | + """Check if limit is a valid valid.""" |
457 | + return limit is None or limit > 0 |
458 | + |
459 | + def _set_write_limit(self, limit): |
460 | + """Set writeLimit value. |
461 | + |
462 | + Raise a ValueError if the value ins't valid. |
463 | + """ |
464 | + if not self.valid_limit(limit): |
465 | + raise ValueError('Write limit must be greater than 0.') |
466 | + self._writeLimit = limit |
467 | + |
468 | + def _set_read_limit(self, limit): |
469 | + """Set readLimit value. |
470 | + |
471 | + Raise a ValueError if the value ins't valid. |
472 | + """ |
473 | + if not self.valid_limit(limit): |
474 | + raise ValueError('Read limit must be greater than 0.') |
475 | + self._readLimit = limit |
476 | + # it's a property, pylint: disable-msg=W0212 |
477 | + readLimit = property(lambda self: self._readLimit, _set_read_limit) |
478 | + writeLimit = property(lambda self: self._writeLimit, _set_write_limit) |
479 | + # pylint: enable-msg=W0212 |
480 | |
481 | def callLater(self, period, func, *args, **kwargs): |
482 | """Wrapper around L{reactor.callLater} for test purpose.""" |
483 | return reactor.callLater(period, func, *args, **kwargs) |
484 | |
485 | def maybeCallLater(self, id, period, func): |
486 | - """Do a callLater only if we don't have a DelayedCall with the |
487 | + """Maybe run callLater(period, func). |
488 | + |
489 | + Only if we don't have a DelayedCall with the |
490 | specified id already running. |
491 | - |
492 | """ |
493 | delayed_call = getattr(self, id) |
494 | # check if we already have a DelayedCall running |
495 | @@ -1446,38 +1483,49 @@ |
496 | |
497 | def registerWritten(self, length): |
498 | """Called by protocol to tell us more bytes were written.""" |
499 | - self.writtenThisSecond += length |
500 | - self.checkWriteBandwidth() |
501 | + if self.throttling_enabled: |
502 | + self.writtenThisSecond += length |
503 | + self.checkWriteBandwidth() |
504 | |
505 | def registerRead(self, length): |
506 | """Called by protocol to tell us more bytes were read.""" |
507 | - self.readThisSecond += length |
508 | - self.checkReadBandwidth() |
509 | + if self.throttling_enabled: |
510 | + self.readThisSecond += length |
511 | + self.checkReadBandwidth() |
512 | + |
513 | + def _get_throttle_time(self, bytes, limit): |
514 | + """Calculate the throttle_time for bytes and limit.""" |
515 | + return (float(bytes) / limit) - 1.0 |
516 | |
517 | def checkReadBandwidth(self): |
518 | """Check if we've passed bandwidth limits.""" |
519 | - if self.readLimit is not None and \ |
520 | - self.readThisSecond > self.readLimit and \ |
521 | - self.unthrottleReadsID is None: |
522 | + limit_check = self.valid_limit(self.readLimit) and \ |
523 | + self.readLimit is not None and \ |
524 | + self.readThisSecond >= self.readLimit |
525 | + should_check = self.throttling_enabled and limit_check and \ |
526 | + self.unthrottleReadsID is None |
527 | + if should_check: |
528 | self.throttleReads() |
529 | - throttle_time = (float(self.readThisSecond) / self.readLimit) - 1.0 |
530 | + throttle_time = self._get_throttle_time(self.readThisSecond, |
531 | + self.readLimit) |
532 | log_debug("pause reads for: %s", str(throttle_time)) |
533 | - self.unthrottleReadsID = self.maybeCallLater('unthrottleReadsID', |
534 | - throttle_time, |
535 | - self.unthrottleReads) |
536 | + self.unthrottleReadsID = self.maybeCallLater( |
537 | + 'unthrottleReadsID', throttle_time, self.unthrottleReads) |
538 | |
539 | def checkWriteBandwidth(self): |
540 | """Check if we've passed bandwidth limits.""" |
541 | - if self.writeLimit is not None and \ |
542 | - self.writtenThisSecond > self.writeLimit and \ |
543 | - self.unthrottleWritesID is None: |
544 | + limit_check = self.valid_limit(self.writeLimit) and \ |
545 | + self.writeLimit is not None and \ |
546 | + self.writtenThisSecond >= self.writeLimit |
547 | + should_check = self.throttling_enabled and limit_check and \ |
548 | + self.unthrottleWritesID is None |
549 | + if should_check: |
550 | self.throttleWrites() |
551 | - throttle_time = (float(self.writtenThisSecond) / self.writeLimit) \ |
552 | - - 1.0 |
553 | + throttle_time = self._get_throttle_time(self.writtenThisSecond, |
554 | + self.writeLimit) |
555 | log_debug("pause writes for: %s", str(throttle_time)) |
556 | - self.unthrottleWritesID = self.maybeCallLater('unthrottleWritesID', |
557 | - throttle_time, |
558 | - self.unthrottleWrites) |
559 | + self.unthrottleWritesID = self.maybeCallLater( |
560 | + 'unthrottleWritesID', throttle_time, self.unthrottleWrites) |
561 | |
562 | def _resetReadThisSecond(self): |
563 | """Reset the counter named with 'name' every 1 second.""" |
564 | @@ -1495,31 +1543,33 @@ |
565 | def throttleReads(self): |
566 | """Throttle reads on all protocols.""" |
567 | if self.client is not None: |
568 | + self._throttling_reads = True |
569 | self.client.throttleReads() |
570 | |
571 | def unthrottleReads(self): |
572 | """Stop throttling reads on all protocols.""" |
573 | self.unthrottleReadsID = None |
574 | if self.client is not None: |
575 | + self._throttling_reads = False |
576 | self.client.unthrottleReads() |
577 | |
578 | def throttleWrites(self): |
579 | """Throttle writes on all protocols.""" |
580 | if self.client is not None: |
581 | + self._throttling_writes = True |
582 | self.client.throttleWrites() |
583 | |
584 | def unthrottleWrites(self): |
585 | """Stop throttling writes on all protocols.""" |
586 | self.unthrottleWritesID = None |
587 | if self.client is not None: |
588 | + self._throttling_writes = False |
589 | self.client.unthrottleWrites() |
590 | |
591 | def buildProtocol(self, addr): |
592 | """Build the protocol and start the counters reset loops.""" |
593 | - if self.readLimit is not None: |
594 | - self._resetReadThisSecond() |
595 | - if self.writeLimit is not None: |
596 | - self._resetWrittenThisSecond() |
597 | + if self.throttling_enabled: |
598 | + self.enable_throttling() |
599 | self.stopped = False |
600 | return StorageClientFactory.buildProtocol(self, addr) |
601 | |
602 | @@ -1529,7 +1579,6 @@ |
603 | self.unthrottleWritesID, self.resetWriteThisSecondID]: |
604 | self._cancel_delayed_call(delayed) |
605 | |
606 | - |
607 | def _cancel_delayed_call(self, delayed): |
608 | """Safely cancel a DelayedCall.""" |
609 | if delayed is not None and not delayed.cancelled \ |
610 | @@ -1540,6 +1589,32 @@ |
611 | # ignore AlreadyCalledError |
612 | pass |
613 | |
614 | + def enable_throttling(self): |
615 | + """Enable throttling and start the counter reset loops.""" |
616 | + # check if we need to start the reset loops |
617 | + if self.resetReadThisSecondID is None and \ |
618 | + self.valid_limit(self.readLimit): |
619 | + self._resetReadThisSecond() |
620 | + if self.resetWriteThisSecondID is None and \ |
621 | + self.valid_limit(self.writeLimit): |
622 | + self._resetWrittenThisSecond() |
623 | + self.throttling_enabled = True |
624 | + |
625 | + def disable_throttling(self): |
626 | + """Disable throttling and cancel the counter reset loops.""" |
627 | + # unthrottle if there is an active unthrottle*ID |
628 | + self._cancel_delayed_call(self.unthrottleReadsID) |
629 | + self._cancel_delayed_call(self.unthrottleWritesID) |
630 | + # Stop the reset loops |
631 | + self._cancel_delayed_call(self.resetReadThisSecondID) |
632 | + self._cancel_delayed_call(self.resetWriteThisSecondID) |
633 | + # unthrottle read/writes |
634 | + if self._throttling_reads: |
635 | + self.unthrottleReads() |
636 | + if self._throttling_writes: |
637 | + self.unthrottleWrites() |
638 | + self.throttling_enabled = False |
639 | + |
640 | |
641 | if __name__ == "__main__": |
642 | # these 3 lines show the different ways of connecting a client to the |
643 | |
644 | === removed file 'ubuntuone/storageprotocol/dircontent_pb2.py' |
645 | --- ubuntuone/storageprotocol/dircontent_pb2.py 2010-02-17 23:23:52 +0000 |
646 | +++ ubuntuone/storageprotocol/dircontent_pb2.py 1970-01-01 00:00:00 +0000 |
647 | @@ -1,105 +0,0 @@ |
648 | -# Generated by the protocol buffer compiler. DO NOT EDIT! |
649 | - |
650 | -from google.protobuf import descriptor |
651 | -from google.protobuf import message |
652 | -from google.protobuf import reflection |
653 | -from google.protobuf import service |
654 | -from google.protobuf import service_reflection |
655 | -from google.protobuf import descriptor_pb2 |
656 | -_NODETYPE = descriptor.EnumDescriptor( |
657 | - name='NodeType', |
658 | - full_name='ubuntuone.storageprotocol.NodeType', |
659 | - filename='NodeType', |
660 | - values=[ |
661 | - descriptor.EnumValueDescriptor( |
662 | - name='DIRECTORY', index=0, number=0, |
663 | - options=None, |
664 | - type=None), |
665 | - descriptor.EnumValueDescriptor( |
666 | - name='FILE', index=1, number=1, |
667 | - options=None, |
668 | - type=None), |
669 | - descriptor.EnumValueDescriptor( |
670 | - name='SYMLINK', index=2, number=2, |
671 | - options=None, |
672 | - type=None), |
673 | - ], |
674 | - options=None, |
675 | -) |
676 | - |
677 | - |
678 | -DIRECTORY = 0 |
679 | -FILE = 1 |
680 | -SYMLINK = 2 |
681 | - |
682 | - |
683 | - |
684 | -_DIRECTORYENTRY = descriptor.Descriptor( |
685 | - name='DirectoryEntry', |
686 | - full_name='ubuntuone.storageprotocol.DirectoryEntry', |
687 | - filename='ubuntuone/storageprotocol/dircontent.proto', |
688 | - containing_type=None, |
689 | - fields=[ |
690 | - descriptor.FieldDescriptor( |
691 | - name='name', full_name='ubuntuone.storageprotocol.DirectoryEntry.name', index=0, |
692 | - number=1, type=9, cpp_type=9, label=1, |
693 | - default_value=unicode("", "utf-8"), |
694 | - message_type=None, enum_type=None, containing_type=None, |
695 | - is_extension=False, extension_scope=None, |
696 | - options=None), |
697 | - descriptor.FieldDescriptor( |
698 | - name='node', full_name='ubuntuone.storageprotocol.DirectoryEntry.node', index=1, |
699 | - number=2, type=12, cpp_type=9, label=1, |
700 | - default_value="", |
701 | - message_type=None, enum_type=None, containing_type=None, |
702 | - is_extension=False, extension_scope=None, |
703 | - options=None), |
704 | - descriptor.FieldDescriptor( |
705 | - name='node_type', full_name='ubuntuone.storageprotocol.DirectoryEntry.node_type', index=2, |
706 | - number=3, type=14, cpp_type=8, label=1, |
707 | - default_value=0, |
708 | - message_type=None, enum_type=None, containing_type=None, |
709 | - is_extension=False, extension_scope=None, |
710 | - options=None), |
711 | - ], |
712 | - extensions=[ |
713 | - ], |
714 | - nested_types=[], # TODO(robinson): Implement. |
715 | - enum_types=[ |
716 | - ], |
717 | - options=None) |
718 | - |
719 | - |
720 | -_DIRECTORYCONTENT = descriptor.Descriptor( |
721 | - name='DirectoryContent', |
722 | - full_name='ubuntuone.storageprotocol.DirectoryContent', |
723 | - filename='ubuntuone/storageprotocol/dircontent.proto', |
724 | - containing_type=None, |
725 | - fields=[ |
726 | - descriptor.FieldDescriptor( |
727 | - name='entries', full_name='ubuntuone.storageprotocol.DirectoryContent.entries', index=0, |
728 | - number=1, type=11, cpp_type=10, label=3, |
729 | - default_value=[], |
730 | - message_type=None, enum_type=None, containing_type=None, |
731 | - is_extension=False, extension_scope=None, |
732 | - options=None), |
733 | - ], |
734 | - extensions=[ |
735 | - ], |
736 | - nested_types=[], # TODO(robinson): Implement. |
737 | - enum_types=[ |
738 | - ], |
739 | - options=None) |
740 | - |
741 | - |
742 | -_DIRECTORYENTRY.fields_by_name['node_type'].enum_type = _NODETYPE |
743 | -_DIRECTORYCONTENT.fields_by_name['entries'].message_type = _DIRECTORYENTRY |
744 | - |
745 | -class DirectoryEntry(message.Message): |
746 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
747 | - DESCRIPTOR = _DIRECTORYENTRY |
748 | - |
749 | -class DirectoryContent(message.Message): |
750 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
751 | - DESCRIPTOR = _DIRECTORYCONTENT |
752 | - |
753 | |
754 | === removed file 'ubuntuone/storageprotocol/protocol_pb2.py' |
755 | --- ubuntuone/storageprotocol/protocol_pb2.py 2010-02-17 23:23:52 +0000 |
756 | +++ ubuntuone/storageprotocol/protocol_pb2.py 1970-01-01 00:00:00 +0000 |
757 | @@ -1,2018 +0,0 @@ |
758 | -# Generated by the protocol buffer compiler. DO NOT EDIT! |
759 | - |
760 | -from google.protobuf import descriptor |
761 | -from google.protobuf import message |
762 | -from google.protobuf import reflection |
763 | -from google.protobuf import service |
764 | -from google.protobuf import service_reflection |
765 | -from google.protobuf import descriptor_pb2 |
766 | - |
767 | - |
768 | -_MESSAGE_MESSAGETYPE = descriptor.EnumDescriptor( |
769 | - name='MessageType', |
770 | - full_name='ubuntuone.storageprotocol.Message.MessageType', |
771 | - filename='MessageType', |
772 | - values=[ |
773 | - descriptor.EnumValueDescriptor( |
774 | - name='NOOP', index=0, number=0, |
775 | - options=None, |
776 | - type=None), |
777 | - descriptor.EnumValueDescriptor( |
778 | - name='ERROR', index=1, number=1, |
779 | - options=None, |
780 | - type=None), |
781 | - descriptor.EnumValueDescriptor( |
782 | - name='OK', index=2, number=2, |
783 | - options=None, |
784 | - type=None), |
785 | - descriptor.EnumValueDescriptor( |
786 | - name='PING', index=3, number=3, |
787 | - options=None, |
788 | - type=None), |
789 | - descriptor.EnumValueDescriptor( |
790 | - name='PONG', index=4, number=4, |
791 | - options=None, |
792 | - type=None), |
793 | - descriptor.EnumValueDescriptor( |
794 | - name='PROTOCOL_VERSION', index=5, number=5, |
795 | - options=None, |
796 | - type=None), |
797 | - descriptor.EnumValueDescriptor( |
798 | - name='AUTH_REQUEST', index=6, number=6, |
799 | - options=None, |
800 | - type=None), |
801 | - descriptor.EnumValueDescriptor( |
802 | - name='AUTH_REQUEST_TOKEN', index=7, number=7, |
803 | - options=None, |
804 | - type=None), |
805 | - descriptor.EnumValueDescriptor( |
806 | - name='AUTH_REQUEST_TOKEN_READY', index=8, number=8, |
807 | - options=None, |
808 | - type=None), |
809 | - descriptor.EnumValueDescriptor( |
810 | - name='AUTH_AUTHENTICATED', index=9, number=9, |
811 | - options=None, |
812 | - type=None), |
813 | - descriptor.EnumValueDescriptor( |
814 | - name='ROOT', index=10, number=10, |
815 | - options=None, |
816 | - type=None), |
817 | - descriptor.EnumValueDescriptor( |
818 | - name='MAKE_DIR', index=11, number=11, |
819 | - options=None, |
820 | - type=None), |
821 | - descriptor.EnumValueDescriptor( |
822 | - name='MAKE_FILE', index=12, number=12, |
823 | - options=None, |
824 | - type=None), |
825 | - descriptor.EnumValueDescriptor( |
826 | - name='NEW_DIR', index=13, number=13, |
827 | - options=None, |
828 | - type=None), |
829 | - descriptor.EnumValueDescriptor( |
830 | - name='NEW_FILE', index=14, number=14, |
831 | - options=None, |
832 | - type=None), |
833 | - descriptor.EnumValueDescriptor( |
834 | - name='QUERY', index=15, number=15, |
835 | - options=None, |
836 | - type=None), |
837 | - descriptor.EnumValueDescriptor( |
838 | - name='NODE_STATE', index=16, number=16, |
839 | - options=None, |
840 | - type=None), |
841 | - descriptor.EnumValueDescriptor( |
842 | - name='QUERY_END', index=17, number=17, |
843 | - options=None, |
844 | - type=None), |
845 | - descriptor.EnumValueDescriptor( |
846 | - name='GET_CONTENT', index=18, number=18, |
847 | - options=None, |
848 | - type=None), |
849 | - descriptor.EnumValueDescriptor( |
850 | - name='PUT_CONTENT', index=19, number=19, |
851 | - options=None, |
852 | - type=None), |
853 | - descriptor.EnumValueDescriptor( |
854 | - name='BEGIN_CONTENT', index=20, number=20, |
855 | - options=None, |
856 | - type=None), |
857 | - descriptor.EnumValueDescriptor( |
858 | - name='BYTES', index=21, number=21, |
859 | - options=None, |
860 | - type=None), |
861 | - descriptor.EnumValueDescriptor( |
862 | - name='EOF', index=22, number=22, |
863 | - options=None, |
864 | - type=None), |
865 | - descriptor.EnumValueDescriptor( |
866 | - name='MOVE', index=23, number=23, |
867 | - options=None, |
868 | - type=None), |
869 | - descriptor.EnumValueDescriptor( |
870 | - name='UNLINK', index=24, number=24, |
871 | - options=None, |
872 | - type=None), |
873 | - descriptor.EnumValueDescriptor( |
874 | - name='CREATE_SHARE', index=25, number=25, |
875 | - options=None, |
876 | - type=None), |
877 | - descriptor.EnumValueDescriptor( |
878 | - name='LIST_SHARES', index=26, number=26, |
879 | - options=None, |
880 | - type=None), |
881 | - descriptor.EnumValueDescriptor( |
882 | - name='SHARES_INFO', index=27, number=27, |
883 | - options=None, |
884 | - type=None), |
885 | - descriptor.EnumValueDescriptor( |
886 | - name='SHARES_END', index=28, number=28, |
887 | - options=None, |
888 | - type=None), |
889 | - descriptor.EnumValueDescriptor( |
890 | - name='NOTIFY_SHARE', index=29, number=29, |
891 | - options=None, |
892 | - type=None), |
893 | - descriptor.EnumValueDescriptor( |
894 | - name='SHARE_ACCEPTED', index=30, number=30, |
895 | - options=None, |
896 | - type=None), |
897 | - descriptor.EnumValueDescriptor( |
898 | - name='SHARE_DELETED', index=31, number=31, |
899 | - options=None, |
900 | - type=None), |
901 | - descriptor.EnumValueDescriptor( |
902 | - name='SHARE_CREATED', index=32, number=34, |
903 | - options=None, |
904 | - type=None), |
905 | - descriptor.EnumValueDescriptor( |
906 | - name='DELETE_SHARE', index=33, number=36, |
907 | - options=None, |
908 | - type=None), |
909 | - descriptor.EnumValueDescriptor( |
910 | - name='CREATE_UDF', index=34, number=44, |
911 | - options=None, |
912 | - type=None), |
913 | - descriptor.EnumValueDescriptor( |
914 | - name='LIST_VOLUMES', index=35, number=45, |
915 | - options=None, |
916 | - type=None), |
917 | - descriptor.EnumValueDescriptor( |
918 | - name='VOLUMES_INFO', index=36, number=46, |
919 | - options=None, |
920 | - type=None), |
921 | - descriptor.EnumValueDescriptor( |
922 | - name='VOLUMES_END', index=37, number=47, |
923 | - options=None, |
924 | - type=None), |
925 | - descriptor.EnumValueDescriptor( |
926 | - name='VOLUME_DELETED', index=38, number=48, |
927 | - options=None, |
928 | - type=None), |
929 | - descriptor.EnumValueDescriptor( |
930 | - name='VOLUME_CREATED', index=39, number=49, |
931 | - options=None, |
932 | - type=None), |
933 | - descriptor.EnumValueDescriptor( |
934 | - name='DELETE_VOLUME', index=40, number=50, |
935 | - options=None, |
936 | - type=None), |
937 | - descriptor.EnumValueDescriptor( |
938 | - name='CANCEL_REQUEST', index=41, number=32, |
939 | - options=None, |
940 | - type=None), |
941 | - descriptor.EnumValueDescriptor( |
942 | - name='NODE_ATTR', index=42, number=33, |
943 | - options=None, |
944 | - type=None), |
945 | - descriptor.EnumValueDescriptor( |
946 | - name='CANCELLED', index=43, number=35, |
947 | - options=None, |
948 | - type=None), |
949 | - descriptor.EnumValueDescriptor( |
950 | - name='QUERY_CAPS', index=44, number=37, |
951 | - options=None, |
952 | - type=None), |
953 | - descriptor.EnumValueDescriptor( |
954 | - name='SET_CAPS', index=45, number=38, |
955 | - options=None, |
956 | - type=None), |
957 | - descriptor.EnumValueDescriptor( |
958 | - name='ACCEPT_CAPS', index=46, number=39, |
959 | - options=None, |
960 | - type=None), |
961 | - descriptor.EnumValueDescriptor( |
962 | - name='FREE_SPACE_INFO', index=47, number=40, |
963 | - options=None, |
964 | - type=None), |
965 | - descriptor.EnumValueDescriptor( |
966 | - name='FREE_SPACE_INQUIRY', index=48, number=41, |
967 | - options=None, |
968 | - type=None), |
969 | - descriptor.EnumValueDescriptor( |
970 | - name='ACCOUNT_INFO', index=49, number=42, |
971 | - options=None, |
972 | - type=None), |
973 | - descriptor.EnumValueDescriptor( |
974 | - name='ACCOUNT_INQUIRY', index=50, number=43, |
975 | - options=None, |
976 | - type=None), |
977 | - ], |
978 | - options=None, |
979 | -) |
980 | - |
981 | -_ERROR_ERRORTYPE = descriptor.EnumDescriptor( |
982 | - name='ErrorType', |
983 | - full_name='ubuntuone.storageprotocol.Error.ErrorType', |
984 | - filename='ErrorType', |
985 | - values=[ |
986 | - descriptor.EnumValueDescriptor( |
987 | - name='UNSUPPORTED_VERSION', index=0, number=0, |
988 | - options=None, |
989 | - type=None), |
990 | - descriptor.EnumValueDescriptor( |
991 | - name='AUTHENTICATION_FAILED', index=1, number=1, |
992 | - options=None, |
993 | - type=None), |
994 | - descriptor.EnumValueDescriptor( |
995 | - name='INTERNAL_ERROR', index=2, number=2, |
996 | - options=None, |
997 | - type=None), |
998 | - descriptor.EnumValueDescriptor( |
999 | - name='AUTHENTICATION_REQUIRED', index=3, number=3, |
1000 | - options=None, |
1001 | - type=None), |
1002 | - descriptor.EnumValueDescriptor( |
1003 | - name='NO_PERMISSION', index=4, number=4, |
1004 | - options=None, |
1005 | - type=None), |
1006 | - descriptor.EnumValueDescriptor( |
1007 | - name='ALREADY_EXISTS', index=5, number=5, |
1008 | - options=None, |
1009 | - type=None), |
1010 | - descriptor.EnumValueDescriptor( |
1011 | - name='DOES_NOT_EXIST', index=6, number=6, |
1012 | - options=None, |
1013 | - type=None), |
1014 | - descriptor.EnumValueDescriptor( |
1015 | - name='NOT_A_DIRECTORY', index=7, number=7, |
1016 | - options=None, |
1017 | - type=None), |
1018 | - descriptor.EnumValueDescriptor( |
1019 | - name='NOT_EMPTY', index=8, number=8, |
1020 | - options=None, |
1021 | - type=None), |
1022 | - descriptor.EnumValueDescriptor( |
1023 | - name='NOT_AVAILABLE', index=9, number=9, |
1024 | - options=None, |
1025 | - type=None), |
1026 | - descriptor.EnumValueDescriptor( |
1027 | - name='UPLOAD_IN_PROGRESS', index=10, number=10, |
1028 | - options=None, |
1029 | - type=None), |
1030 | - descriptor.EnumValueDescriptor( |
1031 | - name='UPLOAD_CORRUPT', index=11, number=11, |
1032 | - options=None, |
1033 | - type=None), |
1034 | - descriptor.EnumValueDescriptor( |
1035 | - name='UPLOAD_CANCELED', index=12, number=12, |
1036 | - options=None, |
1037 | - type=None), |
1038 | - descriptor.EnumValueDescriptor( |
1039 | - name='CONFLICT', index=13, number=13, |
1040 | - options=None, |
1041 | - type=None), |
1042 | - descriptor.EnumValueDescriptor( |
1043 | - name='TRY_AGAIN', index=14, number=14, |
1044 | - options=None, |
1045 | - type=None), |
1046 | - descriptor.EnumValueDescriptor( |
1047 | - name='PROTOCOL_ERROR', index=15, number=15, |
1048 | - options=None, |
1049 | - type=None), |
1050 | - descriptor.EnumValueDescriptor( |
1051 | - name='QUOTA_EXCEEDED', index=16, number=16, |
1052 | - options=None, |
1053 | - type=None), |
1054 | - descriptor.EnumValueDescriptor( |
1055 | - name='INVALID_FILENAME', index=17, number=17, |
1056 | - options=None, |
1057 | - type=None), |
1058 | - ], |
1059 | - options=None, |
1060 | -) |
1061 | - |
1062 | -_CREATESHARE_ACCESSLEVEL = descriptor.EnumDescriptor( |
1063 | - name='AccessLevel', |
1064 | - full_name='ubuntuone.storageprotocol.CreateShare.AccessLevel', |
1065 | - filename='AccessLevel', |
1066 | - values=[ |
1067 | - descriptor.EnumValueDescriptor( |
1068 | - name='VIEW', index=0, number=0, |
1069 | - options=None, |
1070 | - type=None), |
1071 | - descriptor.EnumValueDescriptor( |
1072 | - name='MODIFY', index=1, number=1, |
1073 | - options=None, |
1074 | - type=None), |
1075 | - ], |
1076 | - options=None, |
1077 | -) |
1078 | - |
1079 | -_SHARES_DIRECTION = descriptor.EnumDescriptor( |
1080 | - name='Direction', |
1081 | - full_name='ubuntuone.storageprotocol.Shares.Direction', |
1082 | - filename='Direction', |
1083 | - values=[ |
1084 | - descriptor.EnumValueDescriptor( |
1085 | - name='TO_ME', index=0, number=0, |
1086 | - options=None, |
1087 | - type=None), |
1088 | - descriptor.EnumValueDescriptor( |
1089 | - name='FROM_ME', index=1, number=1, |
1090 | - options=None, |
1091 | - type=None), |
1092 | - ], |
1093 | - options=None, |
1094 | -) |
1095 | - |
1096 | -_SHARES_ACCESSLEVEL = descriptor.EnumDescriptor( |
1097 | - name='AccessLevel', |
1098 | - full_name='ubuntuone.storageprotocol.Shares.AccessLevel', |
1099 | - filename='AccessLevel', |
1100 | - values=[ |
1101 | - descriptor.EnumValueDescriptor( |
1102 | - name='VIEW', index=0, number=0, |
1103 | - options=None, |
1104 | - type=None), |
1105 | - descriptor.EnumValueDescriptor( |
1106 | - name='MODIFY', index=1, number=1, |
1107 | - options=None, |
1108 | - type=None), |
1109 | - ], |
1110 | - options=None, |
1111 | -) |
1112 | - |
1113 | -_NOTIFYSHARE_ACCESSLEVEL = descriptor.EnumDescriptor( |
1114 | - name='AccessLevel', |
1115 | - full_name='ubuntuone.storageprotocol.NotifyShare.AccessLevel', |
1116 | - filename='AccessLevel', |
1117 | - values=[ |
1118 | - descriptor.EnumValueDescriptor( |
1119 | - name='VIEW', index=0, number=0, |
1120 | - options=None, |
1121 | - type=None), |
1122 | - descriptor.EnumValueDescriptor( |
1123 | - name='MODIFY', index=1, number=1, |
1124 | - options=None, |
1125 | - type=None), |
1126 | - ], |
1127 | - options=None, |
1128 | -) |
1129 | - |
1130 | -_SHAREACCEPTED_ANSWER = descriptor.EnumDescriptor( |
1131 | - name='Answer', |
1132 | - full_name='ubuntuone.storageprotocol.ShareAccepted.Answer', |
1133 | - filename='Answer', |
1134 | - values=[ |
1135 | - descriptor.EnumValueDescriptor( |
1136 | - name='YES', index=0, number=0, |
1137 | - options=None, |
1138 | - type=None), |
1139 | - descriptor.EnumValueDescriptor( |
1140 | - name='NO', index=1, number=1, |
1141 | - options=None, |
1142 | - type=None), |
1143 | - ], |
1144 | - options=None, |
1145 | -) |
1146 | - |
1147 | -_VOLUMES_VOLUMETYPE = descriptor.EnumDescriptor( |
1148 | - name='VolumeType', |
1149 | - full_name='ubuntuone.storageprotocol.Volumes.VolumeType', |
1150 | - filename='VolumeType', |
1151 | - values=[ |
1152 | - descriptor.EnumValueDescriptor( |
1153 | - name='ROOT', index=0, number=1, |
1154 | - options=None, |
1155 | - type=None), |
1156 | - descriptor.EnumValueDescriptor( |
1157 | - name='SHARE', index=1, number=2, |
1158 | - options=None, |
1159 | - type=None), |
1160 | - descriptor.EnumValueDescriptor( |
1161 | - name='UDF', index=2, number=3, |
1162 | - options=None, |
1163 | - type=None), |
1164 | - ], |
1165 | - options=None, |
1166 | -) |
1167 | - |
1168 | - |
1169 | -_MESSAGE = descriptor.Descriptor( |
1170 | - name='Message', |
1171 | - full_name='ubuntuone.storageprotocol.Message', |
1172 | - filename='ubuntuone/storageprotocol/protocol.proto', |
1173 | - containing_type=None, |
1174 | - fields=[ |
1175 | - descriptor.FieldDescriptor( |
1176 | - name='id', full_name='ubuntuone.storageprotocol.Message.id', index=0, |
1177 | - number=1, type=5, cpp_type=1, label=2, |
1178 | - default_value=0, |
1179 | - message_type=None, enum_type=None, containing_type=None, |
1180 | - is_extension=False, extension_scope=None, |
1181 | - options=None), |
1182 | - descriptor.FieldDescriptor( |
1183 | - name='type', full_name='ubuntuone.storageprotocol.Message.type', index=1, |
1184 | - number=2, type=14, cpp_type=8, label=2, |
1185 | - default_value=0, |
1186 | - message_type=None, enum_type=None, containing_type=None, |
1187 | - is_extension=False, extension_scope=None, |
1188 | - options=None), |
1189 | - descriptor.FieldDescriptor( |
1190 | - name='error', full_name='ubuntuone.storageprotocol.Message.error', index=2, |
1191 | - number=3, type=11, cpp_type=10, label=1, |
1192 | - default_value=None, |
1193 | - message_type=None, enum_type=None, containing_type=None, |
1194 | - is_extension=False, extension_scope=None, |
1195 | - options=None), |
1196 | - descriptor.FieldDescriptor( |
1197 | - name='protocol', full_name='ubuntuone.storageprotocol.Message.protocol', index=3, |
1198 | - number=4, type=11, cpp_type=10, label=1, |
1199 | - default_value=None, |
1200 | - message_type=None, enum_type=None, containing_type=None, |
1201 | - is_extension=False, extension_scope=None, |
1202 | - options=None), |
1203 | - descriptor.FieldDescriptor( |
1204 | - name='auth_parameters', full_name='ubuntuone.storageprotocol.Message.auth_parameters', index=4, |
1205 | - number=5, type=11, cpp_type=10, label=3, |
1206 | - default_value=[], |
1207 | - message_type=None, enum_type=None, containing_type=None, |
1208 | - is_extension=False, extension_scope=None, |
1209 | - options=None), |
1210 | - descriptor.FieldDescriptor( |
1211 | - name='root', full_name='ubuntuone.storageprotocol.Message.root', index=5, |
1212 | - number=6, type=11, cpp_type=10, label=1, |
1213 | - default_value=None, |
1214 | - message_type=None, enum_type=None, containing_type=None, |
1215 | - is_extension=False, extension_scope=None, |
1216 | - options=None), |
1217 | - descriptor.FieldDescriptor( |
1218 | - name='query', full_name='ubuntuone.storageprotocol.Message.query', index=6, |
1219 | - number=7, type=11, cpp_type=10, label=3, |
1220 | - default_value=[], |
1221 | - message_type=None, enum_type=None, containing_type=None, |
1222 | - is_extension=False, extension_scope=None, |
1223 | - options=None), |
1224 | - descriptor.FieldDescriptor( |
1225 | - name='node_state', full_name='ubuntuone.storageprotocol.Message.node_state', index=7, |
1226 | - number=8, type=11, cpp_type=10, label=1, |
1227 | - default_value=None, |
1228 | - message_type=None, enum_type=None, containing_type=None, |
1229 | - is_extension=False, extension_scope=None, |
1230 | - options=None), |
1231 | - descriptor.FieldDescriptor( |
1232 | - name='make', full_name='ubuntuone.storageprotocol.Message.make', index=8, |
1233 | - number=9, type=11, cpp_type=10, label=1, |
1234 | - default_value=None, |
1235 | - message_type=None, enum_type=None, containing_type=None, |
1236 | - is_extension=False, extension_scope=None, |
1237 | - options=None), |
1238 | - descriptor.FieldDescriptor( |
1239 | - name='new', full_name='ubuntuone.storageprotocol.Message.new', index=9, |
1240 | - number=10, type=11, cpp_type=10, label=1, |
1241 | - default_value=None, |
1242 | - message_type=None, enum_type=None, containing_type=None, |
1243 | - is_extension=False, extension_scope=None, |
1244 | - options=None), |
1245 | - descriptor.FieldDescriptor( |
1246 | - name='move', full_name='ubuntuone.storageprotocol.Message.move', index=10, |
1247 | - number=11, type=11, cpp_type=10, label=1, |
1248 | - default_value=None, |
1249 | - message_type=None, enum_type=None, containing_type=None, |
1250 | - is_extension=False, extension_scope=None, |
1251 | - options=None), |
1252 | - descriptor.FieldDescriptor( |
1253 | - name='get_content', full_name='ubuntuone.storageprotocol.Message.get_content', index=11, |
1254 | - number=12, type=11, cpp_type=10, label=1, |
1255 | - default_value=None, |
1256 | - message_type=None, enum_type=None, containing_type=None, |
1257 | - is_extension=False, extension_scope=None, |
1258 | - options=None), |
1259 | - descriptor.FieldDescriptor( |
1260 | - name='put_content', full_name='ubuntuone.storageprotocol.Message.put_content', index=12, |
1261 | - number=13, type=11, cpp_type=10, label=1, |
1262 | - default_value=None, |
1263 | - message_type=None, enum_type=None, containing_type=None, |
1264 | - is_extension=False, extension_scope=None, |
1265 | - options=None), |
1266 | - descriptor.FieldDescriptor( |
1267 | - name='upload_in_progress', full_name='ubuntuone.storageprotocol.Message.upload_in_progress', index=13, |
1268 | - number=14, type=11, cpp_type=10, label=1, |
1269 | - default_value=None, |
1270 | - message_type=None, enum_type=None, containing_type=None, |
1271 | - is_extension=False, extension_scope=None, |
1272 | - options=None), |
1273 | - descriptor.FieldDescriptor( |
1274 | - name='bytes', full_name='ubuntuone.storageprotocol.Message.bytes', index=14, |
1275 | - number=15, type=11, cpp_type=10, label=1, |
1276 | - default_value=None, |
1277 | - message_type=None, enum_type=None, containing_type=None, |
1278 | - is_extension=False, extension_scope=None, |
1279 | - options=None), |
1280 | - descriptor.FieldDescriptor( |
1281 | - name='unlink', full_name='ubuntuone.storageprotocol.Message.unlink', index=15, |
1282 | - number=16, type=11, cpp_type=10, label=1, |
1283 | - default_value=None, |
1284 | - message_type=None, enum_type=None, containing_type=None, |
1285 | - is_extension=False, extension_scope=None, |
1286 | - options=None), |
1287 | - descriptor.FieldDescriptor( |
1288 | - name='cancel_request', full_name='ubuntuone.storageprotocol.Message.cancel_request', index=16, |
1289 | - number=17, type=11, cpp_type=10, label=1, |
1290 | - default_value=None, |
1291 | - message_type=None, enum_type=None, containing_type=None, |
1292 | - is_extension=False, extension_scope=None, |
1293 | - options=None), |
1294 | - descriptor.FieldDescriptor( |
1295 | - name='node_attr', full_name='ubuntuone.storageprotocol.Message.node_attr', index=17, |
1296 | - number=18, type=11, cpp_type=10, label=1, |
1297 | - default_value=None, |
1298 | - message_type=None, enum_type=None, containing_type=None, |
1299 | - is_extension=False, extension_scope=None, |
1300 | - options=None), |
1301 | - descriptor.FieldDescriptor( |
1302 | - name='create_share', full_name='ubuntuone.storageprotocol.Message.create_share', index=18, |
1303 | - number=19, type=11, cpp_type=10, label=1, |
1304 | - default_value=None, |
1305 | - message_type=None, enum_type=None, containing_type=None, |
1306 | - is_extension=False, extension_scope=None, |
1307 | - options=None), |
1308 | - descriptor.FieldDescriptor( |
1309 | - name='shares', full_name='ubuntuone.storageprotocol.Message.shares', index=19, |
1310 | - number=20, type=11, cpp_type=10, label=1, |
1311 | - default_value=None, |
1312 | - message_type=None, enum_type=None, containing_type=None, |
1313 | - is_extension=False, extension_scope=None, |
1314 | - options=None), |
1315 | - descriptor.FieldDescriptor( |
1316 | - name='notify_share', full_name='ubuntuone.storageprotocol.Message.notify_share', index=20, |
1317 | - number=21, type=11, cpp_type=10, label=1, |
1318 | - default_value=None, |
1319 | - message_type=None, enum_type=None, containing_type=None, |
1320 | - is_extension=False, extension_scope=None, |
1321 | - options=None), |
1322 | - descriptor.FieldDescriptor( |
1323 | - name='share_accepted', full_name='ubuntuone.storageprotocol.Message.share_accepted', index=21, |
1324 | - number=22, type=11, cpp_type=10, label=1, |
1325 | - default_value=None, |
1326 | - message_type=None, enum_type=None, containing_type=None, |
1327 | - is_extension=False, extension_scope=None, |
1328 | - options=None), |
1329 | - descriptor.FieldDescriptor( |
1330 | - name='share_deleted', full_name='ubuntuone.storageprotocol.Message.share_deleted', index=22, |
1331 | - number=23, type=11, cpp_type=10, label=1, |
1332 | - default_value=None, |
1333 | - message_type=None, enum_type=None, containing_type=None, |
1334 | - is_extension=False, extension_scope=None, |
1335 | - options=None), |
1336 | - descriptor.FieldDescriptor( |
1337 | - name='share_created', full_name='ubuntuone.storageprotocol.Message.share_created', index=23, |
1338 | - number=24, type=11, cpp_type=10, label=1, |
1339 | - default_value=None, |
1340 | - message_type=None, enum_type=None, containing_type=None, |
1341 | - is_extension=False, extension_scope=None, |
1342 | - options=None), |
1343 | - descriptor.FieldDescriptor( |
1344 | - name='delete_share', full_name='ubuntuone.storageprotocol.Message.delete_share', index=24, |
1345 | - number=25, type=11, cpp_type=10, label=1, |
1346 | - default_value=None, |
1347 | - message_type=None, enum_type=None, containing_type=None, |
1348 | - is_extension=False, extension_scope=None, |
1349 | - options=None), |
1350 | - descriptor.FieldDescriptor( |
1351 | - name='create_udf', full_name='ubuntuone.storageprotocol.Message.create_udf', index=25, |
1352 | - number=33, type=11, cpp_type=10, label=1, |
1353 | - default_value=None, |
1354 | - message_type=None, enum_type=None, containing_type=None, |
1355 | - is_extension=False, extension_scope=None, |
1356 | - options=None), |
1357 | - descriptor.FieldDescriptor( |
1358 | - name='list_volumes', full_name='ubuntuone.storageprotocol.Message.list_volumes', index=26, |
1359 | - number=34, type=11, cpp_type=10, label=1, |
1360 | - default_value=None, |
1361 | - message_type=None, enum_type=None, containing_type=None, |
1362 | - is_extension=False, extension_scope=None, |
1363 | - options=None), |
1364 | - descriptor.FieldDescriptor( |
1365 | - name='volume_deleted', full_name='ubuntuone.storageprotocol.Message.volume_deleted', index=27, |
1366 | - number=35, type=11, cpp_type=10, label=1, |
1367 | - default_value=None, |
1368 | - message_type=None, enum_type=None, containing_type=None, |
1369 | - is_extension=False, extension_scope=None, |
1370 | - options=None), |
1371 | - descriptor.FieldDescriptor( |
1372 | - name='volume_created', full_name='ubuntuone.storageprotocol.Message.volume_created', index=28, |
1373 | - number=36, type=11, cpp_type=10, label=1, |
1374 | - default_value=None, |
1375 | - message_type=None, enum_type=None, containing_type=None, |
1376 | - is_extension=False, extension_scope=None, |
1377 | - options=None), |
1378 | - descriptor.FieldDescriptor( |
1379 | - name='delete_volume', full_name='ubuntuone.storageprotocol.Message.delete_volume', index=29, |
1380 | - number=37, type=11, cpp_type=10, label=1, |
1381 | - default_value=None, |
1382 | - message_type=None, enum_type=None, containing_type=None, |
1383 | - is_extension=False, extension_scope=None, |
1384 | - options=None), |
1385 | - descriptor.FieldDescriptor( |
1386 | - name='query_caps', full_name='ubuntuone.storageprotocol.Message.query_caps', index=30, |
1387 | - number=26, type=11, cpp_type=10, label=3, |
1388 | - default_value=[], |
1389 | - message_type=None, enum_type=None, containing_type=None, |
1390 | - is_extension=False, extension_scope=None, |
1391 | - options=None), |
1392 | - descriptor.FieldDescriptor( |
1393 | - name='set_caps', full_name='ubuntuone.storageprotocol.Message.set_caps', index=31, |
1394 | - number=27, type=11, cpp_type=10, label=3, |
1395 | - default_value=[], |
1396 | - message_type=None, enum_type=None, containing_type=None, |
1397 | - is_extension=False, extension_scope=None, |
1398 | - options=None), |
1399 | - descriptor.FieldDescriptor( |
1400 | - name='accept_caps', full_name='ubuntuone.storageprotocol.Message.accept_caps', index=32, |
1401 | - number=28, type=11, cpp_type=10, label=1, |
1402 | - default_value=None, |
1403 | - message_type=None, enum_type=None, containing_type=None, |
1404 | - is_extension=False, extension_scope=None, |
1405 | - options=None), |
1406 | - descriptor.FieldDescriptor( |
1407 | - name='free_space_info', full_name='ubuntuone.storageprotocol.Message.free_space_info', index=33, |
1408 | - number=29, type=11, cpp_type=10, label=1, |
1409 | - default_value=None, |
1410 | - message_type=None, enum_type=None, containing_type=None, |
1411 | - is_extension=False, extension_scope=None, |
1412 | - options=None), |
1413 | - descriptor.FieldDescriptor( |
1414 | - name='free_space_inquiry', full_name='ubuntuone.storageprotocol.Message.free_space_inquiry', index=34, |
1415 | - number=30, type=11, cpp_type=10, label=1, |
1416 | - default_value=None, |
1417 | - message_type=None, enum_type=None, containing_type=None, |
1418 | - is_extension=False, extension_scope=None, |
1419 | - options=None), |
1420 | - descriptor.FieldDescriptor( |
1421 | - name='account_info', full_name='ubuntuone.storageprotocol.Message.account_info', index=35, |
1422 | - number=31, type=11, cpp_type=10, label=1, |
1423 | - default_value=None, |
1424 | - message_type=None, enum_type=None, containing_type=None, |
1425 | - is_extension=False, extension_scope=None, |
1426 | - options=None), |
1427 | - descriptor.FieldDescriptor( |
1428 | - name='begin_content', full_name='ubuntuone.storageprotocol.Message.begin_content', index=36, |
1429 | - number=32, type=11, cpp_type=10, label=1, |
1430 | - default_value=None, |
1431 | - message_type=None, enum_type=None, containing_type=None, |
1432 | - is_extension=False, extension_scope=None, |
1433 | - options=None), |
1434 | - ], |
1435 | - extensions=[ |
1436 | - ], |
1437 | - nested_types=[], # TODO(robinson): Implement. |
1438 | - enum_types=[ |
1439 | - _MESSAGE_MESSAGETYPE, |
1440 | - ], |
1441 | - options=None) |
1442 | - |
1443 | - |
1444 | -_ERROR = descriptor.Descriptor( |
1445 | - name='Error', |
1446 | - full_name='ubuntuone.storageprotocol.Error', |
1447 | - filename='ubuntuone/storageprotocol/protocol.proto', |
1448 | - containing_type=None, |
1449 | - fields=[ |
1450 | - descriptor.FieldDescriptor( |
1451 | - name='type', full_name='ubuntuone.storageprotocol.Error.type', index=0, |
1452 | - number=1, type=14, cpp_type=8, label=2, |
1453 | - default_value=0, |
1454 | - message_type=None, enum_type=None, containing_type=None, |
1455 | - is_extension=False, extension_scope=None, |
1456 | - options=None), |
1457 | - descriptor.FieldDescriptor( |
1458 | - name='comment', full_name='ubuntuone.storageprotocol.Error.comment', index=1, |
1459 | - number=2, type=9, cpp_type=9, label=1, |
1460 | - default_value=unicode("", "utf-8"), |
1461 | - message_type=None, enum_type=None, containing_type=None, |
1462 | - is_extension=False, extension_scope=None, |
1463 | - options=None), |
1464 | - ], |
1465 | - extensions=[ |
1466 | - ], |
1467 | - nested_types=[], # TODO(robinson): Implement. |
1468 | - enum_types=[ |
1469 | - _ERROR_ERRORTYPE, |
1470 | - ], |
1471 | - options=None) |
1472 | - |
1473 | - |
1474 | -_PROTOCOL = descriptor.Descriptor( |
1475 | - name='Protocol', |
1476 | - full_name='ubuntuone.storageprotocol.Protocol', |
1477 | - filename='ubuntuone/storageprotocol/protocol.proto', |
1478 | - containing_type=None, |
1479 | - fields=[ |
1480 | - descriptor.FieldDescriptor( |
1481 | - name='version', full_name='ubuntuone.storageprotocol.Protocol.version', index=0, |
1482 | - number=1, type=5, cpp_type=1, label=2, |
1483 | - default_value=0, |
1484 | - message_type=None, enum_type=None, containing_type=None, |
1485 | - is_extension=False, extension_scope=None, |
1486 | - options=None), |
1487 | - ], |
1488 | - extensions=[ |
1489 | - ], |
1490 | - nested_types=[], # TODO(robinson): Implement. |
1491 | - enum_types=[ |
1492 | - ], |
1493 | - options=None) |
1494 | - |
1495 | - |
1496 | -_AUTHPARAMETER = descriptor.Descriptor( |
1497 | - name='AuthParameter', |
1498 | - full_name='ubuntuone.storageprotocol.AuthParameter', |
1499 | - filename='ubuntuone/storageprotocol/protocol.proto', |
1500 | - containing_type=None, |
1501 | - fields=[ |
1502 | - descriptor.FieldDescriptor( |
1503 | - name='name', full_name='ubuntuone.storageprotocol.AuthParameter.name', index=0, |
1504 | - number=1, type=9, cpp_type=9, label=2, |
1505 | - default_value=unicode("", "utf-8"), |
1506 | - message_type=None, enum_type=None, containing_type=None, |
1507 | - is_extension=False, extension_scope=None, |
1508 | - options=None), |
1509 | - descriptor.FieldDescriptor( |
1510 | - name='value', full_name='ubuntuone.storageprotocol.AuthParameter.value', index=1, |
1511 | - number=2, type=9, cpp_type=9, label=2, |
1512 | - default_value=unicode("", "utf-8"), |
1513 | - message_type=None, enum_type=None, containing_type=None, |
1514 | - is_extension=False, extension_scope=None, |
1515 | - options=None), |
1516 | - ], |
1517 | - extensions=[ |
1518 | - ], |
1519 | - nested_types=[], # TODO(robinson): Implement. |
1520 | - enum_types=[ |
1521 | - ], |
1522 | - options=None) |
1523 | - |
1524 | - |
1525 | -_MAKE = descriptor.Descriptor( |
1526 | - name='Make', |
1527 | - full_name='ubuntuone.storageprotocol.Make', |
1528 | - filename='ubuntuone/storageprotocol/protocol.proto', |
1529 | - containing_type=None, |
1530 | - fields=[ |
1531 | - descriptor.FieldDescriptor( |
1532 | - name='share', full_name='ubuntuone.storageprotocol.Make.share', index=0, |
1533 | - number=1, type=12, cpp_type=9, label=1, |
1534 | - default_value="", |
1535 | - message_type=None, enum_type=None, containing_type=None, |
1536 | - is_extension=False, extension_scope=None, |
1537 | - options=None), |
1538 | - descriptor.FieldDescriptor( |
1539 | - name='parent_node', full_name='ubuntuone.storageprotocol.Make.parent_node', index=1, |
1540 | - number=2, type=12, cpp_type=9, label=1, |
1541 | - default_value="", |
1542 | - message_type=None, enum_type=None, containing_type=None, |
1543 | - is_extension=False, extension_scope=None, |
1544 | - options=None), |
1545 | - descriptor.FieldDescriptor( |
1546 | - name='name', full_name='ubuntuone.storageprotocol.Make.name', index=2, |
1547 | - number=3, type=9, cpp_type=9, label=1, |
1548 | - default_value=unicode("", "utf-8"), |
1549 | - message_type=None, enum_type=None, containing_type=None, |
1550 | - is_extension=False, extension_scope=None, |
1551 | - options=None), |
1552 | - ], |
1553 | - extensions=[ |
1554 | - ], |
1555 | - nested_types=[], # TODO(robinson): Implement. |
1556 | - enum_types=[ |
1557 | - ], |
1558 | - options=None) |
1559 | - |
1560 | - |
1561 | -_NEW = descriptor.Descriptor( |
1562 | - name='New', |
1563 | - full_name='ubuntuone.storageprotocol.New', |
1564 | - filename='ubuntuone/storageprotocol/protocol.proto', |
1565 | - containing_type=None, |
1566 | - fields=[ |
1567 | - descriptor.FieldDescriptor( |
1568 | - name='node', full_name='ubuntuone.storageprotocol.New.node', index=0, |
1569 | - number=1, type=12, cpp_type=9, label=1, |
1570 | - default_value="", |
1571 | - message_type=None, enum_type=None, containing_type=None, |
1572 | - is_extension=False, extension_scope=None, |
1573 | - options=None), |
1574 | - descriptor.FieldDescriptor( |
1575 | - name='parent_node', full_name='ubuntuone.storageprotocol.New.parent_node', index=1, |
1576 | - number=2, type=12, cpp_type=9, label=1, |
1577 | - default_value="", |
1578 | - message_type=None, enum_type=None, containing_type=None, |
1579 | - is_extension=False, extension_scope=None, |
1580 | - options=None), |
1581 | - descriptor.FieldDescriptor( |
1582 | - name='name', full_name='ubuntuone.storageprotocol.New.name', index=2, |
1583 | - number=3, type=9, cpp_type=9, label=1, |
1584 | - default_value=unicode("", "utf-8"), |
1585 | - message_type=None, enum_type=None, containing_type=None, |
1586 | - is_extension=False, extension_scope=None, |
1587 | - options=None), |
1588 | - ], |
1589 | - extensions=[ |
1590 | - ], |
1591 | - nested_types=[], # TODO(robinson): Implement. |
1592 | - enum_types=[ |
1593 | - ], |
1594 | - options=None) |
1595 | - |
1596 | - |
1597 | -_ROOT = descriptor.Descriptor( |
1598 | - name='Root', |
1599 | - full_name='ubuntuone.storageprotocol.Root', |
1600 | - filename='ubuntuone/storageprotocol/protocol.proto', |
1601 | - containing_type=None, |
1602 | - fields=[ |
1603 | - descriptor.FieldDescriptor( |
1604 | - name='node', full_name='ubuntuone.storageprotocol.Root.node', index=0, |
1605 | - number=1, type=12, cpp_type=9, label=1, |
1606 | - default_value="", |
1607 | - message_type=None, enum_type=None, containing_type=None, |
1608 | - is_extension=False, extension_scope=None, |
1609 | - options=None), |
1610 | - ], |
1611 | - extensions=[ |
1612 | - ], |
1613 | - nested_types=[], # TODO(robinson): Implement. |
1614 | - enum_types=[ |
1615 | - ], |
1616 | - options=None) |
1617 | - |
1618 | - |
1619 | -_QUERY = descriptor.Descriptor( |
1620 | - name='Query', |
1621 | - full_name='ubuntuone.storageprotocol.Query', |
1622 | - filename='ubuntuone/storageprotocol/protocol.proto', |
1623 | - containing_type=None, |
1624 | - fields=[ |
1625 | - descriptor.FieldDescriptor( |
1626 | - name='share', full_name='ubuntuone.storageprotocol.Query.share', index=0, |
1627 | - number=1, type=12, cpp_type=9, label=1, |
1628 | - default_value="", |
1629 | - message_type=None, enum_type=None, containing_type=None, |
1630 | - is_extension=False, extension_scope=None, |
1631 | - options=None), |
1632 | - descriptor.FieldDescriptor( |
1633 | - name='node', full_name='ubuntuone.storageprotocol.Query.node', index=1, |
1634 | - number=2, type=12, cpp_type=9, label=1, |
1635 | - default_value="", |
1636 | - message_type=None, enum_type=None, containing_type=None, |
1637 | - is_extension=False, extension_scope=None, |
1638 | - options=None), |
1639 | - descriptor.FieldDescriptor( |
1640 | - name='hash', full_name='ubuntuone.storageprotocol.Query.hash', index=2, |
1641 | - number=3, type=12, cpp_type=9, label=1, |
1642 | - default_value="", |
1643 | - message_type=None, enum_type=None, containing_type=None, |
1644 | - is_extension=False, extension_scope=None, |
1645 | - options=None), |
1646 | - ], |
1647 | - extensions=[ |
1648 | - ], |
1649 | - nested_types=[], # TODO(robinson): Implement. |
1650 | - enum_types=[ |
1651 | - ], |
1652 | - options=None) |
1653 | - |
1654 | - |
1655 | -_NODESTATE = descriptor.Descriptor( |
1656 | - name='NodeState', |
1657 | - full_name='ubuntuone.storageprotocol.NodeState', |
1658 | - filename='ubuntuone/storageprotocol/protocol.proto', |
1659 | - containing_type=None, |
1660 | - fields=[ |
1661 | - descriptor.FieldDescriptor( |
1662 | - name='share', full_name='ubuntuone.storageprotocol.NodeState.share', index=0, |
1663 | - number=1, type=12, cpp_type=9, label=1, |
1664 | - default_value="", |
1665 | - message_type=None, enum_type=None, containing_type=None, |
1666 | - is_extension=False, extension_scope=None, |
1667 | - options=None), |
1668 | - descriptor.FieldDescriptor( |
1669 | - name='node', full_name='ubuntuone.storageprotocol.NodeState.node', index=1, |
1670 | - number=2, type=12, cpp_type=9, label=1, |
1671 | - default_value="", |
1672 | - message_type=None, enum_type=None, containing_type=None, |
1673 | - is_extension=False, extension_scope=None, |
1674 | - options=None), |
1675 | - descriptor.FieldDescriptor( |
1676 | - name='hash', full_name='ubuntuone.storageprotocol.NodeState.hash', index=2, |
1677 | - number=3, type=12, cpp_type=9, label=1, |
1678 | - default_value="", |
1679 | - message_type=None, enum_type=None, containing_type=None, |
1680 | - is_extension=False, extension_scope=None, |
1681 | - options=None), |
1682 | - ], |
1683 | - extensions=[ |
1684 | - ], |
1685 | - nested_types=[], # TODO(robinson): Implement. |
1686 | - enum_types=[ |
1687 | - ], |
1688 | - options=None) |
1689 | - |
1690 | - |
1691 | -_GETCONTENT = descriptor.Descriptor( |
1692 | - name='GetContent', |
1693 | - full_name='ubuntuone.storageprotocol.GetContent', |
1694 | - filename='ubuntuone/storageprotocol/protocol.proto', |
1695 | - containing_type=None, |
1696 | - fields=[ |
1697 | - descriptor.FieldDescriptor( |
1698 | - name='share', full_name='ubuntuone.storageprotocol.GetContent.share', index=0, |
1699 | - number=1, type=12, cpp_type=9, label=1, |
1700 | - default_value="", |
1701 | - message_type=None, enum_type=None, containing_type=None, |
1702 | - is_extension=False, extension_scope=None, |
1703 | - options=None), |
1704 | - descriptor.FieldDescriptor( |
1705 | - name='node', full_name='ubuntuone.storageprotocol.GetContent.node', index=1, |
1706 | - number=2, type=12, cpp_type=9, label=1, |
1707 | - default_value="", |
1708 | - message_type=None, enum_type=None, containing_type=None, |
1709 | - is_extension=False, extension_scope=None, |
1710 | - options=None), |
1711 | - descriptor.FieldDescriptor( |
1712 | - name='hash', full_name='ubuntuone.storageprotocol.GetContent.hash', index=2, |
1713 | - number=3, type=12, cpp_type=9, label=1, |
1714 | - default_value="", |
1715 | - message_type=None, enum_type=None, containing_type=None, |
1716 | - is_extension=False, extension_scope=None, |
1717 | - options=None), |
1718 | - descriptor.FieldDescriptor( |
1719 | - name='offset', full_name='ubuntuone.storageprotocol.GetContent.offset', index=3, |
1720 | - number=4, type=3, cpp_type=2, label=1, |
1721 | - default_value=0, |
1722 | - message_type=None, enum_type=None, containing_type=None, |
1723 | - is_extension=False, extension_scope=None, |
1724 | - options=None), |
1725 | - ], |
1726 | - extensions=[ |
1727 | - ], |
1728 | - nested_types=[], # TODO(robinson): Implement. |
1729 | - enum_types=[ |
1730 | - ], |
1731 | - options=None) |
1732 | - |
1733 | - |
1734 | -_CANCELREQUEST = descriptor.Descriptor( |
1735 | - name='CancelRequest', |
1736 | - full_name='ubuntuone.storageprotocol.CancelRequest', |
1737 | - filename='ubuntuone/storageprotocol/protocol.proto', |
1738 | - containing_type=None, |
1739 | - fields=[ |
1740 | - ], |
1741 | - extensions=[ |
1742 | - ], |
1743 | - nested_types=[], # TODO(robinson): Implement. |
1744 | - enum_types=[ |
1745 | - ], |
1746 | - options=None) |
1747 | - |
1748 | - |
1749 | -_NODEATTR = descriptor.Descriptor( |
1750 | - name='NodeAttr', |
1751 | - full_name='ubuntuone.storageprotocol.NodeAttr', |
1752 | - filename='ubuntuone/storageprotocol/protocol.proto', |
1753 | - containing_type=None, |
1754 | - fields=[ |
1755 | - descriptor.FieldDescriptor( |
1756 | - name='deflated_size', full_name='ubuntuone.storageprotocol.NodeAttr.deflated_size', index=0, |
1757 | - number=1, type=4, cpp_type=4, label=1, |
1758 | - default_value=0, |
1759 | - message_type=None, enum_type=None, containing_type=None, |
1760 | - is_extension=False, extension_scope=None, |
1761 | - options=None), |
1762 | - descriptor.FieldDescriptor( |
1763 | - name='size', full_name='ubuntuone.storageprotocol.NodeAttr.size', index=1, |
1764 | - number=2, type=4, cpp_type=4, label=1, |
1765 | - default_value=0, |
1766 | - message_type=None, enum_type=None, containing_type=None, |
1767 | - is_extension=False, extension_scope=None, |
1768 | - options=None), |
1769 | - descriptor.FieldDescriptor( |
1770 | - name='hash', full_name='ubuntuone.storageprotocol.NodeAttr.hash', index=2, |
1771 | - number=3, type=12, cpp_type=9, label=1, |
1772 | - default_value="", |
1773 | - message_type=None, enum_type=None, containing_type=None, |
1774 | - is_extension=False, extension_scope=None, |
1775 | - options=None), |
1776 | - descriptor.FieldDescriptor( |
1777 | - name='crc32', full_name='ubuntuone.storageprotocol.NodeAttr.crc32', index=3, |
1778 | - number=4, type=13, cpp_type=3, label=1, |
1779 | - default_value=0, |
1780 | - message_type=None, enum_type=None, containing_type=None, |
1781 | - is_extension=False, extension_scope=None, |
1782 | - options=None), |
1783 | - ], |
1784 | - extensions=[ |
1785 | - ], |
1786 | - nested_types=[], # TODO(robinson): Implement. |
1787 | - enum_types=[ |
1788 | - ], |
1789 | - options=None) |
1790 | - |
1791 | - |
1792 | -_BYTES = descriptor.Descriptor( |
1793 | - name='Bytes', |
1794 | - full_name='ubuntuone.storageprotocol.Bytes', |
1795 | - filename='ubuntuone/storageprotocol/protocol.proto', |
1796 | - containing_type=None, |
1797 | - fields=[ |
1798 | - descriptor.FieldDescriptor( |
1799 | - name='bytes', full_name='ubuntuone.storageprotocol.Bytes.bytes', index=0, |
1800 | - number=1, type=12, cpp_type=9, label=1, |
1801 | - default_value="", |
1802 | - message_type=None, enum_type=None, containing_type=None, |
1803 | - is_extension=False, extension_scope=None, |
1804 | - options=None), |
1805 | - ], |
1806 | - extensions=[ |
1807 | - ], |
1808 | - nested_types=[], # TODO(robinson): Implement. |
1809 | - enum_types=[ |
1810 | - ], |
1811 | - options=None) |
1812 | - |
1813 | - |
1814 | -_PUTCONTENT = descriptor.Descriptor( |
1815 | - name='PutContent', |
1816 | - full_name='ubuntuone.storageprotocol.PutContent', |
1817 | - filename='ubuntuone/storageprotocol/protocol.proto', |
1818 | - containing_type=None, |
1819 | - fields=[ |
1820 | - descriptor.FieldDescriptor( |
1821 | - name='share', full_name='ubuntuone.storageprotocol.PutContent.share', index=0, |
1822 | - number=1, type=12, cpp_type=9, label=1, |
1823 | - default_value="", |
1824 | - message_type=None, enum_type=None, containing_type=None, |
1825 | - is_extension=False, extension_scope=None, |
1826 | - options=None), |
1827 | - descriptor.FieldDescriptor( |
1828 | - name='node', full_name='ubuntuone.storageprotocol.PutContent.node', index=1, |
1829 | - number=2, type=12, cpp_type=9, label=1, |
1830 | - default_value="", |
1831 | - message_type=None, enum_type=None, containing_type=None, |
1832 | - is_extension=False, extension_scope=None, |
1833 | - options=None), |
1834 | - descriptor.FieldDescriptor( |
1835 | - name='previous_hash', full_name='ubuntuone.storageprotocol.PutContent.previous_hash', index=2, |
1836 | - number=3, type=12, cpp_type=9, label=1, |
1837 | - default_value="", |
1838 | - message_type=None, enum_type=None, containing_type=None, |
1839 | - is_extension=False, extension_scope=None, |
1840 | - options=None), |
1841 | - descriptor.FieldDescriptor( |
1842 | - name='hash', full_name='ubuntuone.storageprotocol.PutContent.hash', index=3, |
1843 | - number=4, type=12, cpp_type=9, label=1, |
1844 | - default_value="", |
1845 | - message_type=None, enum_type=None, containing_type=None, |
1846 | - is_extension=False, extension_scope=None, |
1847 | - options=None), |
1848 | - descriptor.FieldDescriptor( |
1849 | - name='crc32', full_name='ubuntuone.storageprotocol.PutContent.crc32', index=4, |
1850 | - number=5, type=13, cpp_type=3, label=1, |
1851 | - default_value=0, |
1852 | - message_type=None, enum_type=None, containing_type=None, |
1853 | - is_extension=False, extension_scope=None, |
1854 | - options=None), |
1855 | - descriptor.FieldDescriptor( |
1856 | - name='size', full_name='ubuntuone.storageprotocol.PutContent.size', index=5, |
1857 | - number=6, type=4, cpp_type=4, label=1, |
1858 | - default_value=0, |
1859 | - message_type=None, enum_type=None, containing_type=None, |
1860 | - is_extension=False, extension_scope=None, |
1861 | - options=None), |
1862 | - descriptor.FieldDescriptor( |
1863 | - name='deflated_size', full_name='ubuntuone.storageprotocol.PutContent.deflated_size', index=6, |
1864 | - number=7, type=4, cpp_type=4, label=1, |
1865 | - default_value=0, |
1866 | - message_type=None, enum_type=None, containing_type=None, |
1867 | - is_extension=False, extension_scope=None, |
1868 | - options=None), |
1869 | - ], |
1870 | - extensions=[ |
1871 | - ], |
1872 | - nested_types=[], # TODO(robinson): Implement. |
1873 | - enum_types=[ |
1874 | - ], |
1875 | - options=None) |
1876 | - |
1877 | - |
1878 | -_BEGINCONTENT = descriptor.Descriptor( |
1879 | - name='BeginContent', |
1880 | - full_name='ubuntuone.storageprotocol.BeginContent', |
1881 | - filename='ubuntuone/storageprotocol/protocol.proto', |
1882 | - containing_type=None, |
1883 | - fields=[ |
1884 | - descriptor.FieldDescriptor( |
1885 | - name='offset', full_name='ubuntuone.storageprotocol.BeginContent.offset', index=0, |
1886 | - number=2, type=4, cpp_type=4, label=1, |
1887 | - default_value=0, |
1888 | - message_type=None, enum_type=None, containing_type=None, |
1889 | - is_extension=False, extension_scope=None, |
1890 | - options=None), |
1891 | - ], |
1892 | - extensions=[ |
1893 | - ], |
1894 | - nested_types=[], # TODO(robinson): Implement. |
1895 | - enum_types=[ |
1896 | - ], |
1897 | - options=None) |
1898 | - |
1899 | - |
1900 | -_UPLOADINPROGRESS = descriptor.Descriptor( |
1901 | - name='UploadInProgress', |
1902 | - full_name='ubuntuone.storageprotocol.UploadInProgress', |
1903 | - filename='ubuntuone/storageprotocol/protocol.proto', |
1904 | - containing_type=None, |
1905 | - fields=[ |
1906 | - descriptor.FieldDescriptor( |
1907 | - name='upload', full_name='ubuntuone.storageprotocol.UploadInProgress.upload', index=0, |
1908 | - number=1, type=12, cpp_type=9, label=1, |
1909 | - default_value="", |
1910 | - message_type=None, enum_type=None, containing_type=None, |
1911 | - is_extension=False, extension_scope=None, |
1912 | - options=None), |
1913 | - descriptor.FieldDescriptor( |
1914 | - name='timestamp', full_name='ubuntuone.storageprotocol.UploadInProgress.timestamp', index=1, |
1915 | - number=2, type=5, cpp_type=1, label=1, |
1916 | - default_value=0, |
1917 | - message_type=None, enum_type=None, containing_type=None, |
1918 | - is_extension=False, extension_scope=None, |
1919 | - options=None), |
1920 | - ], |
1921 | - extensions=[ |
1922 | - ], |
1923 | - nested_types=[], # TODO(robinson): Implement. |
1924 | - enum_types=[ |
1925 | - ], |
1926 | - options=None) |
1927 | - |
1928 | - |
1929 | -_MOVE = descriptor.Descriptor( |
1930 | - name='Move', |
1931 | - full_name='ubuntuone.storageprotocol.Move', |
1932 | - filename='ubuntuone/storageprotocol/protocol.proto', |
1933 | - containing_type=None, |
1934 | - fields=[ |
1935 | - descriptor.FieldDescriptor( |
1936 | - name='share', full_name='ubuntuone.storageprotocol.Move.share', index=0, |
1937 | - number=1, type=12, cpp_type=9, label=1, |
1938 | - default_value="", |
1939 | - message_type=None, enum_type=None, containing_type=None, |
1940 | - is_extension=False, extension_scope=None, |
1941 | - options=None), |
1942 | - descriptor.FieldDescriptor( |
1943 | - name='node', full_name='ubuntuone.storageprotocol.Move.node', index=1, |
1944 | - number=2, type=12, cpp_type=9, label=1, |
1945 | - default_value="", |
1946 | - message_type=None, enum_type=None, containing_type=None, |
1947 | - is_extension=False, extension_scope=None, |
1948 | - options=None), |
1949 | - descriptor.FieldDescriptor( |
1950 | - name='new_parent_node', full_name='ubuntuone.storageprotocol.Move.new_parent_node', index=2, |
1951 | - number=3, type=12, cpp_type=9, label=1, |
1952 | - default_value="", |
1953 | - message_type=None, enum_type=None, containing_type=None, |
1954 | - is_extension=False, extension_scope=None, |
1955 | - options=None), |
1956 | - descriptor.FieldDescriptor( |
1957 | - name='new_name', full_name='ubuntuone.storageprotocol.Move.new_name', index=3, |
1958 | - number=4, type=9, cpp_type=9, label=1, |
1959 | - default_value=unicode("", "utf-8"), |
1960 | - message_type=None, enum_type=None, containing_type=None, |
1961 | - is_extension=False, extension_scope=None, |
1962 | - options=None), |
1963 | - ], |
1964 | - extensions=[ |
1965 | - ], |
1966 | - nested_types=[], # TODO(robinson): Implement. |
1967 | - enum_types=[ |
1968 | - ], |
1969 | - options=None) |
1970 | - |
1971 | - |
1972 | -_UNLINK = descriptor.Descriptor( |
1973 | - name='Unlink', |
1974 | - full_name='ubuntuone.storageprotocol.Unlink', |
1975 | - filename='ubuntuone/storageprotocol/protocol.proto', |
1976 | - containing_type=None, |
1977 | - fields=[ |
1978 | - descriptor.FieldDescriptor( |
1979 | - name='share', full_name='ubuntuone.storageprotocol.Unlink.share', index=0, |
1980 | - number=1, type=12, cpp_type=9, label=1, |
1981 | - default_value="", |
1982 | - message_type=None, enum_type=None, containing_type=None, |
1983 | - is_extension=False, extension_scope=None, |
1984 | - options=None), |
1985 | - descriptor.FieldDescriptor( |
1986 | - name='node', full_name='ubuntuone.storageprotocol.Unlink.node', index=1, |
1987 | - number=2, type=12, cpp_type=9, label=1, |
1988 | - default_value="", |
1989 | - message_type=None, enum_type=None, containing_type=None, |
1990 | - is_extension=False, extension_scope=None, |
1991 | - options=None), |
1992 | - ], |
1993 | - extensions=[ |
1994 | - ], |
1995 | - nested_types=[], # TODO(robinson): Implement. |
1996 | - enum_types=[ |
1997 | - ], |
1998 | - options=None) |
1999 | - |
2000 | - |
2001 | -_CREATESHARE = descriptor.Descriptor( |
2002 | - name='CreateShare', |
2003 | - full_name='ubuntuone.storageprotocol.CreateShare', |
2004 | - filename='ubuntuone/storageprotocol/protocol.proto', |
2005 | - containing_type=None, |
2006 | - fields=[ |
2007 | - descriptor.FieldDescriptor( |
2008 | - name='node', full_name='ubuntuone.storageprotocol.CreateShare.node', index=0, |
2009 | - number=1, type=12, cpp_type=9, label=1, |
2010 | - default_value="", |
2011 | - message_type=None, enum_type=None, containing_type=None, |
2012 | - is_extension=False, extension_scope=None, |
2013 | - options=None), |
2014 | - descriptor.FieldDescriptor( |
2015 | - name='share_to', full_name='ubuntuone.storageprotocol.CreateShare.share_to', index=1, |
2016 | - number=2, type=9, cpp_type=9, label=1, |
2017 | - default_value=unicode("", "utf-8"), |
2018 | - message_type=None, enum_type=None, containing_type=None, |
2019 | - is_extension=False, extension_scope=None, |
2020 | - options=None), |
2021 | - descriptor.FieldDescriptor( |
2022 | - name='name', full_name='ubuntuone.storageprotocol.CreateShare.name', index=2, |
2023 | - number=3, type=9, cpp_type=9, label=1, |
2024 | - default_value=unicode("", "utf-8"), |
2025 | - message_type=None, enum_type=None, containing_type=None, |
2026 | - is_extension=False, extension_scope=None, |
2027 | - options=None), |
2028 | - descriptor.FieldDescriptor( |
2029 | - name='access_level', full_name='ubuntuone.storageprotocol.CreateShare.access_level', index=3, |
2030 | - number=4, type=14, cpp_type=8, label=1, |
2031 | - default_value=0, |
2032 | - message_type=None, enum_type=None, containing_type=None, |
2033 | - is_extension=False, extension_scope=None, |
2034 | - options=None), |
2035 | - ], |
2036 | - extensions=[ |
2037 | - ], |
2038 | - nested_types=[], # TODO(robinson): Implement. |
2039 | - enum_types=[ |
2040 | - _CREATESHARE_ACCESSLEVEL, |
2041 | - ], |
2042 | - options=None) |
2043 | - |
2044 | - |
2045 | -_SHARES = descriptor.Descriptor( |
2046 | - name='Shares', |
2047 | - full_name='ubuntuone.storageprotocol.Shares', |
2048 | - filename='ubuntuone/storageprotocol/protocol.proto', |
2049 | - containing_type=None, |
2050 | - fields=[ |
2051 | - descriptor.FieldDescriptor( |
2052 | - name='share_id', full_name='ubuntuone.storageprotocol.Shares.share_id', index=0, |
2053 | - number=1, type=12, cpp_type=9, label=1, |
2054 | - default_value="", |
2055 | - message_type=None, enum_type=None, containing_type=None, |
2056 | - is_extension=False, extension_scope=None, |
2057 | - options=None), |
2058 | - descriptor.FieldDescriptor( |
2059 | - name='direction', full_name='ubuntuone.storageprotocol.Shares.direction', index=1, |
2060 | - number=2, type=14, cpp_type=8, label=1, |
2061 | - default_value=0, |
2062 | - message_type=None, enum_type=None, containing_type=None, |
2063 | - is_extension=False, extension_scope=None, |
2064 | - options=None), |
2065 | - descriptor.FieldDescriptor( |
2066 | - name='subtree', full_name='ubuntuone.storageprotocol.Shares.subtree', index=2, |
2067 | - number=3, type=12, cpp_type=9, label=1, |
2068 | - default_value="", |
2069 | - message_type=None, enum_type=None, containing_type=None, |
2070 | - is_extension=False, extension_scope=None, |
2071 | - options=None), |
2072 | - descriptor.FieldDescriptor( |
2073 | - name='share_name', full_name='ubuntuone.storageprotocol.Shares.share_name', index=3, |
2074 | - number=4, type=9, cpp_type=9, label=1, |
2075 | - default_value=unicode("", "utf-8"), |
2076 | - message_type=None, enum_type=None, containing_type=None, |
2077 | - is_extension=False, extension_scope=None, |
2078 | - options=None), |
2079 | - descriptor.FieldDescriptor( |
2080 | - name='other_username', full_name='ubuntuone.storageprotocol.Shares.other_username', index=4, |
2081 | - number=5, type=9, cpp_type=9, label=1, |
2082 | - default_value=unicode("", "utf-8"), |
2083 | - message_type=None, enum_type=None, containing_type=None, |
2084 | - is_extension=False, extension_scope=None, |
2085 | - options=None), |
2086 | - descriptor.FieldDescriptor( |
2087 | - name='other_visible_name', full_name='ubuntuone.storageprotocol.Shares.other_visible_name', index=5, |
2088 | - number=6, type=9, cpp_type=9, label=1, |
2089 | - default_value=unicode("", "utf-8"), |
2090 | - message_type=None, enum_type=None, containing_type=None, |
2091 | - is_extension=False, extension_scope=None, |
2092 | - options=None), |
2093 | - descriptor.FieldDescriptor( |
2094 | - name='accepted', full_name='ubuntuone.storageprotocol.Shares.accepted', index=6, |
2095 | - number=7, type=8, cpp_type=7, label=1, |
2096 | - default_value=False, |
2097 | - message_type=None, enum_type=None, containing_type=None, |
2098 | - is_extension=False, extension_scope=None, |
2099 | - options=None), |
2100 | - descriptor.FieldDescriptor( |
2101 | - name='access_level', full_name='ubuntuone.storageprotocol.Shares.access_level', index=7, |
2102 | - number=8, type=14, cpp_type=8, label=1, |
2103 | - default_value=0, |
2104 | - message_type=None, enum_type=None, containing_type=None, |
2105 | - is_extension=False, extension_scope=None, |
2106 | - options=None), |
2107 | - ], |
2108 | - extensions=[ |
2109 | - ], |
2110 | - nested_types=[], # TODO(robinson): Implement. |
2111 | - enum_types=[ |
2112 | - _SHARES_DIRECTION, |
2113 | - _SHARES_ACCESSLEVEL, |
2114 | - ], |
2115 | - options=None) |
2116 | - |
2117 | - |
2118 | -_NOTIFYSHARE = descriptor.Descriptor( |
2119 | - name='NotifyShare', |
2120 | - full_name='ubuntuone.storageprotocol.NotifyShare', |
2121 | - filename='ubuntuone/storageprotocol/protocol.proto', |
2122 | - containing_type=None, |
2123 | - fields=[ |
2124 | - descriptor.FieldDescriptor( |
2125 | - name='share_id', full_name='ubuntuone.storageprotocol.NotifyShare.share_id', index=0, |
2126 | - number=1, type=9, cpp_type=9, label=1, |
2127 | - default_value=unicode("", "utf-8"), |
2128 | - message_type=None, enum_type=None, containing_type=None, |
2129 | - is_extension=False, extension_scope=None, |
2130 | - options=None), |
2131 | - descriptor.FieldDescriptor( |
2132 | - name='subtree', full_name='ubuntuone.storageprotocol.NotifyShare.subtree', index=1, |
2133 | - number=2, type=9, cpp_type=9, label=1, |
2134 | - default_value=unicode("", "utf-8"), |
2135 | - message_type=None, enum_type=None, containing_type=None, |
2136 | - is_extension=False, extension_scope=None, |
2137 | - options=None), |
2138 | - descriptor.FieldDescriptor( |
2139 | - name='share_name', full_name='ubuntuone.storageprotocol.NotifyShare.share_name', index=2, |
2140 | - number=3, type=9, cpp_type=9, label=1, |
2141 | - default_value=unicode("", "utf-8"), |
2142 | - message_type=None, enum_type=None, containing_type=None, |
2143 | - is_extension=False, extension_scope=None, |
2144 | - options=None), |
2145 | - descriptor.FieldDescriptor( |
2146 | - name='from_username', full_name='ubuntuone.storageprotocol.NotifyShare.from_username', index=3, |
2147 | - number=4, type=9, cpp_type=9, label=1, |
2148 | - default_value=unicode("", "utf-8"), |
2149 | - message_type=None, enum_type=None, containing_type=None, |
2150 | - is_extension=False, extension_scope=None, |
2151 | - options=None), |
2152 | - descriptor.FieldDescriptor( |
2153 | - name='from_visible_name', full_name='ubuntuone.storageprotocol.NotifyShare.from_visible_name', index=4, |
2154 | - number=5, type=9, cpp_type=9, label=1, |
2155 | - default_value=unicode("", "utf-8"), |
2156 | - message_type=None, enum_type=None, containing_type=None, |
2157 | - is_extension=False, extension_scope=None, |
2158 | - options=None), |
2159 | - descriptor.FieldDescriptor( |
2160 | - name='access_level', full_name='ubuntuone.storageprotocol.NotifyShare.access_level', index=5, |
2161 | - number=6, type=14, cpp_type=8, label=1, |
2162 | - default_value=0, |
2163 | - message_type=None, enum_type=None, containing_type=None, |
2164 | - is_extension=False, extension_scope=None, |
2165 | - options=None), |
2166 | - ], |
2167 | - extensions=[ |
2168 | - ], |
2169 | - nested_types=[], # TODO(robinson): Implement. |
2170 | - enum_types=[ |
2171 | - _NOTIFYSHARE_ACCESSLEVEL, |
2172 | - ], |
2173 | - options=None) |
2174 | - |
2175 | - |
2176 | -_SHAREACCEPTED = descriptor.Descriptor( |
2177 | - name='ShareAccepted', |
2178 | - full_name='ubuntuone.storageprotocol.ShareAccepted', |
2179 | - filename='ubuntuone/storageprotocol/protocol.proto', |
2180 | - containing_type=None, |
2181 | - fields=[ |
2182 | - descriptor.FieldDescriptor( |
2183 | - name='share_id', full_name='ubuntuone.storageprotocol.ShareAccepted.share_id', index=0, |
2184 | - number=1, type=9, cpp_type=9, label=1, |
2185 | - default_value=unicode("", "utf-8"), |
2186 | - message_type=None, enum_type=None, containing_type=None, |
2187 | - is_extension=False, extension_scope=None, |
2188 | - options=None), |
2189 | - descriptor.FieldDescriptor( |
2190 | - name='answer', full_name='ubuntuone.storageprotocol.ShareAccepted.answer', index=1, |
2191 | - number=2, type=14, cpp_type=8, label=1, |
2192 | - default_value=0, |
2193 | - message_type=None, enum_type=None, containing_type=None, |
2194 | - is_extension=False, extension_scope=None, |
2195 | - options=None), |
2196 | - ], |
2197 | - extensions=[ |
2198 | - ], |
2199 | - nested_types=[], # TODO(robinson): Implement. |
2200 | - enum_types=[ |
2201 | - _SHAREACCEPTED_ANSWER, |
2202 | - ], |
2203 | - options=None) |
2204 | - |
2205 | - |
2206 | -_SHAREDELETED = descriptor.Descriptor( |
2207 | - name='ShareDeleted', |
2208 | - full_name='ubuntuone.storageprotocol.ShareDeleted', |
2209 | - filename='ubuntuone/storageprotocol/protocol.proto', |
2210 | - containing_type=None, |
2211 | - fields=[ |
2212 | - descriptor.FieldDescriptor( |
2213 | - name='share_id', full_name='ubuntuone.storageprotocol.ShareDeleted.share_id', index=0, |
2214 | - number=1, type=9, cpp_type=9, label=1, |
2215 | - default_value=unicode("", "utf-8"), |
2216 | - message_type=None, enum_type=None, containing_type=None, |
2217 | - is_extension=False, extension_scope=None, |
2218 | - options=None), |
2219 | - ], |
2220 | - extensions=[ |
2221 | - ], |
2222 | - nested_types=[], # TODO(robinson): Implement. |
2223 | - enum_types=[ |
2224 | - ], |
2225 | - options=None) |
2226 | - |
2227 | - |
2228 | -_SHARECREATED = descriptor.Descriptor( |
2229 | - name='ShareCreated', |
2230 | - full_name='ubuntuone.storageprotocol.ShareCreated', |
2231 | - filename='ubuntuone/storageprotocol/protocol.proto', |
2232 | - containing_type=None, |
2233 | - fields=[ |
2234 | - descriptor.FieldDescriptor( |
2235 | - name='share_id', full_name='ubuntuone.storageprotocol.ShareCreated.share_id', index=0, |
2236 | - number=1, type=9, cpp_type=9, label=1, |
2237 | - default_value=unicode("", "utf-8"), |
2238 | - message_type=None, enum_type=None, containing_type=None, |
2239 | - is_extension=False, extension_scope=None, |
2240 | - options=None), |
2241 | - ], |
2242 | - extensions=[ |
2243 | - ], |
2244 | - nested_types=[], # TODO(robinson): Implement. |
2245 | - enum_types=[ |
2246 | - ], |
2247 | - options=None) |
2248 | - |
2249 | - |
2250 | -_DELETESHARE = descriptor.Descriptor( |
2251 | - name='DeleteShare', |
2252 | - full_name='ubuntuone.storageprotocol.DeleteShare', |
2253 | - filename='ubuntuone/storageprotocol/protocol.proto', |
2254 | - containing_type=None, |
2255 | - fields=[ |
2256 | - descriptor.FieldDescriptor( |
2257 | - name='share_id', full_name='ubuntuone.storageprotocol.DeleteShare.share_id', index=0, |
2258 | - number=1, type=9, cpp_type=9, label=1, |
2259 | - default_value=unicode("", "utf-8"), |
2260 | - message_type=None, enum_type=None, containing_type=None, |
2261 | - is_extension=False, extension_scope=None, |
2262 | - options=None), |
2263 | - ], |
2264 | - extensions=[ |
2265 | - ], |
2266 | - nested_types=[], # TODO(robinson): Implement. |
2267 | - enum_types=[ |
2268 | - ], |
2269 | - options=None) |
2270 | - |
2271 | - |
2272 | -_CREATEUDF = descriptor.Descriptor( |
2273 | - name='CreateUDF', |
2274 | - full_name='ubuntuone.storageprotocol.CreateUDF', |
2275 | - filename='ubuntuone/storageprotocol/protocol.proto', |
2276 | - containing_type=None, |
2277 | - fields=[ |
2278 | - descriptor.FieldDescriptor( |
2279 | - name='path', full_name='ubuntuone.storageprotocol.CreateUDF.path', index=0, |
2280 | - number=1, type=9, cpp_type=9, label=1, |
2281 | - default_value=unicode("", "utf-8"), |
2282 | - message_type=None, enum_type=None, containing_type=None, |
2283 | - is_extension=False, extension_scope=None, |
2284 | - options=None), |
2285 | - descriptor.FieldDescriptor( |
2286 | - name='name', full_name='ubuntuone.storageprotocol.CreateUDF.name', index=1, |
2287 | - number=2, type=9, cpp_type=9, label=1, |
2288 | - default_value=unicode("", "utf-8"), |
2289 | - message_type=None, enum_type=None, containing_type=None, |
2290 | - is_extension=False, extension_scope=None, |
2291 | - options=None), |
2292 | - ], |
2293 | - extensions=[ |
2294 | - ], |
2295 | - nested_types=[], # TODO(robinson): Implement. |
2296 | - enum_types=[ |
2297 | - ], |
2298 | - options=None) |
2299 | - |
2300 | - |
2301 | -_UDFS = descriptor.Descriptor( |
2302 | - name='UDFs', |
2303 | - full_name='ubuntuone.storageprotocol.UDFs', |
2304 | - filename='ubuntuone/storageprotocol/protocol.proto', |
2305 | - containing_type=None, |
2306 | - fields=[ |
2307 | - descriptor.FieldDescriptor( |
2308 | - name='volume', full_name='ubuntuone.storageprotocol.UDFs.volume', index=0, |
2309 | - number=1, type=12, cpp_type=9, label=1, |
2310 | - default_value="", |
2311 | - message_type=None, enum_type=None, containing_type=None, |
2312 | - is_extension=False, extension_scope=None, |
2313 | - options=None), |
2314 | - descriptor.FieldDescriptor( |
2315 | - name='node', full_name='ubuntuone.storageprotocol.UDFs.node', index=1, |
2316 | - number=2, type=12, cpp_type=9, label=1, |
2317 | - default_value="", |
2318 | - message_type=None, enum_type=None, containing_type=None, |
2319 | - is_extension=False, extension_scope=None, |
2320 | - options=None), |
2321 | - descriptor.FieldDescriptor( |
2322 | - name='suggested_path', full_name='ubuntuone.storageprotocol.UDFs.suggested_path', index=2, |
2323 | - number=3, type=9, cpp_type=9, label=1, |
2324 | - default_value=unicode("", "utf-8"), |
2325 | - message_type=None, enum_type=None, containing_type=None, |
2326 | - is_extension=False, extension_scope=None, |
2327 | - options=None), |
2328 | - ], |
2329 | - extensions=[ |
2330 | - ], |
2331 | - nested_types=[], # TODO(robinson): Implement. |
2332 | - enum_types=[ |
2333 | - ], |
2334 | - options=None) |
2335 | - |
2336 | - |
2337 | -_VOLUMEDELETED = descriptor.Descriptor( |
2338 | - name='VolumeDeleted', |
2339 | - full_name='ubuntuone.storageprotocol.VolumeDeleted', |
2340 | - filename='ubuntuone/storageprotocol/protocol.proto', |
2341 | - containing_type=None, |
2342 | - fields=[ |
2343 | - descriptor.FieldDescriptor( |
2344 | - name='volume', full_name='ubuntuone.storageprotocol.VolumeDeleted.volume', index=0, |
2345 | - number=1, type=12, cpp_type=9, label=1, |
2346 | - default_value="", |
2347 | - message_type=None, enum_type=None, containing_type=None, |
2348 | - is_extension=False, extension_scope=None, |
2349 | - options=None), |
2350 | - ], |
2351 | - extensions=[ |
2352 | - ], |
2353 | - nested_types=[], # TODO(robinson): Implement. |
2354 | - enum_types=[ |
2355 | - ], |
2356 | - options=None) |
2357 | - |
2358 | - |
2359 | -_DELETEVOLUME = descriptor.Descriptor( |
2360 | - name='DeleteVolume', |
2361 | - full_name='ubuntuone.storageprotocol.DeleteVolume', |
2362 | - filename='ubuntuone/storageprotocol/protocol.proto', |
2363 | - containing_type=None, |
2364 | - fields=[ |
2365 | - descriptor.FieldDescriptor( |
2366 | - name='volume', full_name='ubuntuone.storageprotocol.DeleteVolume.volume', index=0, |
2367 | - number=1, type=12, cpp_type=9, label=1, |
2368 | - default_value="", |
2369 | - message_type=None, enum_type=None, containing_type=None, |
2370 | - is_extension=False, extension_scope=None, |
2371 | - options=None), |
2372 | - ], |
2373 | - extensions=[ |
2374 | - ], |
2375 | - nested_types=[], # TODO(robinson): Implement. |
2376 | - enum_types=[ |
2377 | - ], |
2378 | - options=None) |
2379 | - |
2380 | - |
2381 | -_VOLUMES = descriptor.Descriptor( |
2382 | - name='Volumes', |
2383 | - full_name='ubuntuone.storageprotocol.Volumes', |
2384 | - filename='ubuntuone/storageprotocol/protocol.proto', |
2385 | - containing_type=None, |
2386 | - fields=[ |
2387 | - descriptor.FieldDescriptor( |
2388 | - name='type', full_name='ubuntuone.storageprotocol.Volumes.type', index=0, |
2389 | - number=1, type=14, cpp_type=8, label=1, |
2390 | - default_value=1, |
2391 | - message_type=None, enum_type=None, containing_type=None, |
2392 | - is_extension=False, extension_scope=None, |
2393 | - options=None), |
2394 | - descriptor.FieldDescriptor( |
2395 | - name='root', full_name='ubuntuone.storageprotocol.Volumes.root', index=1, |
2396 | - number=3, type=11, cpp_type=10, label=1, |
2397 | - default_value=None, |
2398 | - message_type=None, enum_type=None, containing_type=None, |
2399 | - is_extension=False, extension_scope=None, |
2400 | - options=None), |
2401 | - descriptor.FieldDescriptor( |
2402 | - name='udf', full_name='ubuntuone.storageprotocol.Volumes.udf', index=2, |
2403 | - number=4, type=11, cpp_type=10, label=1, |
2404 | - default_value=None, |
2405 | - message_type=None, enum_type=None, containing_type=None, |
2406 | - is_extension=False, extension_scope=None, |
2407 | - options=None), |
2408 | - descriptor.FieldDescriptor( |
2409 | - name='share', full_name='ubuntuone.storageprotocol.Volumes.share', index=3, |
2410 | - number=5, type=11, cpp_type=10, label=1, |
2411 | - default_value=None, |
2412 | - message_type=None, enum_type=None, containing_type=None, |
2413 | - is_extension=False, extension_scope=None, |
2414 | - options=None), |
2415 | - ], |
2416 | - extensions=[ |
2417 | - ], |
2418 | - nested_types=[], # TODO(robinson): Implement. |
2419 | - enum_types=[ |
2420 | - _VOLUMES_VOLUMETYPE, |
2421 | - ], |
2422 | - options=None) |
2423 | - |
2424 | - |
2425 | -_QUERYCAPS = descriptor.Descriptor( |
2426 | - name='QueryCaps', |
2427 | - full_name='ubuntuone.storageprotocol.QueryCaps', |
2428 | - filename='ubuntuone/storageprotocol/protocol.proto', |
2429 | - containing_type=None, |
2430 | - fields=[ |
2431 | - descriptor.FieldDescriptor( |
2432 | - name='capability', full_name='ubuntuone.storageprotocol.QueryCaps.capability', index=0, |
2433 | - number=1, type=9, cpp_type=9, label=1, |
2434 | - default_value=unicode("", "utf-8"), |
2435 | - message_type=None, enum_type=None, containing_type=None, |
2436 | - is_extension=False, extension_scope=None, |
2437 | - options=None), |
2438 | - ], |
2439 | - extensions=[ |
2440 | - ], |
2441 | - nested_types=[], # TODO(robinson): Implement. |
2442 | - enum_types=[ |
2443 | - ], |
2444 | - options=None) |
2445 | - |
2446 | - |
2447 | -_SETCAPS = descriptor.Descriptor( |
2448 | - name='SetCaps', |
2449 | - full_name='ubuntuone.storageprotocol.SetCaps', |
2450 | - filename='ubuntuone/storageprotocol/protocol.proto', |
2451 | - containing_type=None, |
2452 | - fields=[ |
2453 | - descriptor.FieldDescriptor( |
2454 | - name='capability', full_name='ubuntuone.storageprotocol.SetCaps.capability', index=0, |
2455 | - number=1, type=9, cpp_type=9, label=1, |
2456 | - default_value=unicode("", "utf-8"), |
2457 | - message_type=None, enum_type=None, containing_type=None, |
2458 | - is_extension=False, extension_scope=None, |
2459 | - options=None), |
2460 | - ], |
2461 | - extensions=[ |
2462 | - ], |
2463 | - nested_types=[], # TODO(robinson): Implement. |
2464 | - enum_types=[ |
2465 | - ], |
2466 | - options=None) |
2467 | - |
2468 | - |
2469 | -_ACCEPTCAPS = descriptor.Descriptor( |
2470 | - name='AcceptCaps', |
2471 | - full_name='ubuntuone.storageprotocol.AcceptCaps', |
2472 | - filename='ubuntuone/storageprotocol/protocol.proto', |
2473 | - containing_type=None, |
2474 | - fields=[ |
2475 | - descriptor.FieldDescriptor( |
2476 | - name='accepted', full_name='ubuntuone.storageprotocol.AcceptCaps.accepted', index=0, |
2477 | - number=1, type=8, cpp_type=7, label=1, |
2478 | - default_value=False, |
2479 | - message_type=None, enum_type=None, containing_type=None, |
2480 | - is_extension=False, extension_scope=None, |
2481 | - options=None), |
2482 | - descriptor.FieldDescriptor( |
2483 | - name='redirect_hostname', full_name='ubuntuone.storageprotocol.AcceptCaps.redirect_hostname', index=1, |
2484 | - number=2, type=9, cpp_type=9, label=1, |
2485 | - default_value=unicode("", "utf-8"), |
2486 | - message_type=None, enum_type=None, containing_type=None, |
2487 | - is_extension=False, extension_scope=None, |
2488 | - options=None), |
2489 | - descriptor.FieldDescriptor( |
2490 | - name='redirect_port', full_name='ubuntuone.storageprotocol.AcceptCaps.redirect_port', index=2, |
2491 | - number=3, type=9, cpp_type=9, label=1, |
2492 | - default_value=unicode("", "utf-8"), |
2493 | - message_type=None, enum_type=None, containing_type=None, |
2494 | - is_extension=False, extension_scope=None, |
2495 | - options=None), |
2496 | - descriptor.FieldDescriptor( |
2497 | - name='redirect_srvrecord', full_name='ubuntuone.storageprotocol.AcceptCaps.redirect_srvrecord', index=3, |
2498 | - number=4, type=9, cpp_type=9, label=1, |
2499 | - default_value=unicode("", "utf-8"), |
2500 | - message_type=None, enum_type=None, containing_type=None, |
2501 | - is_extension=False, extension_scope=None, |
2502 | - options=None), |
2503 | - ], |
2504 | - extensions=[ |
2505 | - ], |
2506 | - nested_types=[], # TODO(robinson): Implement. |
2507 | - enum_types=[ |
2508 | - ], |
2509 | - options=None) |
2510 | - |
2511 | - |
2512 | -_FREESPACEINFO = descriptor.Descriptor( |
2513 | - name='FreeSpaceInfo', |
2514 | - full_name='ubuntuone.storageprotocol.FreeSpaceInfo', |
2515 | - filename='ubuntuone/storageprotocol/protocol.proto', |
2516 | - containing_type=None, |
2517 | - fields=[ |
2518 | - descriptor.FieldDescriptor( |
2519 | - name='share_id', full_name='ubuntuone.storageprotocol.FreeSpaceInfo.share_id', index=0, |
2520 | - number=1, type=9, cpp_type=9, label=1, |
2521 | - default_value=unicode("", "utf-8"), |
2522 | - message_type=None, enum_type=None, containing_type=None, |
2523 | - is_extension=False, extension_scope=None, |
2524 | - options=None), |
2525 | - descriptor.FieldDescriptor( |
2526 | - name='free_bytes', full_name='ubuntuone.storageprotocol.FreeSpaceInfo.free_bytes', index=1, |
2527 | - number=2, type=4, cpp_type=4, label=1, |
2528 | - default_value=0, |
2529 | - message_type=None, enum_type=None, containing_type=None, |
2530 | - is_extension=False, extension_scope=None, |
2531 | - options=None), |
2532 | - ], |
2533 | - extensions=[ |
2534 | - ], |
2535 | - nested_types=[], # TODO(robinson): Implement. |
2536 | - enum_types=[ |
2537 | - ], |
2538 | - options=None) |
2539 | - |
2540 | - |
2541 | -_FREESPACEINQUIRY = descriptor.Descriptor( |
2542 | - name='FreeSpaceInquiry', |
2543 | - full_name='ubuntuone.storageprotocol.FreeSpaceInquiry', |
2544 | - filename='ubuntuone/storageprotocol/protocol.proto', |
2545 | - containing_type=None, |
2546 | - fields=[ |
2547 | - descriptor.FieldDescriptor( |
2548 | - name='share_id', full_name='ubuntuone.storageprotocol.FreeSpaceInquiry.share_id', index=0, |
2549 | - number=1, type=9, cpp_type=9, label=1, |
2550 | - default_value=unicode("", "utf-8"), |
2551 | - message_type=None, enum_type=None, containing_type=None, |
2552 | - is_extension=False, extension_scope=None, |
2553 | - options=None), |
2554 | - ], |
2555 | - extensions=[ |
2556 | - ], |
2557 | - nested_types=[], # TODO(robinson): Implement. |
2558 | - enum_types=[ |
2559 | - ], |
2560 | - options=None) |
2561 | - |
2562 | - |
2563 | -_ACCOUNTINFO = descriptor.Descriptor( |
2564 | - name='AccountInfo', |
2565 | - full_name='ubuntuone.storageprotocol.AccountInfo', |
2566 | - filename='ubuntuone/storageprotocol/protocol.proto', |
2567 | - containing_type=None, |
2568 | - fields=[ |
2569 | - descriptor.FieldDescriptor( |
2570 | - name='purchased_bytes', full_name='ubuntuone.storageprotocol.AccountInfo.purchased_bytes', index=0, |
2571 | - number=1, type=4, cpp_type=4, label=1, |
2572 | - default_value=0, |
2573 | - message_type=None, enum_type=None, containing_type=None, |
2574 | - is_extension=False, extension_scope=None, |
2575 | - options=None), |
2576 | - ], |
2577 | - extensions=[ |
2578 | - ], |
2579 | - nested_types=[], # TODO(robinson): Implement. |
2580 | - enum_types=[ |
2581 | - ], |
2582 | - options=None) |
2583 | - |
2584 | - |
2585 | -_MESSAGE.fields_by_name['type'].enum_type = _MESSAGE_MESSAGETYPE |
2586 | -_MESSAGE.fields_by_name['error'].message_type = _ERROR |
2587 | -_MESSAGE.fields_by_name['protocol'].message_type = _PROTOCOL |
2588 | -_MESSAGE.fields_by_name['auth_parameters'].message_type = _AUTHPARAMETER |
2589 | -_MESSAGE.fields_by_name['root'].message_type = _ROOT |
2590 | -_MESSAGE.fields_by_name['query'].message_type = _QUERY |
2591 | -_MESSAGE.fields_by_name['node_state'].message_type = _NODESTATE |
2592 | -_MESSAGE.fields_by_name['make'].message_type = _MAKE |
2593 | -_MESSAGE.fields_by_name['new'].message_type = _NEW |
2594 | -_MESSAGE.fields_by_name['move'].message_type = _MOVE |
2595 | -_MESSAGE.fields_by_name['get_content'].message_type = _GETCONTENT |
2596 | -_MESSAGE.fields_by_name['put_content'].message_type = _PUTCONTENT |
2597 | -_MESSAGE.fields_by_name['upload_in_progress'].message_type = _UPLOADINPROGRESS |
2598 | -_MESSAGE.fields_by_name['bytes'].message_type = _BYTES |
2599 | -_MESSAGE.fields_by_name['unlink'].message_type = _UNLINK |
2600 | -_MESSAGE.fields_by_name['cancel_request'].message_type = _CANCELREQUEST |
2601 | -_MESSAGE.fields_by_name['node_attr'].message_type = _NODEATTR |
2602 | -_MESSAGE.fields_by_name['create_share'].message_type = _CREATESHARE |
2603 | -_MESSAGE.fields_by_name['shares'].message_type = _SHARES |
2604 | -_MESSAGE.fields_by_name['notify_share'].message_type = _NOTIFYSHARE |
2605 | -_MESSAGE.fields_by_name['share_accepted'].message_type = _SHAREACCEPTED |
2606 | -_MESSAGE.fields_by_name['share_deleted'].message_type = _SHAREDELETED |
2607 | -_MESSAGE.fields_by_name['share_created'].message_type = _SHARECREATED |
2608 | -_MESSAGE.fields_by_name['delete_share'].message_type = _DELETESHARE |
2609 | -_MESSAGE.fields_by_name['create_udf'].message_type = _CREATEUDF |
2610 | -_MESSAGE.fields_by_name['list_volumes'].message_type = _VOLUMES |
2611 | -_MESSAGE.fields_by_name['volume_deleted'].message_type = _VOLUMEDELETED |
2612 | -_MESSAGE.fields_by_name['volume_created'].message_type = _VOLUMES |
2613 | -_MESSAGE.fields_by_name['delete_volume'].message_type = _DELETEVOLUME |
2614 | -_MESSAGE.fields_by_name['query_caps'].message_type = _QUERYCAPS |
2615 | -_MESSAGE.fields_by_name['set_caps'].message_type = _SETCAPS |
2616 | -_MESSAGE.fields_by_name['accept_caps'].message_type = _ACCEPTCAPS |
2617 | -_MESSAGE.fields_by_name['free_space_info'].message_type = _FREESPACEINFO |
2618 | -_MESSAGE.fields_by_name['free_space_inquiry'].message_type = _FREESPACEINQUIRY |
2619 | -_MESSAGE.fields_by_name['account_info'].message_type = _ACCOUNTINFO |
2620 | -_MESSAGE.fields_by_name['begin_content'].message_type = _BEGINCONTENT |
2621 | -_ERROR.fields_by_name['type'].enum_type = _ERROR_ERRORTYPE |
2622 | -_CREATESHARE.fields_by_name['access_level'].enum_type = _CREATESHARE_ACCESSLEVEL |
2623 | -_SHARES.fields_by_name['direction'].enum_type = _SHARES_DIRECTION |
2624 | -_SHARES.fields_by_name['access_level'].enum_type = _SHARES_ACCESSLEVEL |
2625 | -_NOTIFYSHARE.fields_by_name['access_level'].enum_type = _NOTIFYSHARE_ACCESSLEVEL |
2626 | -_SHAREACCEPTED.fields_by_name['answer'].enum_type = _SHAREACCEPTED_ANSWER |
2627 | -_VOLUMES.fields_by_name['type'].enum_type = _VOLUMES_VOLUMETYPE |
2628 | -_VOLUMES.fields_by_name['root'].message_type = _ROOT |
2629 | -_VOLUMES.fields_by_name['udf'].message_type = _UDFS |
2630 | -_VOLUMES.fields_by_name['share'].message_type = _SHARES |
2631 | - |
2632 | -class Message(message.Message): |
2633 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2634 | - DESCRIPTOR = _MESSAGE |
2635 | - |
2636 | -class Error(message.Message): |
2637 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2638 | - DESCRIPTOR = _ERROR |
2639 | - |
2640 | -class Protocol(message.Message): |
2641 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2642 | - DESCRIPTOR = _PROTOCOL |
2643 | - |
2644 | -class AuthParameter(message.Message): |
2645 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2646 | - DESCRIPTOR = _AUTHPARAMETER |
2647 | - |
2648 | -class Make(message.Message): |
2649 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2650 | - DESCRIPTOR = _MAKE |
2651 | - |
2652 | -class New(message.Message): |
2653 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2654 | - DESCRIPTOR = _NEW |
2655 | - |
2656 | -class Root(message.Message): |
2657 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2658 | - DESCRIPTOR = _ROOT |
2659 | - |
2660 | -class Query(message.Message): |
2661 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2662 | - DESCRIPTOR = _QUERY |
2663 | - |
2664 | -class NodeState(message.Message): |
2665 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2666 | - DESCRIPTOR = _NODESTATE |
2667 | - |
2668 | -class GetContent(message.Message): |
2669 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2670 | - DESCRIPTOR = _GETCONTENT |
2671 | - |
2672 | -class CancelRequest(message.Message): |
2673 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2674 | - DESCRIPTOR = _CANCELREQUEST |
2675 | - |
2676 | -class NodeAttr(message.Message): |
2677 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2678 | - DESCRIPTOR = _NODEATTR |
2679 | - |
2680 | -class Bytes(message.Message): |
2681 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2682 | - DESCRIPTOR = _BYTES |
2683 | - |
2684 | -class PutContent(message.Message): |
2685 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2686 | - DESCRIPTOR = _PUTCONTENT |
2687 | - |
2688 | -class BeginContent(message.Message): |
2689 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2690 | - DESCRIPTOR = _BEGINCONTENT |
2691 | - |
2692 | -class UploadInProgress(message.Message): |
2693 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2694 | - DESCRIPTOR = _UPLOADINPROGRESS |
2695 | - |
2696 | -class Move(message.Message): |
2697 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2698 | - DESCRIPTOR = _MOVE |
2699 | - |
2700 | -class Unlink(message.Message): |
2701 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2702 | - DESCRIPTOR = _UNLINK |
2703 | - |
2704 | -class CreateShare(message.Message): |
2705 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2706 | - DESCRIPTOR = _CREATESHARE |
2707 | - |
2708 | -class Shares(message.Message): |
2709 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2710 | - DESCRIPTOR = _SHARES |
2711 | - |
2712 | -class NotifyShare(message.Message): |
2713 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2714 | - DESCRIPTOR = _NOTIFYSHARE |
2715 | - |
2716 | -class ShareAccepted(message.Message): |
2717 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2718 | - DESCRIPTOR = _SHAREACCEPTED |
2719 | - |
2720 | -class ShareDeleted(message.Message): |
2721 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2722 | - DESCRIPTOR = _SHAREDELETED |
2723 | - |
2724 | -class ShareCreated(message.Message): |
2725 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2726 | - DESCRIPTOR = _SHARECREATED |
2727 | - |
2728 | -class DeleteShare(message.Message): |
2729 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2730 | - DESCRIPTOR = _DELETESHARE |
2731 | - |
2732 | -class CreateUDF(message.Message): |
2733 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2734 | - DESCRIPTOR = _CREATEUDF |
2735 | - |
2736 | -class UDFs(message.Message): |
2737 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2738 | - DESCRIPTOR = _UDFS |
2739 | - |
2740 | -class VolumeDeleted(message.Message): |
2741 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2742 | - DESCRIPTOR = _VOLUMEDELETED |
2743 | - |
2744 | -class DeleteVolume(message.Message): |
2745 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2746 | - DESCRIPTOR = _DELETEVOLUME |
2747 | - |
2748 | -class Volumes(message.Message): |
2749 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2750 | - DESCRIPTOR = _VOLUMES |
2751 | - |
2752 | -class QueryCaps(message.Message): |
2753 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2754 | - DESCRIPTOR = _QUERYCAPS |
2755 | - |
2756 | -class SetCaps(message.Message): |
2757 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2758 | - DESCRIPTOR = _SETCAPS |
2759 | - |
2760 | -class AcceptCaps(message.Message): |
2761 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2762 | - DESCRIPTOR = _ACCEPTCAPS |
2763 | - |
2764 | -class FreeSpaceInfo(message.Message): |
2765 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2766 | - DESCRIPTOR = _FREESPACEINFO |
2767 | - |
2768 | -class FreeSpaceInquiry(message.Message): |
2769 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2770 | - DESCRIPTOR = _FREESPACEINQUIRY |
2771 | - |
2772 | -class AccountInfo(message.Message): |
2773 | - __metaclass__ = reflection.GeneratedProtocolMessageType |
2774 | - DESCRIPTOR = _ACCOUNTINFO |
2775 | - |