Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / app_settings / default / api.py @ e3ff6830

History | View | Annotate | Download (4.1 kB)

1
# -*- coding: utf-8 -*-
2
#
3
# API configuration
4
#####################
5

    
6

    
7
DEBUG = False
8

    
9
# Top-level URL for deployment. Numerous other URLs depend on this.
10
CYCLADES_BASE_URL = "https://host:port/cyclades/"
11

    
12
# The API will return HTTP Bad Request if the ?changes-since
13
# parameter refers to a point in time more than POLL_LIMIT seconds ago.
14
POLL_LIMIT = 3600
15

    
16
#
17
# Network Configuration
18
#
19

    
20
# Maximum allowed network size for private networks.
21
MAX_CIDR_BLOCK = 22
22

    
23
# Default settings used by network flavors
24
DEFAULT_MAC_PREFIX = 'aa:00:0'
25
DEFAULT_BRIDGE = 'br0'
26

    
27
# Boolean value indicating whether synnefo would hold a Pool and allocate IP
28
# addresses. If this setting is set to False, IP pool management will be
29
# delegated to Ganeti. If machines have been created with this option as False,
30
# you must run network reconciliation after turning it to True.
31
PUBLIC_USE_POOL = True
32

    
33
# Network flavors that users are allowed to create through API requests
34
API_ENABLED_NETWORK_FLAVORS = ['MAC_FILTERED']
35

    
36
# Settings for IP_LESS_ROUTED network:
37
# -----------------------------------
38
# In this case VMCs act as routers that forward the traffic to/from VMs, based
39
# on the defined routing table($DEFAULT_ROUTING_TABLE) and ip rules, that
40
# exist in every node, implenting an IP-less routed and proxy-arp setup.
41
DEFAULT_ROUTING_TABLE = 'snf_public'
42

    
43
# Settings for MAC_FILTERED network:
44
# ------------------------------------------
45
# All networks of this type are bridged to the same bridge. Isolation between
46
# networks is achieved by assigning a unique MAC-prefix to each network and
47
# filtering packets via ebtables.
48
DEFAULT_MAC_FILTERED_BRIDGE = 'prv0'
49

    
50

    
51
# Firewalling
52
GANETI_FIREWALL_ENABLED_TAG = 'synnefo:network:0:protected'
53
GANETI_FIREWALL_DISABLED_TAG = 'synnefo:network:0:unprotected'
54
GANETI_FIREWALL_PROTECTED_TAG = 'synnefo:network:0:limited'
55

    
56
# The default firewall profile that will be in effect if no tags are defined
57
DEFAULT_FIREWALL_PROFILE = 'DISABLED'
58

    
59
# our REST API would prefer to be explicit about trailing slashes
60
APPEND_SLASH = False
61

    
62
# Fixed mapping of user VMs to a specific backend.
63
# e.g. BACKEND_PER_USER = {'example@synnefo.org': 2}
64
BACKEND_PER_USER = {}
65

    
66
# List of backend IDs used *only* for archipelago.
67
ARCHIPELAGO_BACKENDS = []
68

    
69

    
70
# URL templates for the stat graphs.
71
# The API implementation replaces '%s' with the encrypted backend id.
72
# FIXME: For now we do not encrypt the backend id.
73
CPU_BAR_GRAPH_URL = 'http://stats.synnefo.org/%s/cpu-bar.png'
74
CPU_TIMESERIES_GRAPH_URL = 'http://stats.synnefo.org/%s/cpu-ts.png'
75
NET_BAR_GRAPH_URL = 'http://stats.synnefo.org/%s/net-bar.png'
76
NET_TIMESERIES_GRAPH_URL = 'http://stats.synnefo.org/%s/net-ts.png'
77

    
78
# Recommended refresh period for server stats
79
STATS_REFRESH_PERIOD = 60
80

    
81
# The maximum number of file path/content pairs that can be supplied on server
82
# build
83
MAX_PERSONALITY = 5
84

    
85
# The maximum size, in bytes, for each personality file
86
MAX_PERSONALITY_SIZE = 10240
87

    
88
# Available storage types to be used as disk templates
89
# Use ext_<provider_name> to map specific provider for `ext` disk template.
90
GANETI_DISK_TEMPLATES = ('blockdev', 'diskless', 'drbd', 'file', 'plain',
91
                         'rbd',  'sharedfile')
92
DEFAULT_GANETI_DISK_TEMPLATE = 'drbd'
93

    
94
# Top-level URL of the astakos instance to be used for user management
95
ASTAKOS_BASE_URL = 'https://accounts.example.synnefo.org/'
96

    
97
# Tune the size of the Astakos http client connection pool
98
# This limit the number of concurrent requests to Astakos.
99
ASTAKOS_POOLSIZE = 50
100

    
101
# Key for password encryption-decryption. After changing this setting, synnefo
102
# will be unable to decrypt all existing Backend passwords. You will need to
103
# store again the new password by using 'snf-manage backend-modify'.
104
# SECRET_ENCRYPTION_KEY may up to 32 bytes. Keys bigger than 32 bytes are not
105
# supported.
106
SECRET_ENCRYPTION_KEY = "Password Encryption Key"
107

    
108
# Astakos service token
109
# The token used for astakos service api calls (e.g. api to retrieve user email
110
# using a user uuid)
111
CYCLADES_ASTAKOS_SERVICE_TOKEN = '' 
112

    
113
# Let cyclades proxy user specific api calls to astakos, via self served
114
# endpoints. Set this to False if you deploy cyclades-app/astakos-app on the
115
# same machine.
116
CYCLADES_PROXY_USER_SERVICES = True