Statistics
| Branch: | Tag: | Revision:

root / snf-pithos-app / pithos / api / settings.py @ 6dd0fc7c

History | View | Annotate | Download (3.6 kB)

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

    
4
ASTAKOS_URL = getattr(settings, "ASTAKOS_URL",
5
                      "https://accounts.example.synnefo.org/")
6

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

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

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

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

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

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

    
37
# Update object checksums.
38
UPDATE_MD5 = getattr(settings, 'PITHOS_UPDATE_MD5', False)
39

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

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

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

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

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

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

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