Statistics
| Branch: | Tag: | Revision:

root / snf-pithos-app / pithos / api / settings.py @ 27932481

History | View | Annotate | Download (2.9 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/im/service/api/v2.0/users/')
23
USER_FEEDBACK_URL = getattr(settings, 'PITHOS_USER_FEEDBACK_URL',
24
                            'http://127.0.0.1:8000/im/service/api/v2.0/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
COOKIE_NAME = getattr(settings, 'ASTAKOS_COOKIE_NAME', '_pithos2_a')
32

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

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

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

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

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

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

    
65
RADOS_STORAGE = getattr(settings, 'PITHOS_RADOS_STORAGE', False)
66
RADOS_POOL_BLOCKS= getattr(settings, 'PITHOS_RADOS_POOL_BLOCKS', 'blocks')
67
RADOS_POOL_MAPS = getattr(settings, 'PITHOS_RADOS_POOL_MAPS', 'maps')