Statistics
| Branch: | Tag: | Revision:

root / settings.d / 20-api.conf @ 9da33f32

History | View | Annotate | Download (2.1 kB)

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

    
6
# The API implementation needs to accept and return absolute references
7
# to its resources. Thus, it needs to know its public URL.
8
API_ROOT_URL = APP_INSTALL_URL + '/api'
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
# Synnefo assigns this link id to NICs connected on the public network.
19
# An IP pool should be associated with this link by the Ganeti administrator.
20
GANETI_PUBLIC_LINK = 'snf_public'
21
# This link id is assigned to NICs that should be isolated from anything else
22
# (e.g., right before the NIC gets deleted).
23
# This value is also hardcoded in a fixture in db/fixtures/initial_data.json.
24
GANETI_NULL_LINK = 'snf_null'
25
# Public IPv6: A /64 IPv6 prefix for autoconfiguration with EUI-64 addresses
26
PUBLIC_IPV6_PREFIX = "2001:db8::/64"
27
#
28
# The pool of private network links to use is
29
# $GANETI_LINK_PREFIX{1..$GANETI_MAX_LINK_NUMBER}.
30
#
31
# The prefix to use for private network links.
32
GANETI_LINK_PREFIX = 'prv'
33
# The number of private network links to use.
34
GANETI_MAX_LINK_NUMBER = 100
35
# Firewalling
36
GANETI_FIREWALL_ENABLED_TAG = 'synnefo:network:0:enabled'
37
GANETI_FIREWALL_DISABLED_TAG = 'synnefo:network:0:disabled'
38
GANETI_FIREWALL_PROTECTED_TAG = 'synnefo:network:0:protected'
39

    
40
# The default firewall profile that will be in effect if no tags are defined
41
DEFAULT_FIREWALL_PROFILE = 'DISABLED'
42

    
43
# our REST API would prefer to be explicit about trailing slashes
44
APPEND_SLASH = False
45

    
46
# Maximum number of VMs a user is allowed to have
47
MAX_VMS_PER_USER = 2
48

    
49
# URL templates for the stat graphs.
50
# The API implementation replaces '%s' with the encrypted backend id.
51
# FIXME: For now we do not encrypt the backend id.
52
CPU_BAR_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/cpu-bar.png'
53
CPU_TIMESERIES_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/cpu-ts.png'
54
NET_BAR_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/net-bar.png'
55
NET_TIMESERIES_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/net-ts.png'
56

    
57
# Recommended refresh period for server stats
58
STATS_REFRESH_PERIOD = 60