summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/src/leap/soledad/server/_blobs.py10
-rw-r--r--server/src/leap/soledad/server/_config.py1
-rw-r--r--testing/tests/server/test_config.py3
3 files changed, 13 insertions, 1 deletions
diff --git a/server/src/leap/soledad/server/_blobs.py b/server/src/leap/soledad/server/_blobs.py
index 0424aae0..ae09f409 100644
--- a/server/src/leap/soledad/server/_blobs.py
+++ b/server/src/leap/soledad/server/_blobs.py
@@ -19,14 +19,24 @@ Blobs Server implementation.
"""
from twisted.web import resource
+from ._config import get_config
+
__all__ = ['blobs_resource']
+_config = get_config()
+DEFAULT_BLOBS_PATH = _config['blobs_path']
+
+
class BlobsResource(resource.Resource):
isLeaf = True
+ def __init__(self, blobs_path=DEFAULT_BLOBS_PATH):
+ resource.Resource.__init__(self)
+ self._blobs_path = blobs_path
+
def render_GET(self, request):
return 'blobs is not implemented yet!'
diff --git a/server/src/leap/soledad/server/_config.py b/server/src/leap/soledad/server/_config.py
index 1818c38d..e89e70d6 100644
--- a/server/src/leap/soledad/server/_config.py
+++ b/server/src/leap/soledad/server/_config.py
@@ -29,6 +29,7 @@ CONFIG_DEFAULTS = {
'admin_netrc': '/etc/couchdb/couchdb-admin.netrc',
'batching': True,
'blobs': False,
+ 'blobs_path': '/srv/leap/soledad/blobs',
},
'database-security': {
'members': ['soledad'],
diff --git a/testing/tests/server/test_config.py b/testing/tests/server/test_config.py
index 133057f5..d2a8a9de 100644
--- a/testing/tests/server/test_config.py
+++ b/testing/tests/server/test_config.py
@@ -64,5 +64,6 @@ class ConfigurationParsingTest(unittest.TestCase):
'admin_netrc':
'/etc/couchdb/couchdb-soledad-admin.netrc',
'batching': False,
- 'blobs': False}
+ 'blobs': False,
+ 'blobs_path': '/srv/leap/soledad/blobs'}
self.assertDictEqual(expected, config['soledad-server'])