Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (2.9 kB)

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

    
6

    
7
DEBUG = False
8

    
9
# Top-level URL for deployment. Numerous other URLs depend on this.
10
APP_INSTALL_URL = "https://host:port"
11

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

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

    
20
#
21
# Network Configuration
22
#
23

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

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

    
44
# The default firewall profile that will be in effect if no tags are defined
45
DEFAULT_FIREWALL_PROFILE = 'DISABLED'
46

    
47
# our REST API would prefer to be explicit about trailing slashes
48
APPEND_SLASH = False
49

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

    
56
# Quota
57
#
58
# Maximum number of VMs a user is allowed to have
59
MAX_VMS_PER_USER = 3
60

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

    
69
# Recommended refresh period for server stats
70
STATS_REFRESH_PERIOD = 60
71

    
72
# The maximum number of file path/content pairs that can be supplied on server
73
# build
74
MAX_PERSONALITY = 5
75

    
76
# The maximum size, in bytes, for each personality file
77
MAX_PERSONALITY_SIZE = 10240
78

    
79
# Available storage types to be used as disk templates
80
GANETI_DISK_TEMPLATES = ('blockdev', 'diskless', 'drbd', 'file', 'plain',
81
                         'rbd',  'sharedfile')
82
DEFAULT_GANETI_DISK_TEMPLATE = 'drbd'
83

    
84
# The URL of an astakos instance that will be used for user authentication
85
ASTAKOS_URL = 'https://astakos.okeanos.grnet.gr/im/authenticate'