3
# Copyright (C) International Business Machines Corp., 2005
4
# Author: Paul Larson <pl@us.ibm.com>
9
# 1) Create domain, verify it's up with console
10
# 2) shut down the domain, verify it's down
15
from XmTestLib import *
17
# Create a domain (default XmTestDomain, with our ramdisk)
18
domain = XmTestDomain()
22
console = domain.start()
23
except DomainError, e:
25
print "Failed to create test domain because:"
30
# Make sure a command succeeds
31
run = console.runCmd("ls /bin")
32
except ConsoleError, e:
38
# Stop the domain (nice shutdown)
39
status, output = traceCommand("xm shutdown %s" % domain.getName())
41
FAIL("good xm shutdown exited with bad %i != 0" % status)
43
# Verify the domain is gone
46
if isDomainRunning(domain.getName()):
48
traceCommand("xm list")
49
if isDomainRunning(domain.getName()):
50
FAIL("Guest domain failed to shutdown")
52
FAIL("I had to run an xm list to update xend state!")