Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (3.8 kB)

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

    
6
from synnefo.settings.setup import Example
7

    
8
DEBUG = False
9

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

    
14
#
15
# Network Configuration
16
#
17

    
18
# List of network IDs. All created instances will get a NIC connected to each
19
# network of this list. If the special network ID "SNF:ANY_PUBLIC" is used,
20
# Cyclades will automatically choose a public network and connect the server to
21
# it.
22
DEFAULT_INSTANCE_NETWORKS = ["SNF:ANY_PUBLIC"]
23

    
24
# Maximum allowed network size for private networks.
25
MAX_CIDR_BLOCK = 22
26

    
27
# Default settings used by network flavors
28
DEFAULT_MAC_PREFIX = 'aa:00:0'
29
DEFAULT_BRIDGE = 'br0'
30

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

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

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

    
48

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

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

    
57
# Fixed mapping of user VMs to a specific backend.
58
# e.g. BACKEND_PER_USER = {'example@synnefo.org': 2}
59
BACKEND_PER_USER = {}
60

    
61
# List of backend IDs used *only* for archipelago.
62
ARCHIPELAGO_BACKENDS = []
63

    
64

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

    
73
# Recommended refresh period for server stats
74
STATS_REFRESH_PERIOD = 60
75

    
76
# The maximum number of file path/content pairs that can be supplied on server
77
# build
78
MAX_PERSONALITY = 5
79

    
80
# The maximum size, in bytes, for each personality file
81
MAX_PERSONALITY_SIZE = 10240
82

    
83

    
84
CYCLADES_BASE_URL = Example('https://cyclades.example.synnefo.org/compute')
85
# Top-level URL of the astakos instance to be used for user management
86
ASTAKOS_BASE_URL = Example('https://astakos.example.synnefo.org/accounts')
87

    
88
# Tune the size of the Astakos http client connection pool
89
# This limit the number of concurrent requests to Astakos.
90
CYCLADES_ASTAKOSCLIENT_POOLSIZE = 50
91

    
92
# Key for password encryption-decryption. After changing this setting, synnefo
93
# will be unable to decrypt all existing Backend passwords. You will need to
94
# store again the new password by using 'snf-manage backend-modify'.
95
# SECRET_ENCRYPTION_KEY may up to 32 bytes. Keys bigger than 32 bytes are not
96
# supported.
97
SECRET_ENCRYPTION_KEY = "Password Encryption Key"
98

    
99
# Astakos service token
100
# The token used for astakos service api calls (e.g. api to retrieve user email
101
# using a user uuid)
102
CYCLADES_SERVICE_TOKEN = ''
103

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