root / snf-cyclades-app / synnefo / app_settings / default / api.py @ ce55f211
History | View | Annotate | Download (3.1 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_LINK = '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 |
# VMs user/quota map.
|
62 |
VMS_USER_QUOTA = {} |
63 |
|
64 |
# Maximum number of networks a user is allowed to have
|
65 |
MAX_NETWORKS_PER_USER = 5
|
66 |
|
67 |
# Networks user/quota map.
|
68 |
NETWORKS_USER_QUOTA = {} |
69 |
|
70 |
# URL templates for the stat graphs.
|
71 |
# The API implementation replaces '%s' with the encrypted backend id.
|
72 |
# FIXME: For now we do not encrypt the backend id.
|
73 |
CPU_BAR_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/cpu-bar.png'
|
74 |
CPU_TIMESERIES_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/cpu-ts.png'
|
75 |
NET_BAR_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/net-bar.png'
|
76 |
NET_TIMESERIES_GRAPH_URL = 'http://stats.okeanos.grnet.gr/%s/net-ts.png'
|
77 |
|
78 |
# Recommended refresh period for server stats
|
79 |
STATS_REFRESH_PERIOD = 60
|
80 |
|
81 |
# The maximum number of file path/content pairs that can be supplied on server
|
82 |
# build
|
83 |
MAX_PERSONALITY = 5
|
84 |
|
85 |
# The maximum size, in bytes, for each personality file
|
86 |
MAX_PERSONALITY_SIZE = 10240
|
87 |
|
88 |
# Available storage types to be used as disk templates
|
89 |
GANETI_DISK_TEMPLATES = ('blockdev', 'diskless', 'drbd', 'file', 'plain', |
90 |
'rbd', 'sharedfile') |
91 |
DEFAULT_GANETI_DISK_TEMPLATE = 'drbd'
|
92 |
|
93 |
# The URL of an astakos instance that will be used for user authentication
|
94 |
ASTAKOS_URL = 'https://astakos.okeanos.grnet.gr/im/authenticate'
|