Statistics
| Branch: | Tag: | Revision:

root / snf-pithos-app / pithos / api / settings.py @ 4ab620b6

History | View | Annotate | Download (3.5 kB)

1
#coding=utf8
2
from django.conf import settings
3

    
4
COOKIE_NAME = getattr(settings, 'PITHOS_ASTAKOS_COOKIE_NAME', '_pithos2_a')
5

    
6
# SQLAlchemy (choose SQLite/MySQL/PostgreSQL).
7
BACKEND_DB_MODULE = getattr(
8
    settings, 'PITHOS_BACKEND_DB_MODULE', 'pithos.backends.lib.sqlalchemy')
9
BACKEND_DB_CONNECTION = getattr(settings, 'PITHOS_BACKEND_DB_CONNECTION',
10
                                'sqlite:////tmp/pithos-backend.db')
11

    
12
# Block storage.
13
BACKEND_BLOCK_MODULE = getattr(
14
    settings, 'PITHOS_BACKEND_BLOCK_MODULE', 'pithos.backends.lib.hashfiler')
15
BACKEND_BLOCK_PATH = getattr(
16
    settings, 'PITHOS_BACKEND_BLOCK_PATH', '/tmp/pithos-data/')
17
BACKEND_BLOCK_UMASK = getattr(settings, 'PITHOS_BACKEND_BLOCK_UMASK', 0o022)
18

    
19
# Queue for billing.
20
BACKEND_QUEUE_MODULE = getattr(settings, 'PITHOS_BACKEND_QUEUE_MODULE',
21
                               None)  # Example: 'pithos.backends.lib.rabbitmq'
22
BACKEND_QUEUE_HOSTS = getattr(settings, 'PITHOS_BACKEND_QUEUE_HOSTS', None) # Example: "['amqp://guest:guest@localhost:5672']"
23
BACKEND_QUEUE_EXCHANGE = getattr(settings, 'PITHOS_BACKEND_QUEUE_EXCHANGE', 'pithos')
24

    
25
# Default setting for new accounts.
26
BACKEND_QUOTA = getattr(
27
    settings, 'PITHOS_BACKEND_QUOTA', 50 * 1024 * 1024 * 1024)
28
BACKEND_VERSIONING = getattr(settings, 'PITHOS_BACKEND_VERSIONING', 'auto')
29
BACKEND_FREE_VERSIONING = getattr(settings, 'PITHOS_BACKEND_FREE_VERSIONING', True)
30

    
31
# Default backend pool size
32
BACKEND_POOL_SIZE = getattr(settings, 'PITHOS_BACKEND_POOL_SIZE', 5)
33

    
34
# Update object checksums.
35
UPDATE_MD5 = getattr(settings, 'PITHOS_UPDATE_MD5', False)
36

    
37
# Service Token acquired by identity provider.
38
SERVICE_TOKEN = getattr(settings, 'PITHOS_SERVICE_TOKEN', '')
39

    
40
RADOS_STORAGE = getattr(settings, 'PITHOS_RADOS_STORAGE', False)
41
RADOS_POOL_BLOCKS= getattr(settings, 'PITHOS_RADOS_POOL_BLOCKS', 'blocks')
42
RADOS_POOL_MAPS = getattr(settings, 'PITHOS_RADOS_POOL_MAPS', 'maps')
43

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

    
48
# Set PROXY_USER_SERVICES to True to have snf-pithos-app handle all Astakos
49
# user-visible services (feedback, login, etc.) by proxying them to a running
50
# Astakos.
51
# Set to False if snf astakos-app is running on the same machine, so it handles
52
# the requests on its own.
53
PROXY_USER_SERVICES = getattr(settings, 'PITHOS_PROXY_USER_SERVICES', True)
54

    
55
USER_CATALOG_URL = getattr(settings, 'PITHOS_USER_CATALOG_URL',
56
                           'https://accounts.example.synnefo.org/user_catalogs/')
57
USER_FEEDBACK_URL = getattr(settings, 'PITHOS_USER_FEEDBACK_URL',
58
                            'https://accounts.example.synnefo.org/feedback/')
59
USER_LOGIN_URL = getattr(settings, 'PITHOS_USER_LOGIN_URL',
60
                         'https://accounts.example.synnefo.org/login/')
61

    
62
# Set the quota holder component URI
63
USE_QUOTAHOLDER = getattr(settings, 'PITHOS_USE_QUOTAHOLDER', False)
64
QUOTAHOLDER_URL = getattr(settings, 'PITHOS_QUOTAHOLDER_URL', '')
65
QUOTAHOLDER_TOKEN = getattr(settings, 'PITHOS_QUOTAHOLDER_TOKEN', '')
66
QUOTAHOLDER_POOLSIZE = getattr(settings, 'PITHOS_QUOTAHOLDER_POOLSIZE', 200)
67

    
68
# Set how many random bytes to use for constructing the URL of Pithos public files
69
PUBLIC_URL_SECURITY =  getattr(settings, 'PITHOS_PUBLIC_URL_SECURITY', 16)
70
# Set the alphabet to use for constructing the URL of Pithos public files
71
PUBLIC_URL_ALPHABET =  getattr(
72
    settings,
73
    'PITHOS_PUBLIC_URL_ALPHABET',
74
    '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
75
)