Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (3.8 kB)

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

    
4
AUTHENTICATION_URL = getattr(settings, 'PITHOS_AUTHENTICATION_URL',
5
                             'https://accounts.example.synnefo.org/im/authenticate/')
6
AUTHENTICATION_USERS = getattr(settings, 'PITHOS_AUTHENTICATION_USERS', {})
7

    
8
COOKIE_NAME = getattr(settings, 'PITHOS_ASTAKOS_COOKIE_NAME', '_pithos2_a')
9

    
10
# SQLAlchemy (choose SQLite/MySQL/PostgreSQL).
11
BACKEND_DB_MODULE = getattr(
12
    settings, 'PITHOS_BACKEND_DB_MODULE', 'pithos.backends.lib.sqlalchemy')
13
BACKEND_DB_CONNECTION = getattr(settings, 'PITHOS_BACKEND_DB_CONNECTION',
14
                                'sqlite:////tmp/pithos-backend.db')
15

    
16
# Block storage.
17
BACKEND_BLOCK_MODULE = getattr(
18
    settings, 'PITHOS_BACKEND_BLOCK_MODULE', 'pithos.backends.lib.hashfiler')
19
BACKEND_BLOCK_PATH = getattr(
20
    settings, 'PITHOS_BACKEND_BLOCK_PATH', '/tmp/pithos-data/')
21
BACKEND_BLOCK_UMASK = getattr(settings, 'PITHOS_BACKEND_BLOCK_UMASK', 0o022)
22

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

    
29
# Default setting for new accounts.
30
BACKEND_QUOTA = getattr(
31
    settings, 'PITHOS_BACKEND_QUOTA', 50 * 1024 * 1024 * 1024)
32
BACKEND_VERSIONING = getattr(settings, 'PITHOS_BACKEND_VERSIONING', 'auto')
33
BACKEND_FREE_VERSIONING = getattr(settings, 'PITHOS_BACKEND_FREE_VERSIONING', True)
34

    
35
# Default backend pool size
36
BACKEND_POOL_SIZE = getattr(settings, 'PITHOS_BACKEND_POOL_SIZE', 5)
37

    
38
# Update object checksums when using hashmaps.
39
UPDATE_MD5 = getattr(settings, 'PITHOS_UPDATE_MD5', True)
40

    
41
# Service Token acquired by identity provider.
42
SERVICE_TOKEN = getattr(settings, 'PITHOS_SERVICE_TOKEN', '')
43

    
44
RADOS_STORAGE = getattr(settings, 'PITHOS_RADOS_STORAGE', False)
45
RADOS_POOL_BLOCKS= getattr(settings, 'PITHOS_RADOS_POOL_BLOCKS', 'blocks')
46
RADOS_POOL_MAPS = getattr(settings, 'PITHOS_RADOS_POOL_MAPS', 'maps')
47

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

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

    
59
USER_CATALOG_URL = getattr(settings, 'PITHOS_USER_CATALOG_URL',
60
                           'https://accounts.example.synnefo.org/user_catalogs/')
61
USER_FEEDBACK_URL = getattr(settings, 'PITHOS_USER_FEEDBACK_URL',
62
                            'https://accounts.example.synnefo.org/feedback/')
63
USER_LOGIN_URL = getattr(settings, 'PITHOS_USER_LOGIN_URL',
64
                         'https://accounts.example.synnefo.org/login/')
65

    
66
# Set the quota holder component URI
67
USE_QUOTAHOLDER = getattr(settings, 'PITHOS_USE_QUOTAHOLDER', False)
68
QUOTAHOLDER_URL = getattr(settings, 'PITHOS_QUOTAHOLDER_URL', '')
69
QUOTAHOLDER_TOKEN = getattr(settings, 'PITHOS_QUOTAHOLDER_TOKEN', '')
70
QUOTAHOLDER_POOLSIZE = getattr(settings, 'PITHOS_QUOTAHOLDER_POOLSIZE', 200)
71

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