root / snf-pithos-app / pithos / api / settings.py @ c700f742
History | View | Annotate | Download (2.5 kB)
1 |
#coding=utf8
|
---|---|
2 |
from django.conf import settings |
3 |
|
4 |
# Set local users, or a remote host. To disable local users set them to None.
|
5 |
sample_users = { |
6 |
'0000': 'test', |
7 |
'0001': 'verigak', |
8 |
'0002': 'chazapis', |
9 |
'0003': 'gtsouk', |
10 |
'0004': 'papagian', |
11 |
'0005': 'louridas', |
12 |
'0006': 'chstath', |
13 |
'0007': 'pkanavos', |
14 |
'0008': 'mvasilak', |
15 |
'0009': 'διογένης' |
16 |
} |
17 |
|
18 |
ASTAKOS_URL = getattr(settings, 'PITHOS_ASTAKOS_URL', |
19 |
'http://127.0.0.1:8000/im/')
|
20 |
from urlparse import urljoin |
21 |
AUTHENTICATION_URL = getattr(settings, 'PITHOS_AUTHENTICATION_URL', |
22 |
urljoin(ASTAKOS_URL, 'authenticate/'))
|
23 |
USER_INFO_URL = getattr(settings, 'PITHOS_USER_INFO_URL', |
24 |
urljoin(ASTAKOS_URL, 'service/api/v2.0/users/'))
|
25 |
AUTHENTICATION_USERS = getattr(settings, 'PITHOS_AUTHENTICATION_USERS', {}) |
26 |
|
27 |
COOKIE_NAME = getattr(settings, 'ASTAKOS_COOKIE_NAME', '_pithos2_a') |
28 |
|
29 |
# SQLAlchemy (choose SQLite/MySQL/PostgreSQL).
|
30 |
BACKEND_DB_MODULE = getattr(
|
31 |
settings, 'PITHOS_BACKEND_DB_MODULE', 'pithos.backends.lib.sqlalchemy') |
32 |
BACKEND_DB_CONNECTION = getattr(settings, 'PITHOS_BACKEND_DB_CONNECTION', |
33 |
'sqlite:////tmp/pithos-backend.db')
|
34 |
|
35 |
# Block storage.
|
36 |
BACKEND_BLOCK_MODULE = getattr(
|
37 |
settings, 'PITHOS_BACKEND_BLOCK_MODULE', 'pithos.backends.lib.hashfiler') |
38 |
BACKEND_BLOCK_PATH = getattr(
|
39 |
settings, 'PITHOS_BACKEND_BLOCK_PATH', '/tmp/pithos-data/') |
40 |
BACKEND_BLOCK_UMASK = getattr(settings, 'PITHOS_BACKEND_BLOCK_UMASK', 0o022) |
41 |
|
42 |
# Queue for billing.
|
43 |
BACKEND_QUEUE_MODULE = getattr(settings, 'PITHOS_BACKEND_QUEUE_MODULE', |
44 |
None) # Example: 'pithos.backends.lib.rabbitmq' |
45 |
BACKEND_QUEUE_HOSTS = getattr(settings, 'PITHOS_BACKEND_QUEUE_HOSTS', None) # Example: "['amqp://guest:guest@localhost:5672']" |
46 |
BACKEND_QUEUE_EXCHANGE = getattr(settings, 'PITHOS_BACKEND_QUEUE_EXCHANGE', 'pithos') |
47 |
|
48 |
# Default setting for new accounts.
|
49 |
BACKEND_QUOTA = getattr(
|
50 |
settings, 'PITHOS_BACKEND_QUOTA', 50 * 1024 * 1024 * 1024) |
51 |
BACKEND_VERSIONING = getattr(settings, 'PITHOS_BACKEND_VERSIONING', 'auto') |
52 |
BACKEND_FREE_VERSIONING = getattr(settings, 'PITHOS_BACKEND_FREE_VERSIONING', True) |
53 |
|
54 |
# Set the quota holder component URI
|
55 |
QUOTAHOLDER_URL = getattr(settings, 'PITHOS_QUOTAHOLDER_URL', '') |
56 |
QUOTAHOLDER_TOKEN = getattr(settings, 'PITHOS_QUOTAHOLDER_TOKEN', '') |
57 |
|
58 |
# Update object checksums when using hashmaps.
|
59 |
UPDATE_MD5 = getattr(settings, 'PITHOS_UPDATE_MD5', True) |
60 |
|
61 |
# Service Token acquired by identity provider.
|
62 |
SERVICE_TOKEN = getattr(settings, 'PITHOS_SERVICE_TOKEN', '') |