Revision 3173699c
b/snf-pithos-app/pithos/api/settings.py | ||
---|---|---|
46 | 46 |
BACKEND_VERSIONING = getattr(settings, 'PITHOS_BACKEND_VERSIONING', 'auto') |
47 | 47 |
BACKEND_FREE_VERSIONING = getattr(settings, 'PITHOS_BACKEND_FREE_VERSIONING', True) |
48 | 48 |
|
49 |
PITHOS_QUOTAHOLDER_URL = getattr(settings,
|
|
50 |
'PITHOS_QUOTAHOLDER_URL',
|
|
51 |
'http://127.0.0.1/api/quotaholder/v')
|
|
49 |
# Set the quota holder component URI
|
|
50 |
QUOTAHOLDER_URL = getattr(settings, 'PITHOS_QUOTAHOLDER_URL', '')
|
|
51 |
QUOTAHOLDER_TOKEN = getattr(settings, 'PITHOS_QUOTAHOLDER_TOKEN', '')
|
|
52 | 52 |
|
53 | 53 |
# Update object checksums when using hashmaps. |
54 | 54 |
UPDATE_MD5 = getattr(settings, 'PITHOS_UPDATE_MD5', True) |
b/snf-pithos-app/pithos/api/util.py | ||
---|---|---|
61 | 61 |
BACKEND_BLOCK_UMASK, |
62 | 62 |
BACKEND_QUEUE_MODULE, BACKEND_QUEUE_HOSTS, |
63 | 63 |
BACKEND_QUEUE_EXCHANGE, |
64 |
PITHOS_QUOTAHOLDER_URL,
|
|
65 |
BACKEND_QUOTA, BACKEND_VERSIONING,
|
|
64 |
QUOTAHOLDER_URL, QUOTAHOLDER_TOKEN,
|
|
65 |
BACKEND_QUOTA, BACKEND_VERSIONING,
|
|
66 | 66 |
BACKEND_FREE_VERSIONING, |
67 | 67 |
AUTHENTICATION_URL, AUTHENTICATION_USERS, |
68 | 68 |
SERVICE_TOKEN, COOKIE_NAME) |
... | ... | |
863 | 863 |
queue_module=BACKEND_QUEUE_MODULE, |
864 | 864 |
queue_hosts=BACKEND_QUEUE_HOSTS, |
865 | 865 |
queue_exchange=BACKEND_QUEUE_EXCHANGE, |
866 |
quotaholder_url=PITHOS_QUOTAHOLDER_URL, |
|
866 |
quotaholder_url=QUOTAHOLDER_URL, |
|
867 |
quotaholder_token=QUOTAHOLDER_TOKEN, |
|
867 | 868 |
free_versioning=BACKEND_FREE_VERSIONING) |
868 | 869 |
|
869 | 870 |
|
b/snf-pithos-backend/pithos/backends/modular.py | ||
---|---|---|
143 | 143 |
|
144 | 144 |
def __init__(self, db_module=None, db_connection=None, |
145 | 145 |
block_module=None, block_path=None, block_umask=None, |
146 |
queue_module=None, queue_hosts=None, |
|
147 |
queue_exchange=None, quotaholder_url=None,
|
|
146 |
queue_module=None, queue_hosts=None, queue_exchange=None,
|
|
147 |
quotaholder_url=None, quotaholder_token=None,
|
|
148 | 148 |
free_versioning=True): |
149 | 149 |
db_module = db_module or DEFAULT_DB_MODULE |
150 | 150 |
db_connection = db_connection or DEFAULT_DB_CONNECTION |
... | ... | |
202 | 202 |
self.queue = NoQueue() |
203 | 203 |
|
204 | 204 |
self.quotaholder_url = quotaholder_url |
205 |
self.quotaholder = QuotaholderClient(quotaholder_url) |
|
205 |
self.quotaholder_token = quotaholder_token |
|
206 |
self.quotaholder = QuotaholderClient(quotaholder_url, quotaholder_token) |
|
206 | 207 |
self.serials = [] |
207 | 208 |
self.messages = [] |
208 | 209 |
|
b/snf-pithos-backend/pithos/backends/util.py | ||
---|---|---|
44 | 44 |
def __init__(self, size=None, db_module=None, db_connection=None, |
45 | 45 |
block_module=None, block_path=None, block_umask=None, |
46 | 46 |
queue_module=None, queue_hosts=None, |
47 |
queue_exchange=None, quotaholder_url=None, |
|
47 |
queue_exchange=None, |
|
48 |
quotaholder_url=None, quotaholder_token=None, |
|
48 | 49 |
free_versioning=True): |
49 | 50 |
super(PithosBackendPool, self).__init__(size=size) |
50 | 51 |
self.db_module = db_module |
... | ... | |
55 | 56 |
self.queue_module = queue_module |
56 | 57 |
self.queue_hosts = queue_hosts |
57 | 58 |
self.queue_exchange = queue_exchange |
58 |
self.quotaholder_url = quotaholder_url |
|
59 |
self.quotaholder_url = quotaholder_url |
|
60 |
self.quotaholder_token = quotaholder_token |
|
59 | 61 |
self.free_versioning = free_versioning |
60 | 62 |
|
61 | 63 |
def _pool_create(self): |
... | ... | |
68 | 70 |
queue_hosts=self.queue_hosts, |
69 | 71 |
queue_exchange=self.queue_exchange, |
70 | 72 |
quotaholder_url=self.quotaholder_url, |
73 |
quotaholder_token=self.quotaholder_token, |
|
71 | 74 |
free_versioning=self.free_versioning) |
72 | 75 |
|
73 | 76 |
backend._real_close = backend.close |
Also available in: Unified diff