Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / app_settings / default / api.py @ 5f62b4d4

History | View | Annotate | Download (3.2 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
# Name of the public network in Ganeti. An IP pool should be associated with
25
# this network 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
# Override maximum number of VMs for specific users.
62
# e.g. VMS_USER_QUOTA = {'user1@grnet.gr': 5, 'user2@grnet.gr': 10}
63
VMS_USER_QUOTA = {}
64

    
65
# Maximum number of networks a user is allowed to have.
66
MAX_NETWORKS_PER_USER = 5
67

    
68
# Override maximum number of private networks for specific users.
69
# e.g. NETWORKS_USER_QUOTA = {'user1@grnet.gr': 5, 'user2@grnet.gr': 10}
70
NETWORKS_USER_QUOTA = {}
71

    
72
# URL templates for the stat graphs.
73
# The API implementation replaces '%s' with the encrypted backend id.
74
# FIXME: For now we do not encrypt the backend id.
75
CPU_BAR_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/cpu-bar.png'
76
CPU_TIMESERIES_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/cpu-ts.png'
77
NET_BAR_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/net-bar.png'
78
NET_TIMESERIES_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/net-ts.png'
79

    
80
# Recommended refresh period for server stats
81
STATS_REFRESH_PERIOD = 60
82

    
83
# The maximum number of file path/content pairs that can be supplied on server
84
# build
85
MAX_PERSONALITY = 5
86

    
87
# The maximum size, in bytes, for each personality file
88
MAX_PERSONALITY_SIZE = 10240
89

    
90
# Available storage types to be used as disk templates
91
GANETI_DISK_TEMPLATES = ('blockdev', 'diskless', 'drbd', 'file', 'plain',
92
                         'rbd',  'sharedfile')
93
DEFAULT_GANETI_DISK_TEMPLATE = 'drbd'
94

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