Statistics
| Branch: | Tag: | Revision:

root / lib / constants.py @ 04ccf5e9

History | View | Annotate | Download (15 kB)

1
#
2
#
3

    
4
# Copyright (C) 2006, 2007 Google Inc.
5
#
6
# This program is free software; you can redistribute it and/or modify
7
# it under the terms of the GNU General Public License as published by
8
# the Free Software Foundation; either version 2 of the License, or
9
# (at your option) any later version.
10
#
11
# This program is distributed in the hope that it will be useful, but
12
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
# General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with this program; if not, write to the Free Software
18
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19
# 02110-1301, USA.
20

    
21

    
22
"""Module holding different constants."""
23

    
24
from ganeti import _autoconf
25

    
26
# various versions
27
PROTOCOL_VERSION = 20
28
RELEASE_VERSION = _autoconf.PACKAGE_VERSION
29
OS_API_V10 = 10
30
OS_API_V15 = 15
31
OS_API_VERSIONS = frozenset([OS_API_V10, OS_API_V15])
32
EXPORT_VERSION = 0
33
RAPI_VERSION = 2
34

    
35

    
36
# Format for CONFIG_VERSION:
37
#   01 03 0123 = 01030123
38
#   ^^ ^^ ^^^^
39
#   |  |  + Configuration version/revision
40
#   |  + Minor version
41
#   + Major version
42
#
43
# It stored as an integer. Make sure not to write an octal number.
44

    
45
# BuildVersion and SplitVersion must be in here because we can't import other
46
# modules. The cfgupgrade tool must be able to read and write version numbers
47
# and thus requires these functions. To avoid code duplication, they're kept in
48
# here.
49

    
50
def BuildVersion(major, minor, revision):
51
  """Calculates int version number from major, minor and revision numbers.
52

53
  Returns: int representing version number
54

55
  """
56
  assert isinstance(major, int)
57
  assert isinstance(minor, int)
58
  assert isinstance(revision, int)
59
  return (1000000 * major +
60
            10000 * minor +
61
                1 * revision)
62

    
63

    
64
def SplitVersion(version):
65
  """Splits version number stored in an int.
66

67
  Returns: tuple; (major, minor, revision)
68

69
  """
70
  assert isinstance(version, int)
71

    
72
  (major, remainder) = divmod(version, 1000000)
73
  (minor, revision) = divmod(remainder, 10000)
74

    
75
  return (major, minor, revision)
76

    
77

    
78
CONFIG_MAJOR = int(_autoconf.VERSION_MAJOR)
79
CONFIG_MINOR = int(_autoconf.VERSION_MINOR)
80
CONFIG_REVISION = 0
81
CONFIG_VERSION = BuildVersion(CONFIG_MAJOR, CONFIG_MINOR, CONFIG_REVISION)
82

    
83
# file paths
84
DATA_DIR = _autoconf.LOCALSTATEDIR + "/lib/ganeti"
85
RUN_DIR = _autoconf.LOCALSTATEDIR + "/run"
86
RUN_GANETI_DIR = RUN_DIR + "/ganeti"
87
BDEV_CACHE_DIR = RUN_GANETI_DIR + "/bdev-cache"
88
DISK_LINKS_DIR = RUN_GANETI_DIR + "/instance-disks"
89
RUN_DIRS_MODE = 0755
90
SOCKET_DIR = RUN_GANETI_DIR + "/socket"
91
SOCKET_DIR_MODE = 0700
92
# keep RUN_GANETI_DIR first here, to make sure all get created when the node
93
# daemon is started (this takes care of RUN_DIR being tmpfs)
94
SUB_RUN_DIRS = [ RUN_GANETI_DIR, BDEV_CACHE_DIR, DISK_LINKS_DIR ]
95
LOCK_DIR = _autoconf.LOCALSTATEDIR + "/lock"
96
SSCONF_LOCK_FILE = LOCK_DIR + "/ganeti-ssconf.lock"
97
CLUSTER_CONF_FILE = DATA_DIR + "/config.data"
98
SSL_CERT_FILE = DATA_DIR + "/server.pem"
99
RAPI_CERT_FILE = DATA_DIR + "/rapi.pem"
100
HMAC_CLUSTER_KEY = DATA_DIR + "/hmac.key"
101
WATCHER_STATEFILE = DATA_DIR + "/watcher.data"
102
INSTANCE_UPFILE = RUN_GANETI_DIR + "/instance-status"
103
SSH_KNOWN_HOSTS_FILE = DATA_DIR + "/known_hosts"
104
RAPI_USERS_FILE = DATA_DIR + "/rapi_users"
105
QUEUE_DIR = DATA_DIR + "/queue"
106
ETC_HOSTS = "/etc/hosts"
107
DEFAULT_FILE_STORAGE_DIR = _autoconf.FILE_STORAGE_DIR
108
SYSCONFDIR = _autoconf.SYSCONFDIR
109

    
110
MASTER_SOCKET = SOCKET_DIR + "/ganeti-master"
111

    
112
NODE_INITD_SCRIPT = _autoconf.SYSCONFDIR + "/init.d/ganeti"
113

    
114
NODED = "ganeti-noded"
115
RAPI = "ganeti-rapi"
116
MASTERD = "ganeti-masterd"
117

    
118
MULTITHREADED_DAEMONS = frozenset([MASTERD])
119

    
120
DAEMONS_PORTS = {
121
  # daemon-name: ("proto", "default-port")
122
  NODED: ("tcp", 1811),
123
  RAPI: ("tcp", 5080),
124
}
125
DEFAULT_NODED_PORT = DAEMONS_PORTS[NODED][1]
126
DEFAULT_RAPI_PORT = DAEMONS_PORTS[RAPI][1]
127

    
128
FIRST_DRBD_PORT = 11000
129
LAST_DRBD_PORT = 14999
130
MASTER_SCRIPT = "ganeti-master"
131

    
132
LOG_DIR = _autoconf.LOCALSTATEDIR + "/log/ganeti/"
133
DAEMONS_LOGFILES = {
134
 # "daemon-name": "logfile"
135
 NODED: LOG_DIR + "node-daemon.log",
136
 RAPI: LOG_DIR + "rapi-daemon.log",
137
 MASTERD: LOG_DIR + "master-daemon.log",
138
}
139
LOG_OS_DIR = LOG_DIR + "os"
140
LOG_WATCHER = LOG_DIR + "watcher.log"
141
LOG_COMMANDS = LOG_DIR + "commands.log"
142
LOG_BURNIN = LOG_DIR + "burnin.log"
143

    
144
OS_SEARCH_PATH = _autoconf.OS_SEARCH_PATH
145
EXPORT_DIR = _autoconf.EXPORT_DIR
146

    
147
EXPORT_CONF_FILE = "config.ini"
148

    
149
XEN_KERNEL = _autoconf.XEN_KERNEL
150
XEN_INITRD = _autoconf.XEN_INITRD
151

    
152
KVM_PATH = _autoconf.KVM_PATH
153
SOCAT_PATH = _autoconf.SOCAT_PATH
154
KVM_MIGRATION_PORT = _autoconf.KVM_MIGRATION_PORT
155

    
156
VALUE_DEFAULT = "default"
157
VALUE_AUTO = "auto"
158
VALUE_GENERATE = "generate"
159
VALUE_NONE = "none"
160
VALUE_TRUE = "true"
161
VALUE_FALSE = "false"
162

    
163
# hooks-related constants
164
HOOKS_BASE_DIR = _autoconf.SYSCONFDIR + "/ganeti/hooks"
165
HOOKS_PHASE_PRE = "pre"
166
HOOKS_PHASE_POST = "post"
167
HOOKS_NAME_CFGUPDATE = "config-update"
168
HOOKS_VERSION = 2
169

    
170
# hooks subject type (what object type does the LU deal with)
171
HTYPE_CLUSTER = "CLUSTER"
172
HTYPE_NODE = "NODE"
173
HTYPE_INSTANCE = "INSTANCE"
174

    
175
HKR_SKIP = 0
176
HKR_FAIL = 1
177
HKR_SUCCESS = 2
178

    
179
# disk template types
180
DT_DISKLESS = "diskless"
181
DT_PLAIN = "plain"
182
DT_DRBD8 = "drbd"
183
DT_FILE = "file"
184

    
185
# the set of network-mirrored disk templates
186
DTS_NET_MIRROR = frozenset([DT_DRBD8])
187

    
188
# the set of non-lvm-based disk templates
189
DTS_NOT_LVM = frozenset([DT_DISKLESS, DT_FILE])
190

    
191
# logical disk types
192
LD_LV = "lvm"
193
LD_DRBD8 = "drbd8"
194
LD_FILE = "file"
195
LDS_BLOCK = frozenset([LD_LV, LD_DRBD8])
196

    
197
# drbd constants
198
DRBD_HMAC_ALG = "md5"
199
DRBD_NET_PROTOCOL = "C"
200

    
201
# file backend driver
202
FD_LOOP = "loop"
203
FD_BLKTAP = "blktap"
204

    
205
# the set of drbd-like disk types
206
LDS_DRBD = frozenset([LD_DRBD8])
207

    
208
# disk access mode
209
DISK_RDONLY = "ro"
210
DISK_RDWR = "rw"
211
DISK_ACCESS_SET = frozenset([DISK_RDONLY, DISK_RDWR])
212

    
213
# disk replacement mode
214
REPLACE_DISK_PRI = "replace_on_primary"    # replace disks on primary
215
REPLACE_DISK_SEC = "replace_on_secondary"  # replace disks on secondary
216
REPLACE_DISK_CHG = "replace_new_secondary" # change secondary node
217

    
218
# lock recalculate mode
219
LOCKS_REPLACE = 'replace'
220
LOCKS_APPEND = 'append'
221

    
222
# instance creation modes
223
INSTANCE_CREATE = "create"
224
INSTANCE_IMPORT = "import"
225

    
226
DISK_TEMPLATES = frozenset([DT_DISKLESS, DT_PLAIN,
227
                            DT_DRBD8, DT_FILE])
228

    
229
FILE_DRIVER = frozenset([FD_LOOP, FD_BLKTAP])
230

    
231
# import/export config options
232
INISECT_EXP = "export"
233
INISECT_INS = "instance"
234

    
235
# dynamic device modification
236

    
237
DDM_ADD = 'add'
238
DDM_REMOVE = 'remove'
239

    
240
# common exit codes
241
EXIT_SUCCESS = 0
242
EXIT_FAILURE = 1
243
EXIT_NOTCLUSTER = 5
244
EXIT_NOTMASTER = 11
245
EXIT_NODESETUP_ERROR = 12
246
EXIT_CONFIRMATION = 13 # need user confirmation
247

    
248
# tags
249
TAG_CLUSTER = "cluster"
250
TAG_NODE = "node"
251
TAG_INSTANCE = "instance"
252
MAX_TAG_LEN = 128
253
MAX_TAGS_PER_OBJ = 4096
254

    
255
# others
256
DEFAULT_BRIDGE = "xen-br0"
257
SYNC_SPEED = 60 * 1024
258
LOCALHOST_IP_ADDRESS = "127.0.0.1"
259
TCP_PING_TIMEOUT = 10
260
GANETI_RUNAS = "root"
261
DEFAULT_VG = "xenvg"
262
BIND_ADDRESS_GLOBAL = "0.0.0.0"
263
MIN_VG_SIZE = 20480
264
DEFAULT_MAC_PREFIX = "aa:00:00"
265
LVM_STRIPECOUNT = _autoconf.LVM_STRIPECOUNT
266

    
267
# RPC constants
268
(RPC_ENCODING_NONE,
269
 RPC_ENCODING_ZLIB_BASE64) = range(2)
270

    
271
# os related constants
272
OS_SCRIPT_CREATE = 'create'
273
OS_SCRIPT_IMPORT = 'import'
274
OS_SCRIPT_EXPORT = 'export'
275
OS_SCRIPT_RENAME = 'rename'
276
OS_SCRIPTS = frozenset([OS_SCRIPT_CREATE, OS_SCRIPT_IMPORT,
277
                        OS_SCRIPT_EXPORT, OS_SCRIPT_RENAME])
278

    
279
# ssh constants
280
SSH_INITD_SCRIPT = _autoconf.SSH_INITD_SCRIPT
281
SSH_CONFIG_DIR = "/etc/ssh/"
282
SSH_HOST_DSA_PRIV = SSH_CONFIG_DIR + "ssh_host_dsa_key"
283
SSH_HOST_DSA_PUB = SSH_HOST_DSA_PRIV + ".pub"
284
SSH_HOST_RSA_PRIV = SSH_CONFIG_DIR + "ssh_host_rsa_key"
285
SSH_HOST_RSA_PUB = SSH_HOST_RSA_PRIV + ".pub"
286
SSH = "ssh"
287
SCP = "scp"
288

    
289
# reboot types
290
INSTANCE_REBOOT_SOFT = "soft"
291
INSTANCE_REBOOT_HARD = "hard"
292
INSTANCE_REBOOT_FULL = "full"
293

    
294
REBOOT_TYPES = frozenset([INSTANCE_REBOOT_SOFT,
295
                          INSTANCE_REBOOT_HARD,
296
                          INSTANCE_REBOOT_FULL])
297

    
298
VTYPE_STRING = 'string'
299
VTYPE_BOOL = 'bool'
300
VTYPE_SIZE = 'size' # size, in MiBs
301
VTYPE_INT = 'int'
302
ENFORCEABLE_TYPES = frozenset([
303
                      VTYPE_STRING,
304
                      VTYPE_BOOL,
305
                      VTYPE_SIZE,
306
                      VTYPE_INT,
307
                      ])
308

    
309
# HV parameter names (global namespace)
310
HV_BOOT_ORDER = "boot_order"
311
HV_CDROM_IMAGE_PATH = "cdrom_image_path"
312
HV_NIC_TYPE = "nic_type"
313
HV_DISK_TYPE = "disk_type"
314
HV_VNC_BIND_ADDRESS = "vnc_bind_address"
315
HV_VNC_TLS = "vnc_tls"
316
HV_VNC_X509 = "vnc_x509_path"
317
HV_VNC_X509_VERIFY = "vnc_x509_verify"
318
HV_ACPI = "acpi"
319
HV_PAE = "pae"
320
HV_KERNEL_ARGS = "kernel_args"
321
HV_KERNEL_PATH = "kernel_path"
322
HV_INITRD_PATH = "initrd_path"
323
HV_ROOT_PATH = "root_path"
324
HV_SERIAL_CONSOLE = "serial_console"
325
HV_USB_MOUSE = "usb_mouse"
326
HV_DEVICE_MODEL = "device_model"
327

    
328
HVS_PARAMETER_TYPES = {
329
  HV_BOOT_ORDER: VTYPE_STRING,
330
  HV_CDROM_IMAGE_PATH: VTYPE_STRING,
331
  HV_NIC_TYPE: VTYPE_STRING,
332
  HV_DISK_TYPE: VTYPE_STRING,
333
  HV_VNC_BIND_ADDRESS: VTYPE_STRING,
334
  HV_VNC_TLS: VTYPE_BOOL,
335
  HV_VNC_X509: VTYPE_STRING,
336
  HV_VNC_X509_VERIFY: VTYPE_BOOL,
337
  HV_ACPI: VTYPE_BOOL,
338
  HV_PAE: VTYPE_BOOL,
339
  HV_KERNEL_PATH: VTYPE_STRING,
340
  HV_KERNEL_ARGS: VTYPE_STRING,
341
  HV_INITRD_PATH: VTYPE_STRING,
342
  HV_ROOT_PATH: VTYPE_STRING,
343
  HV_SERIAL_CONSOLE: VTYPE_BOOL,
344
  HV_USB_MOUSE: VTYPE_STRING,
345
  HV_DEVICE_MODEL: VTYPE_STRING,
346
  }
347

    
348
HVS_PARAMETERS = frozenset(HVS_PARAMETER_TYPES.keys())
349

    
350
# BE parameter names
351
BE_MEMORY = "memory"
352
BE_VCPUS = "vcpus"
353
BE_AUTO_BALANCE = "auto_balance"
354

    
355
BES_PARAMETER_TYPES = {
356
    BE_MEMORY: VTYPE_SIZE,
357
    BE_VCPUS: VTYPE_INT,
358
    BE_AUTO_BALANCE: VTYPE_BOOL,
359
    }
360

    
361
BES_PARAMETERS = frozenset(BES_PARAMETER_TYPES.keys())
362

    
363
# Instance Parameters Profile
364
PP_DEFAULT = "default"
365

    
366
NIC_MODE = "mode"
367
NIC_LINK = "link"
368

    
369
NIC_MODE_BRIDGED = "bridged"
370
NIC_MODE_ROUTED = "routed"
371

    
372
NIC_VALID_MODES = frozenset([NIC_MODE_BRIDGED, NIC_MODE_ROUTED])
373

    
374
NICS_PARAMETER_TYPES = {
375
    NIC_MODE: VTYPE_STRING,
376
    NIC_LINK: VTYPE_STRING,
377
    }
378

    
379
NICS_PARAMETERS = frozenset(NICS_PARAMETER_TYPES.keys())
380

    
381
# Hypervisor constants
382
HT_XEN_PVM = "xen-pvm"
383
HT_FAKE = "fake"
384
HT_XEN_HVM = "xen-hvm"
385
HT_KVM = "kvm"
386
HYPER_TYPES = frozenset([HT_XEN_PVM, HT_FAKE, HT_XEN_HVM, HT_KVM])
387
HTS_REQ_PORT = frozenset([HT_XEN_HVM, HT_KVM])
388

    
389
VNC_BASE_PORT = 5900
390
VNC_PASSWORD_FILE = _autoconf.SYSCONFDIR + "/ganeti/vnc-cluster-password"
391
VNC_DEFAULT_BIND_ADDRESS = '0.0.0.0'
392

    
393
# NIC types
394
HT_NIC_RTL8139 = "rtl8139"
395
HT_NIC_NE2K_PCI = "ne2k_pci"
396
HT_NIC_NE2K_ISA = "ne2k_isa"
397
HT_NIC_I82551 = "i82551"
398
HT_NIC_I85557B = "i82557b"
399
HT_NIC_I8259ER = "i82559er"
400
HT_NIC_PCNET = "pcnet"
401
HT_NIC_E1000 = "e1000"
402
HT_NIC_PARAVIRTUAL = HT_DISK_PARAVIRTUAL = "paravirtual"
403

    
404
HT_HVM_VALID_NIC_TYPES = frozenset([HT_NIC_RTL8139, HT_NIC_NE2K_PCI,
405
                                    HT_NIC_NE2K_ISA, HT_NIC_PARAVIRTUAL])
406
HT_KVM_VALID_NIC_TYPES = frozenset([HT_NIC_RTL8139, HT_NIC_NE2K_PCI,
407
                                    HT_NIC_NE2K_ISA, HT_NIC_I82551,
408
                                    HT_NIC_I85557B, HT_NIC_I8259ER,
409
                                    HT_NIC_PCNET, HT_NIC_E1000,
410
                                    HT_NIC_PARAVIRTUAL])
411
# Disk types
412
HT_DISK_IOEMU = "ioemu"
413
HT_DISK_IDE = "ide"
414
HT_DISK_SCSI = "scsi"
415
HT_DISK_SD = "sd"
416
HT_DISK_MTD = "mtd"
417
HT_DISK_PFLASH = "pflash"
418

    
419
HT_HVM_VALID_DISK_TYPES = frozenset([HT_DISK_PARAVIRTUAL, HT_DISK_IOEMU])
420
HT_KVM_VALID_DISK_TYPES = frozenset([HT_DISK_PARAVIRTUAL, HT_DISK_IDE,
421
                                     HT_DISK_SCSI, HT_DISK_SD, HT_DISK_MTD,
422
                                     HT_DISK_PFLASH])
423

    
424
# Mouse types:
425
HT_MOUSE_MOUSE = "mouse"
426
HT_MOUSE_TABLET = "tablet"
427

    
428
HT_KVM_VALID_MOUSE_TYPES = frozenset([HT_MOUSE_MOUSE, HT_MOUSE_TABLET])
429

    
430
# Boot order
431
HT_BO_CDROM = "cdrom"
432
HT_BO_DISK = "disk"
433
HT_BO_NETWORK = "network"
434

    
435
HT_KVM_VALID_BO_TYPES = frozenset([HT_BO_CDROM, HT_BO_DISK, HT_BO_NETWORK])
436

    
437
# Cluster Verify steps
438
VERIFY_NPLUSONE_MEM = 'nplusone_mem'
439
VERIFY_OPTIONAL_CHECKS = frozenset([VERIFY_NPLUSONE_MEM])
440

    
441
# Node verify constants
442
NV_FILELIST = "filelist"
443
NV_HVINFO = "hvinfo"
444
NV_HYPERVISOR = "hypervisor"
445
NV_INSTANCELIST = "instancelist"
446
NV_LVLIST = "lvlist"
447
NV_NODELIST = "nodelist"
448
NV_NODENETTEST = "node-net-test"
449
NV_VERSION = "version"
450
NV_VGLIST = "vglist"
451
NV_DRBDLIST = "drbd-list"
452

    
453
# Allocator framework constants
454
IALLOCATOR_VERSION = 2
455
IALLOCATOR_DIR_IN = "in"
456
IALLOCATOR_DIR_OUT = "out"
457
IALLOCATOR_MODE_ALLOC = "allocate"
458
IALLOCATOR_MODE_RELOC = "relocate"
459
IALLOCATOR_SEARCH_PATH = _autoconf.IALLOCATOR_SEARCH_PATH
460

    
461
# Job queue
462
JOB_QUEUE_VERSION = 1
463
JOB_QUEUE_LOCK_FILE = QUEUE_DIR + "/lock"
464
JOB_QUEUE_VERSION_FILE = QUEUE_DIR + "/version"
465
JOB_QUEUE_SERIAL_FILE = QUEUE_DIR + "/serial"
466
JOB_QUEUE_ARCHIVE_DIR = QUEUE_DIR + "/archive"
467
JOB_QUEUE_DRAIN_FILE = QUEUE_DIR + "/drain"
468
JOB_QUEUE_SIZE_HARD_LIMIT = 5000
469
JOB_QUEUE_SIZE_SOFT_LIMIT = JOB_QUEUE_SIZE_HARD_LIMIT * 0.8
470

    
471
JOB_ID_TEMPLATE = r"\d+"
472

    
473
# unchanged job return
474
JOB_NOTCHANGED = "nochange"
475

    
476
# Job status
477
JOB_STATUS_QUEUED = "queued"
478
JOB_STATUS_WAITLOCK = "waiting"
479
JOB_STATUS_CANCELING = "canceling"
480
JOB_STATUS_RUNNING = "running"
481
JOB_STATUS_CANCELED = "canceled"
482
JOB_STATUS_SUCCESS = "success"
483
JOB_STATUS_ERROR = "error"
484

    
485
# OpCode status
486
# not yet finalized
487
OP_STATUS_QUEUED = "queued"
488
OP_STATUS_WAITLOCK = "waiting"
489
OP_STATUS_CANCELING = "canceling"
490
OP_STATUS_RUNNING = "running"
491
# finalized
492
OP_STATUS_CANCELED = "canceled"
493
OP_STATUS_SUCCESS = "success"
494
OP_STATUS_ERROR = "error"
495
OPS_FINALIZED = frozenset([OP_STATUS_CANCELED,
496
                           OP_STATUS_SUCCESS,
497
                           OP_STATUS_ERROR])
498

    
499
# Execution log types
500
ELOG_MESSAGE = "message"
501
ELOG_PROGRESS = "progress"
502

    
503
# max dynamic devices
504
MAX_NICS = 8
505
MAX_DISKS = 16
506

    
507
# SSCONF keys
508
SS_CLUSTER_NAME = "cluster_name"
509
SS_CLUSTER_TAGS = "cluster_tags"
510
SS_FILE_STORAGE_DIR = "file_storage_dir"
511
SS_MASTER_CANDIDATES = "master_candidates"
512
SS_MASTER_IP = "master_ip"
513
SS_MASTER_NETDEV = "master_netdev"
514
SS_MASTER_NODE = "master_node"
515
SS_NODE_LIST = "node_list"
516
SS_OFFLINE_NODES = "offline_nodes"
517
SS_ONLINE_NODES = "online_nodes"
518
SS_INSTANCE_LIST = "instance_list"
519
SS_RELEASE_VERSION = "release_version"
520

    
521
# cluster wide default parameters
522
DEFAULT_ENABLED_HYPERVISOR = HT_XEN_PVM
523

    
524
HVC_DEFAULTS = {
525
  HT_XEN_PVM: {
526
    HV_KERNEL_PATH: "/boot/vmlinuz-2.6-xenU",
527
    HV_INITRD_PATH: '',
528
    HV_ROOT_PATH: '/dev/sda1',
529
    HV_KERNEL_ARGS: 'ro',
530
    },
531
  HT_XEN_HVM: {
532
    HV_BOOT_ORDER: "cd",
533
    HV_CDROM_IMAGE_PATH: '',
534
    HV_NIC_TYPE: HT_NIC_RTL8139,
535
    HV_DISK_TYPE: HT_DISK_PARAVIRTUAL,
536
    HV_VNC_BIND_ADDRESS: '0.0.0.0',
537
    HV_ACPI: True,
538
    HV_PAE: True,
539
    HV_KERNEL_PATH: "/usr/lib/xen/boot/hvmloader",
540
    HV_DEVICE_MODEL: "/usr/lib/xen/bin/qemu-dm",
541
    },
542
  HT_KVM: {
543
    HV_KERNEL_PATH: "/boot/vmlinuz-2.6-kvmU",
544
    HV_INITRD_PATH: '',
545
    HV_KERNEL_ARGS: 'ro',
546
    HV_ROOT_PATH: '/dev/vda1',
547
    HV_ACPI: True,
548
    HV_SERIAL_CONSOLE: True,
549
    HV_VNC_BIND_ADDRESS: '',
550
    HV_VNC_TLS: False,
551
    HV_VNC_X509: '',
552
    HV_VNC_X509_VERIFY: False,
553
    HV_CDROM_IMAGE_PATH: '',
554
    HV_BOOT_ORDER: HT_BO_DISK,
555
    HV_NIC_TYPE: HT_NIC_PARAVIRTUAL,
556
    HV_DISK_TYPE: HT_DISK_PARAVIRTUAL,
557
    HV_USB_MOUSE: '',
558
    },
559
  HT_FAKE: {
560
    },
561
  }
562

    
563
BEC_DEFAULTS = {
564
  BE_MEMORY: 128,
565
  BE_VCPUS: 1,
566
  BE_AUTO_BALANCE: True,
567
  }
568

    
569
NICC_DEFAULTS = {
570
  NIC_MODE: NIC_MODE_BRIDGED,
571
  NIC_LINK: DEFAULT_BRIDGE,
572
  }
573

    
574
MASTER_POOL_SIZE_DEFAULT = 10