Statistics
| Branch: | Tag: | Revision:

root / snf-pithos-app / pithos / api / settings.py @ 469d0997

History | View | Annotate | Download (3.1 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
# Set to False if pithos running in the same machine with the identity management
19
PROXY_USER_SERVICES = getattr(settings, 'PITHOS_PROXY_USER_SERVICES', True)
20

    
21
USER_CATALOG_URL = getattr(settings, 'PITHOS_USER_CATALOG_URL',
22
                           'http://127.0.0.1:8000/user_catalogs/')
23
USER_FEEDBACK_URL = getattr(settings, 'PITHOS_USER_FEEDBACK_URL',
24
                            'http://127.0.0.1:8000/feedback/')
25
USER_LOGIN_URL = getattr(settings, 'PITHOS_USER_LOGIN_URL',
26
                         'http://127.0.0.1:8000/login/')
27
AUTHENTICATION_URL = getattr(settings, 'PITHOS_AUTHENTICATION_URL',
28
                             'http://localhost:8000/im/authenticate/')
29
AUTHENTICATION_USERS = getattr(settings, 'PITHOS_AUTHENTICATION_USERS', {})
30

    
31
TRANSLATE_UUIDS = getattr(settings, 'PITHOS_TRANSLATE_UUIDS', False)
32

    
33
COOKIE_NAME = getattr(settings, 'ASTAKOS_COOKIE_NAME', '_pithos2_a')
34

    
35
# SQLAlchemy (choose SQLite/MySQL/PostgreSQL).
36
BACKEND_DB_MODULE = getattr(
37
    settings, 'PITHOS_BACKEND_DB_MODULE', 'pithos.backends.lib.sqlalchemy')
38
BACKEND_DB_CONNECTION = getattr(settings, 'PITHOS_BACKEND_DB_CONNECTION',
39
                                'sqlite:////tmp/pithos-backend.db')
40

    
41
# Block storage.
42
BACKEND_BLOCK_MODULE = getattr(
43
    settings, 'PITHOS_BACKEND_BLOCK_MODULE', 'pithos.backends.lib.hashfiler')
44
BACKEND_BLOCK_PATH = getattr(
45
    settings, 'PITHOS_BACKEND_BLOCK_PATH', '/tmp/pithos-data/')
46
BACKEND_BLOCK_UMASK = getattr(settings, 'PITHOS_BACKEND_BLOCK_UMASK', 0o022)
47

    
48
# Queue for billing.
49
BACKEND_QUEUE_MODULE = getattr(settings, 'PITHOS_BACKEND_QUEUE_MODULE',
50
                               None)  # Example: 'pithos.backends.lib.rabbitmq'
51
BACKEND_QUEUE_HOSTS = getattr(settings, 'PITHOS_BACKEND_QUEUE_HOSTS', None) # Example: "['amqp://guest:guest@localhost:5672']"
52
BACKEND_QUEUE_EXCHANGE = getattr(settings, 'PITHOS_BACKEND_QUEUE_EXCHANGE', 'pithos')
53

    
54
# Default setting for new accounts.
55
BACKEND_QUOTA = getattr(
56
    settings, 'PITHOS_BACKEND_QUOTA', 50 * 1024 * 1024 * 1024)
57
BACKEND_VERSIONING = getattr(settings, 'PITHOS_BACKEND_VERSIONING', 'auto')
58
BACKEND_FREE_VERSIONING = getattr(settings, 'PITHOS_BACKEND_FREE_VERSIONING', True)
59

    
60
# Set the quota holder component URI
61
QUOTAHOLDER_URL = getattr(settings, 'PITHOS_QUOTAHOLDER_URL', '')
62
QUOTAHOLDER_TOKEN = getattr(settings, 'PITHOS_QUOTAHOLDER_TOKEN', '')
63

    
64
# Update object checksums when using hashmaps.
65
UPDATE_MD5 = getattr(settings, 'PITHOS_UPDATE_MD5', True)
66

    
67
# Service Token acquired by identity provider.
68
SERVICE_TOKEN = getattr(settings, 'PITHOS_SERVICE_TOKEN', '')
69

    
70
RADOS_STORAGE = getattr(settings, 'PITHOS_RADOS_STORAGE', False)
71
RADOS_POOL_BLOCKS= getattr(settings, 'PITHOS_RADOS_POOL_BLOCKS', 'blocks')
72
RADOS_POOL_MAPS = getattr(settings, 'PITHOS_RADOS_POOL_MAPS', 'maps')