Statistics
| Branch: | Tag: | Revision:

root / settings.d / 20-api.conf @ 6fa6822a

History | View | Annotate | Download (2 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

    
26
# The pool of private network links to use is
27
# $GANETI_LINK_PREFIX{1..$GANETI_MAX_LINK_NUMBER}.
28
#
29
# The prefix to use for private network links.
30
GANETI_LINK_PREFIX = 'prv'
31
# The number of private network links to use.
32
GANETI_MAX_LINK_NUMBER = 100
33
# Firewalling
34
GANETI_FIREWALL_ENABLED_TAG = 'synnefo:network:0:enabled'
35
GANETI_FIREWALL_DISABLED_TAG = 'synnefo:network:0:disabled'
36
GANETI_FIREWALL_PROTECTED_TAG = 'synnefo:network:0:protected'
37

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

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

    
44
# Maximum number of VMs a user is allowed to have
45
MAX_VMS_PER_USER = 2
46

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

    
55
# Recommended refresh period for server stats
56
STATS_REFRESH_PERIOD = 60