Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / app_settings / default / api.py @ 5061546f

History | View | Annotate | Download (3.4 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-1'
27
GANETI_PRIVATE_BRIDGE = 'br2990'
28
# This link id is assigned to NICs that should be isolated from anything else
29
# (e.g., right before the NIC gets deleted).
30
# This value is also hardcoded in a fixture in db/fixtures/initial_data.json.
31
GANETI_NULL_LINK = 'snf_public'
32

    
33
# The pool of private network links to use is
34
# $GANETI_LINK_PREFIX{1..$GANETI_MAX_LINK_NUMBER}.
35
#
36
# The prefix to use for private network links.
37
GANETI_LINK_PREFIX = 'prv'
38
# The number of private network links to use.
39
GANETI_MAX_LINK_NUMBER = 100
40
# The first mac prefix to use
41
GANETI_BASE_MAC_PREFIX = 'aa:00:01'
42
# The number of mac prefixes to use.
43
GANETI_MAX_MAC_PREFIX_NUMBER = 4096
44

    
45
# Firewalling
46
GANETI_FIREWALL_ENABLED_TAG = 'synnefo:network:0:protected'
47
GANETI_FIREWALL_DISABLED_TAG = 'synnefo:network:0:unprotected'
48
GANETI_FIREWALL_PROTECTED_TAG = 'synnefo:network:0:limited'
49

    
50

    
51
# The default firewall profile that will be in effect if no tags are defined
52
DEFAULT_FIREWALL_PROFILE = 'DISABLED'
53

    
54
# our REST API would prefer to be explicit about trailing slashes
55
APPEND_SLASH = False
56

    
57
# Ignore disk size specified by flavor, always build the
58
# machine with a 4GB (in the case of Windows: 14GB) disk.
59
# This setting is helpful in development setups.
60
#
61
IGNORE_FLAVOR_DISK_SIZES = False
62

    
63
# Quota
64
#
65
# Maximum number of VMs a user is allowed to have.
66
MAX_VMS_PER_USER = 3
67

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

    
72
# Maximum number of networks a user is allowed to have.
73
MAX_NETWORKS_PER_USER = 5
74

    
75
# Override maximum number of private networks for specific users.
76
# e.g. NETWORKS_USER_QUOTA = {'user1@grnet.gr': 5, 'user2@grnet.gr': 10}
77
NETWORKS_USER_QUOTA = {}
78

    
79
# URL templates for the stat graphs.
80
# The API implementation replaces '%s' with the encrypted backend id.
81
# FIXME: For now we do not encrypt the backend id.
82
CPU_BAR_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/cpu-bar.png'
83
CPU_TIMESERIES_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/cpu-ts.png'
84
NET_BAR_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/net-bar.png'
85
NET_TIMESERIES_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/net-ts.png'
86

    
87
# Recommended refresh period for server stats
88
STATS_REFRESH_PERIOD = 60
89

    
90
# The maximum number of file path/content pairs that can be supplied on server
91
# build
92
MAX_PERSONALITY = 5
93

    
94
# The maximum size, in bytes, for each personality file
95
MAX_PERSONALITY_SIZE = 10240
96

    
97
# Available storage types to be used as disk templates
98
GANETI_DISK_TEMPLATES = ('blockdev', 'diskless', 'drbd', 'file', 'plain',
99
                         'rbd',  'sharedfile')
100
DEFAULT_GANETI_DISK_TEMPLATE = 'drbd'
101

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