Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (3.2 kB)

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

    
4
AUTHENTICATION_URL = getattr(settings, 'PITHOS_AUTHENTICATION_URL',
5
                             'https://<astakos.host>/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
# Update object checksums when using hashmaps.
36
UPDATE_MD5 = getattr(settings, 'PITHOS_UPDATE_MD5', True)
37

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

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

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

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

    
56
USER_CATALOG_URL = getattr(settings, 'PITHOS_USER_CATALOG_URL',
57
                           'https://<astakos.host>/user_catalogs/')
58
USER_FEEDBACK_URL = getattr(settings, 'PITHOS_USER_FEEDBACK_URL',
59
                            'https://<astakos.host>/feedback/')
60
USER_LOGIN_URL = getattr(settings, 'PITHOS_USER_LOGIN_URL',
61
                         'https://<astakos.host>/login/')
62

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