Commit Graph

343 Commits

Author SHA1 Message Date
Jean-Paul Calderone
a55719cdc4 Raise UnknownConfigError when a server is configured with an unknown storage plugin 2019-10-16 19:56:29 -04:00
Jean-Paul Calderone
8c1f536ba4 Merge remote-tracking branch 'origin/master' into integration/storage-economics 2019-10-04 12:02:00 -04:00
meejah
9050fdcea6 explicitly save refs to webish and operations (instead of using Service methods) 2019-08-24 12:31:08 -06:00
Jean-Paul Calderone
9940beaae1 Thread a _Config all the way down 2019-08-19 16:09:26 -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
21d735ece9 whitespace more conforming to PEP8 2019-08-03 06:39:31 -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
9842447a07 Don't start or announce anonymous access if config says not to 2019-08-03 06:39:31 -04:00
Jean-Paul Calderone
853cf62530 Allow [storage]anonymous through the validator
And provide a helpful accessor for reading it
2019-08-03 06:39:31 -04:00
Jean-Paul Calderone
311afa8a75 Test & fix supplying plugin configuration 2019-08-03 06:39:31 -04:00
Jean-Paul Calderone
b5a2c70a4a create a StorageClientConfig object
Make it easier to pass more storage configuration down into StorageFarmBroker
and beyond
2019-08-03 06:39:31 -04:00
Jean-Paul Calderone
6b7e0dd700 add a test for the negative case 2019-08-03 06:39:31 -04:00
Jean-Paul Calderone
895cf37a84 docstrings 2019-08-03 06:19:01 -04:00
Jean-Paul Calderone
53861e2a0f Change the shape of the storage announcement(s)
Instead of generating a sequence of announcements like:

    - anonymous storage server announcement
    - plugin 1 storage server announcement
    - ...
    - plugin N storage server announcement

The client now generates a single announcement like:

    - anonymous storage server details
    - storage-options
      - plugin 1 storage server details
      - ...
      - plugin N storage server details
2019-08-03 06:19:01 -04:00
Jean-Paul Calderone
9c240b61ac Persist the furl ourselves rather than relying on Foolscap
Going via our config abstraction here will let us change how config is
persisted more easily, later.
2019-08-03 06:19:01 -04:00
Jean-Paul Calderone
6068b6c1b2 don't reach through the tahoe-lafs config object 2019-08-03 06:19:01 -04:00
Jean-Paul Calderone
d2e16df5cc link to a ticket about implementing better missing-plugin behavior 2019-08-03 06:19:01 -04:00
Jean-Paul Calderone
251eda0b80 rename introducer_factory parameter to be private 2019-08-03 06:19:01 -04:00
Jean-Paul Calderone
58db131787 remove unused imports 2019-08-03 06:19:01 -04:00
Jean-Paul Calderone
fd9ae24149 fix indentation 2019-08-03 06:19:01 -04:00
Jean-Paul Calderone
756c21c251 actually provide validating client-config-from-string function 2019-08-03 06:19:01 -04:00
Jean-Paul Calderone
6cf48f7d4f Separate async initialization from _Client.__init__ 2019-08-03 06:19:01 -04:00
Jean-Paul Calderone
a6959d111c Log init_storage and its result (particularly failures) 2019-08-03 06:19:01 -04:00
Jean-Paul Calderone
7919cf205e Test the actual interface
get_storage_server is supposed to return a Deferred
2019-08-03 06:19:01 -04:00
Jean-Paul Calderone
a45e2bebfe Allow the new plugins item in the [storage] section 2019-08-03 06:19:01 -04:00
Jean-Paul Calderone
f606beb065 Test and support plugins without any configuration 2019-08-03 06:19:01 -04:00
Jean-Paul Calderone
e2982c0129 Support multiple plugins 2019-08-03 06:19:01 -04:00
Jean-Paul Calderone
646cd452b9 Add tests for announcements for plugins
And a basic implementation
2019-08-03 06:19:01 -04:00
Jean-Paul Calderone
212f96dfe7 Baseline tests for anonymous storage server announcements 2019-08-03 05:34:21 -04:00
Jean-Paul Calderone
fb4c5cf91f Allow for dynamic configuration validation rules 2019-08-03 05:34:21 -04:00
meejah
5644f421fe get rid of ed25519.bytes_from_* methods 2019-07-08 12:46:22 -06:00
meejah
47633fb01e unused import 2019-06-26 14:55:35 -06:00
meejah
dd55accec8 Merge branch 'master' into 3031-replace-pycryptopp 2019-06-26 14:42:43 -06:00
meejah
47ccdb0177 refactor ed25519 helpers to functional style
eliminates the wrapper classes and uses some more-explicit
names throughout (e.g "sk" -> "signing_key")
2019-06-13 22:19:28 -06:00
meejah
df4671f90e refactor away from pycryptopp "helper" classes 2019-06-13 22:19:28 -06:00
heartsucker
8063d93c6d replaced pytcryptopp rsa with our own wrapper 2019-06-13 22:19:28 -06:00
heartsucker
9e31bfe2f4 update code/test to use new ed25512 module 2019-06-13 22:19:28 -06:00
heartsucker
3a5a0fb572 replaced uses of pycryptopp's ed25519 with our own 2019-06-13 22:18:55 -06:00
Jean-Paul Calderone
b604d08463 Add a test for the success case 2019-06-12 16:47:25 -04:00
tpltnt
c8f11dc2d3 ported old-style classes to new-style 2019-05-26 08:28:18 +02:00
advanced4
ef127f113d
update client.py to use DEFAULT_MAX_SEGMENT_SIZE 2019-05-08 16:04:57 -04:00
Jean-Paul Calderone
53b40ef0e0 don't double start; don't try to handle double start. 2019-03-28 16:10:36 -04:00
meejah
1ad2174df9 windows yaml.safe_load returns None on unreadable files.. 2018-09-11 11:14:41 -06:00
meejah
3d35723a59 windows yamlutil.safe_load returns None when files are unreadable 2018-09-10 21:58:28 -06:00
meejah
692128ad1d better defaults handling 2018-09-10 21:58:28 -06:00
meejah
f6b62ca192 import 2018-09-10 21:58:28 -06:00
meejah
a344bb24dc immutable default 2018-09-10 21:58:27 -06:00
meejah
dee8b72206 dead code 2018-09-10 21:58:27 -06:00
meejah
9aae4bd459 only handle ENOENT 2018-09-10 21:58:27 -06:00
meejah
a5287add80 clarify comments 2018-09-10 21:58:27 -06:00