Statistics
| Branch: | Tag: | Revision:

root / snf-app / synnefo / app_settings / default / api.py @ 7fb619a0

History | View | Annotate | Download (2.6 kB)

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

    
6
from deploy import *
7

    
8
# The API implementation needs to accept and return absolute references
9
# to its resources. Thus, it needs to know its public URL.
10
API_ROOT_URL = APP_INSTALL_URL + '/api'
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
# Synnefo assigns this link id to NICs connected on the public network.
21
# An IP pool should be associated with this link by the Ganeti administrator.
22
GANETI_PUBLIC_LINK = 'snf_public'
23
# This link id is assigned to NICs that should be isolated from anything else
24
# (e.g., right before the NIC gets deleted).
25
# This value is also hardcoded in a fixture in db/fixtures/initial_data.json.
26
GANETI_NULL_LINK = 'snf_null'
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:protected'
37
GANETI_FIREWALL_DISABLED_TAG = 'synnefo:network:0:unprotected'
38
GANETI_FIREWALL_PROTECTED_TAG = 'synnefo:network:0:limited'
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
# Ignore disk size specified by flavor, always build the
47
# machine with a 4GB (in the case of Windows: 14GB) disk.
48
# This setting is helpful in development setups.
49
#
50
IGNORE_FLAVOR_DISK_SIZES = False
51

    
52
# Quota
53
#
54
# Maximum number of VMs a user is allowed to have
55
MAX_VMS_PER_USER = 3
56

    
57
# URL templates for the stat graphs.
58
# The API implementation replaces '%s' with the encrypted backend id.
59
# FIXME: For now we do not encrypt the backend id.
60
CPU_BAR_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/cpu-bar.png'
61
CPU_TIMESERIES_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/cpu-ts.png'
62
NET_BAR_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/net-bar.png'
63
NET_TIMESERIES_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/net-ts.png'
64

    
65
# Recommended refresh period for server stats
66
STATS_REFRESH_PERIOD = 60
67

    
68
# The maximum number of file path/content pairs that can be supplied on server
69
# build
70
MAX_PERSONALITY = 5
71

    
72
# The maximum size, in bytes, for each personality file
73
MAX_PERSONALITY_SIZE = 10240
74

    
75
# Available storage types to be used as disk templates
76
GANETI_DISK_TEMPLATES = ('blockdev', 'diskless', 'drbd', 'file', 'plain',
77
                         'rbd',  'sharedfile')
78
DEFAULT_GANETI_DISK_TEMPLATE = 'drbd'