Statistics
| Branch: | Tag: | Revision:

root / snf-app / synnefo / app_settings / default / api.py @ 07d104d8

History | View | Annotate | Download (2.7 kB)

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

    
6
# Top-level URL for deployment. Numerous other URLs depend on this.
7
APP_INSTALL_URL = "https://host:port"
8

    
9
# The API implementation needs to accept and return absolute references
10
# to its resources. Thus, it needs to know its public URL.
11
API_ROOT_URL = APP_INSTALL_URL + '/api'
12

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

    
17
#
18
# Network Configuration
19
#
20

    
21
# Synnefo assigns this link id to NICs connected on the public network.
22
# An IP pool should be associated with this link by the Ganeti administrator.
23
GANETI_PUBLIC_LINK = 'snf_public'
24
# This link id is assigned to NICs that should be isolated from anything else
25
# (e.g., right before the NIC gets deleted).
26
# This value is also hardcoded in a fixture in db/fixtures/initial_data.json.
27
GANETI_NULL_LINK = 'snf_null'
28

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

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

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

    
47
# Ignore disk size specified by flavor, always build the
48
# machine with a 4GB (in the case of Windows: 14GB) disk.
49
# This setting is helpful in development setups.
50
#
51
IGNORE_FLAVOR_DISK_SIZES = False
52

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

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

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

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

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

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