ia64/xen-unstable

view tools/python/xen/xend/XendAPIConstants.py @ 16883:666573856c59

(Re)introduce notion of crashed VM power state.

The crashed power state is necessary to allow both core-dumping a
crashed but preserved VM and renaming/restarting a crashed VM.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jan 25 13:28:25 2008 +0000 (2008-01-25)
parents dc32de8329eb
children 58e5e9ae0f8d
line source
1 #============================================================================
2 # This library is free software; you can redistribute it and/or
3 # modify it under the terms of version 2.1 of the GNU Lesser General Public
4 # License as published by the Free Software Foundation.
5 #
6 # This library is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9 # Lesser General Public License for more details.
10 #
11 # You should have received a copy of the GNU Lesser General Public
12 # License along with this library; if not, write to the Free Software
13 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14 #============================================================================
15 # Copyright (C) 2006-2007 XenSource Ltd.
16 #============================================================================
18 #
19 # Xen API Enums
20 #
22 XEN_API_VM_POWER_STATE = [
23 'Halted',
24 'Paused',
25 'Running',
26 'Suspended',
27 'Halted',
28 'Crashed',
29 'Unknown'
30 ]
32 XEN_API_VM_POWER_STATE_HALTED = 0
33 XEN_API_VM_POWER_STATE_PAUSED = 1
34 XEN_API_VM_POWER_STATE_RUNNING = 2
35 XEN_API_VM_POWER_STATE_SUSPENDED = 3
36 XEN_API_VM_POWER_STATE_SHUTTINGDOWN = 4
37 XEN_API_VM_POWER_STATE_CRASHED = 5
38 XEN_API_VM_POWER_STATE_UNKNOWN = 6
40 XEN_API_ON_NORMAL_EXIT = [
41 'destroy',
42 'restart',
43 ]
45 XEN_API_ON_CRASH_BEHAVIOUR = [
46 'destroy',
47 'coredump_and_destroy',
48 'restart',
49 'coredump_and_restart',
50 'preserve',
51 'rename_restart'
52 ]
54 XEN_API_VBD_MODE = ['RO', 'RW']
55 XEN_API_VDI_TYPE = ['system', 'user', 'ephemeral']
56 XEN_API_VBD_TYPE = ['CD', 'Disk']
57 XEN_API_TASK_STATUS_TYPE = ['pending', 'success', 'failure']
58 XEN_API_CONSOLE_PROTOCOL = ['vt100', 'rfb', 'rdp']