Statistics
| Branch: | Tag: | Revision:

root / snf-pithos-app / pithos / api / settings.py @ 61ae9b74

History | View | Annotate | Download (3.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
AUTHENTICATION_URL = getattr(settings, 'PITHOS_AUTHENTICATION_URL',
19
                             'https://<astakos.host>/im/authenticate/')
20
AUTHENTICATION_USERS = getattr(settings, 'PITHOS_AUTHENTICATION_USERS', {})
21

    
22
COOKIE_NAME = getattr(settings, 'ASTAKOS_COOKIE_NAME', '_pithos2_a')
23

    
24
# SQLAlchemy (choose SQLite/MySQL/PostgreSQL).
25
BACKEND_DB_MODULE = getattr(
26
    settings, 'PITHOS_BACKEND_DB_MODULE', 'pithos.backends.lib.sqlalchemy')
27
BACKEND_DB_CONNECTION = getattr(settings, 'PITHOS_BACKEND_DB_CONNECTION',
28
                                'sqlite:////tmp/pithos-backend.db')
29

    
30
# Block storage.
31
BACKEND_BLOCK_MODULE = getattr(
32
    settings, 'PITHOS_BACKEND_BLOCK_MODULE', 'pithos.backends.lib.hashfiler')
33
BACKEND_BLOCK_PATH = getattr(
34
    settings, 'PITHOS_BACKEND_BLOCK_PATH', '/tmp/pithos-data/')
35
BACKEND_BLOCK_UMASK = getattr(settings, 'PITHOS_BACKEND_BLOCK_UMASK', 0o022)
36

    
37
# Queue for billing.
38
BACKEND_QUEUE_MODULE = getattr(settings, 'PITHOS_BACKEND_QUEUE_MODULE',
39
                               None)  # Example: 'pithos.backends.lib.rabbitmq'
40
BACKEND_QUEUE_HOSTS = getattr(settings, 'PITHOS_BACKEND_QUEUE_HOSTS', None) # Example: "['amqp://guest:guest@localhost:5672']"
41
BACKEND_QUEUE_EXCHANGE = getattr(settings, 'PITHOS_BACKEND_QUEUE_EXCHANGE', 'pithos')
42

    
43
# Default setting for new accounts.
44
BACKEND_QUOTA = getattr(
45
    settings, 'PITHOS_BACKEND_QUOTA', 50 * 1024 * 1024 * 1024)
46
BACKEND_VERSIONING = getattr(settings, 'PITHOS_BACKEND_VERSIONING', 'auto')
47
BACKEND_FREE_VERSIONING = getattr(settings, 'PITHOS_BACKEND_FREE_VERSIONING', True)
48

    
49
# Update object checksums when using hashmaps.
50
UPDATE_MD5 = getattr(settings, 'PITHOS_UPDATE_MD5', True)
51

    
52
# Service Token acquired by identity provider.
53
SERVICE_TOKEN = getattr(settings, 'PITHOS_SERVICE_TOKEN', '')
54

    
55
RADOS_STORAGE = getattr(settings, 'PITHOS_RADOS_STORAGE', False)
56
RADOS_POOL_BLOCKS= getattr(settings, 'PITHOS_RADOS_POOL_BLOCKS', 'blocks')
57
RADOS_POOL_MAPS = getattr(settings, 'PITHOS_RADOS_POOL_MAPS', 'maps')
58

    
59
# This enables a ui compatibility layer for the introduction of UUIDs in
60
# identity management.  WARNING: Setting to True will break your installation.
61
TRANSLATE_UUIDS = getattr(settings, 'PITHOS_TRANSLATE_UUIDS', False)
62

    
63
# Set PROXY_USER_SERVICES to True to have snf-pithos-app handle all Astakos
64
# user-visible services (feedback, login, etc.) by proxying them to a running
65
# Astakos.
66
# Set to False if snf astakos-app is running on the same machine, so it handles
67
# the requests on its own.
68
PROXY_USER_SERVICES = getattr(settings, 'PITHOS_PROXY_USER_SERVICES', True)
69

    
70
USER_CATALOG_URL = getattr(settings, 'PITHOS_USER_CATALOG_URL',
71
                           'https://<astakos.host>/user_catalogs/')
72
USER_FEEDBACK_URL = getattr(settings, 'PITHOS_USER_FEEDBACK_URL',
73
                            'https://<astakos.host>/feedback/')
74
USER_LOGIN_URL = getattr(settings, 'PITHOS_USER_LOGIN_URL',
75
                         'https://<astakos.host>/login/')
76

    
77
# Set the quota holder component URI
78
USE_QUOTAHOLDER = getattr(settings, 'PITHOS_USE_QUOTAHOLDER', True)
79
QUOTAHOLDER_URL = getattr(settings, 'PITHOS_QUOTAHOLDER_URL', '')
80
QUOTAHOLDER_TOKEN = getattr(settings, 'PITHOS_QUOTAHOLDER_TOKEN', '')