blob: 27e68a5debe05f5511fff1a73df5ee5f7824bb20 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#!/usr/bin/python
# Copyright (C) International Business Machines Corp., 2005
# Author: Dan Smith <danms@us.ibm.com>
import time
from XmTestLib import *
if ENABLE_VMX_SUPPORT:
SKIP("Save currently not supported for VMX domains")
domain = XmTestDomain()
try:
domain.start()
except DomainError, e:
if verbose:
print "Failed to create test domain because:"
print e.extra
FAIL(str(e))
# Make sure the domain isn't DOA
try:
console = XmConsole(domain.getName())
except ConsoleError, e:
FAIL(str(e))
console.closeConsole()
# Save it out
try:
s, o = traceCommand("xm save %s /tmp/test.state" % domain.getName(),
timeout=30)
except TimeoutError, e:
FAIL(str(e))
if s != 0:
FAIL("save command exited %i != 0" % s)
# Make sure it's gone
if isDomainRunning(domain.getName()):
FAIL("Domain still running after save!")
|