Commit Graph

350 Commits

Author SHA1 Message Date
Itamar Turner-Trauring
d8c9affccb Bunch more places that need to be bytes for protocol backwards compatibility. 2020-09-25 13:28:49 -04:00
Itamar Turner-Trauring
d5ba10544e Keep interfaces more backwards compatible. 2020-08-25 12:08:59 -04:00
Itamar Turner-Trauring
6726c6ec5b Merge remote-tracking branch 'origin/master' into 3374.codec-monitor-python-3-take-2 2020-08-25 11:48:31 -04:00
Itamar Turner-Trauring
41ad4aea91 Make imports work. 2020-08-18 13:10:57 -04:00
Itamar Turner-Trauring
24772616c2 Bytes not strings. 2020-08-07 14:13:20 -04:00
Itamar Turner-Trauring
0a2b797c49 Lint fix. 2020-08-07 13:32:12 -04:00
Itamar Turner-Trauring
7516a5526e Port to Python 3. 2020-08-07 12:57:46 -04:00
Jean-Paul Calderone
d4b5de2e08
Merge pull request #653 from tahoe-lafs/3248.pass-config-to-get_storage_client
Pass the full _Config to IFoolscapStoragePlugin.get_storage_client

Fixes: ticket:3248
2019-08-23 09:04:23 -04:00
Jean-Paul Calderone
25c476aaa8
Merge pull request #654 from tahoe-lafs/3250.synchronous-get_storage_client
Synchronous IFoolscapStoragePlugin.get_storage_client

Fixes: ticket:3250
2019-08-23 08:44:52 -04:00
Jean-Paul Calderone
e62d2a5a27 In reality we cannot handle a Deferred here
... yet?  This code is invoked from an `__init__` where async is always
tricky.  Maybe we can invert the relationship someday.
2019-08-20 09:28:05 -04:00
Jean-Paul Calderone
64197f4ba4 Change the interface 2019-08-19 15:09:34 -04:00
Jean-Paul Calderone
a47463e032 Pass _Config instead of a smaller dict to get_client_resource 2019-08-19 11:21:03 -04:00
Jean-Paul Calderone
d69de15664 implement the feature
improve the test slightly, too, to verify the configuration supplied to the
plugin is as expected.
2019-08-03 06:39:31 -04:00
Jean-Paul Calderone
57160f65c6 Pass get_rref in to get_storage_client
plugins don't otherwise have a way to talk to the server.
2019-08-03 06:39:31 -04:00
Jean-Paul Calderone
2c49c97fcd more unicode literals 2019-08-03 05:33:01 -04:00
Jean-Paul Calderone
8a22764fb1 Combine human_name and id 2019-08-03 05:33:01 -04:00
Jean-Paul Calderone
e10a032fc3 Add the basic plugin interfaces and some documentation 2019-08-03 05:33:01 -04:00
Jean-Paul Calderone
9f9f45e331 warn away potential users 2019-06-04 10:13:07 -04:00
Jean-Paul Calderone
97a4353c80 Update IServer with this new IStorageServer 2019-05-31 11:25:11 -04:00
meejah
05f48c3601 Various cleanups, fixes and improvements
Squashed all commits that were meejah's between
30d68fb499f300a393fa0ced5980229f4bb6efda
and
33c268ed3a8c63a809f4403e307ecc13d848b1ab
On the branch meejah:1382.markberger-rewrite-rebase.6 as
per review
2017-06-05 16:31:41 -06:00
David Stainton
e68b331bb1 Add servers of happiness hypothesis testing
Fix happiness test var names

Remove unused imports

Get rid of trailing whitespace
2017-06-05 16:26:46 -06:00
Mark Berger
17cff7a176 Implements 'Servers of Happiness' algorithm for upload
This is Mark Berger's original commits, from ticket #1382
2017-06-05 16:26:46 -06:00
Brian Warner
5cbe580d90 improve ConnectionStatus and welcome-page display
* replace "last_details" with "non_connected_statuses" dict
* rename "last_connection_summary" to just "summary"
* for connected servers, show other hints in a tooltip
* for not-yet-connected servers, show all hints in a list
* build the list (in STAN) on the server side, not using IContainer
2016-12-09 18:41:38 -08:00
Brian Warner
70db0db5bd interface.py: cosmetic, rewrite docstrings as attributes 2016-12-09 18:41:38 -08:00
Brian Warner
48fc14bd30 add IConnectionStatus and implementation
also a function to build one from a foolscap.Reconnector
2016-12-08 15:41:37 -08:00
Brian Warner
d1d988410b remove "key-generator" node type and client support
closes ticket:2783
2016-05-04 16:53:04 -07:00
Brian Warner
76f6d2d21a create Tub inside NativeStorageServer, not broker
This makes IServer instances responsible for their own network
connections, which will help when we add HTTP-based servers in the
future. The StorageFarmBroker should not care about how the IServer uses
the network, it just provides the announcement (and local config).
2016-05-03 15:09:13 -07:00
meejah
db517e8edd Progress API
- IProgress interface + PercentProgress implementation
 - progress= args to many upload/download APIs
 - ultimately for magic-folder
2016-04-12 00:30:50 -07:00
Leif Ryge
5b33f1fdf3 wui: improved columns in welcome page server list
As discussed at https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1973 and in
previous pull request #129.

 - replace lengthy timestamps with human-readable deltas (eg 1h 2m 3s)
 - replace "announced" column with "Last RX" column
 - remove service column (it always said the same thing, "storage")
 - fix colspan on 'You are not presently connected' message

Previous versions, some with github comments: 3fe9053134 , 486dbfc7bd , and c89ea62580, 9fabb92486, bbd8b42a25

Unlike previous attempts, the tests on this one should pass in any timezone.
(But like current master, will fail with Nevow >=0.12...)

Thanks to an anonymous contributor who wrote some of the tests.
2016-01-23 14:28:09 +00:00
Leif Ryge
c86388b79c revert previous commit to fix attribution (vanity)
This reverts the previous commit (modulo the one line that daira added) so that
my contributions will be properly attributed by git blame etc.
2016-01-23 14:27:11 +00:00
Daira Hopwood
a2d724aab7 wui: improved columns in welcome page server list
As discussed at https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1973 and in
previous pull request #129.

 - replace lengthy timestamps with human-readable deltas (eg 1h 2m 3s)
 - replace "announced" column with "Last RX" column
 - remove service column (it always said the same thing, "storage")
 - fix colspan on 'You are not presently connected' message

Previous versions, some with github comments: 3fe9053134 , 486dbfc7bd , and c89ea62580, 9fabb92486, bbd8b42a25

Unlike previous attempts, the tests on this one should pass in any timezone.
(But like current master, will fail with Nevow >=0.12...)

Thanks to an anonymous contributor who wrote some of the tests.
2016-01-15 20:02:19 +00:00
Brian Warner
6252a72965 IReadable.read(): document out-of-range errors
closes ticket#2461
2015-07-28 13:01:15 -07:00
Daira Hopwood
f973657a6a interfaces.py: fix arguments to create_subdirectory.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-05-13 14:21:28 +01:00
Brian Warner
f0e783e20e fix check-memory test, with new new (safe) control-port methods 2015-04-21 13:05:58 -07:00
Brian Warner
edcdaa2799 finish removing control-port upload/download functions 2015-04-21 11:26:16 -07:00
Daira Hopwood
0ef5939477 Remove 'needs-rebalancing' and add 'count-happiness' to checker reports; repair tests. fixes #1784, #2105
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-03-20 16:13:57 +00:00
david-sarah
ca620a6ce1 Cosmetic changes to match cloud backend branch. 2012-07-24 03:40:49 +00:00
david-sarah
5105448421 interfaces.py: corrections to take into account that lease cancel secrets are no longer honoured. 2012-07-24 03:40:06 +00:00
david-sarah
e8240b0923 interfaces.py: corrections to interfaces to make more of them checkable. 2012-07-24 03:39:24 +00:00
david-sarah
5c92c71fd5 interfaces.py: which -> that. 2012-07-24 03:37:07 +00:00
david-sarah
12e30c6e92 Default arguments in interface declarations should only be used to specify a default, not to specify the type, in order to be checkable. 2012-07-24 03:34:46 +00:00
david-sarah
dcfb27f9bf Remove spurious 'self' arguments that should not be included in interface declarations. 2012-07-24 03:32:56 +00:00
david-sarah
fd09b84bb6 interfaces.py: whitespace 2012-07-24 03:29:14 +00:00
david-sarah
1b07d30761 After a server disconnects, make the IServer retain the dead RemoteReference, and continue to return it to anyone who calls get_rref(). This removes the need for callers to guard against receiving a None (as long as the server was connected at least once, which is always the case for servers returned by get_servers_for_psi(), which is how all upload/download code gets servers). Includes test. fixes #1636 2012-06-15 01:48:55 +00:00
david-sarah
daa24bce8b Clarify documentation of RIStorageServer.slot_testv_and_readv_and_writev. fixes #1744 2012-06-13 16:51:35 +00:00
Brian Warner
188c7fecf5 CheckResults corrupt/incompatible shares now return IServers
DeepResultsBase also has a get_corrupt_shares(), and it is populated
from CheckResults.get_corrupt_shares(). It has been updated too, along
with get_remaining_corrupt_shares().

Remove temporary get_new_corrupt_shares() and
get_new_incompatible_shares().
2012-06-02 11:39:12 -07:00
Brian Warner
da9ac55294 CheckResults.get_servers_responding() now returns IServers
Remove temporary get_new_servers_responding().
2012-06-02 11:39:12 -07:00
Brian Warner
957a5315aa CheckResults.get_sharemap() now returns IServers
Remove temporary get_new_sharemap().
2012-06-02 11:39:11 -07:00
Brian Warner
1883d393c6 CheckResults: replace get_data() with a bunch of individual getters 2012-06-02 11:39:10 -07:00
Brian Warner
3a1c02cfdf change UploadResults to return IServers, update users to match
This finally changes all callers of get_servermap()/get_sharemap() to
accept IServers, and changes UploadResults to provide them.
2012-05-21 21:18:37 -07:00