Files
xen/tools/xm-test/tests/create/04_create_conflictname_neg.py
T
emellor@leeni.uk.xensource.com 57a3f4ca82 Second step toward a new network infrastructure, move XmConsole to be
in XenDomain. The devices we will add, like network, will need to run
console commands when a domain is started. So I have made console be
a part of domain object, which it's tied to anyway.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
2006-05-04 14:22:17 +01:00

42 lines
912 B
Python

#!/usr/bin/python
# Copyright (C) International Business Machines Corp., 2005
# Author: Li Ge <lge@us.ibm.com>
# Test Description:
# Negative Test:
# Test for creating domains with same name. Verify fail.
import sys
import re
from XmTestLib import *
# Create a domain with name "default" (default XmTestDomain, with our ramdisk)
domain1 = XmTestDomain("default")
#start it
try:
domain1.start(noConsole=True)
except DomainError, e:
if verbose:
print "Failed to create test domain1 because:"
print e.extra
FAIL(str(e))
# Create second domain with same name "default"
domain2 = XmTestDomain("default")
#start it
eyecatcher = "Pass"
try:
domain2.start(noConsole=True)
except DomainError, e:
eyecatcher = "Fail"
# Stop the domain1 (nice shutdown)
domain1.stop()
if eyecatcher != "Fail":
domain2.stop()
FAIL("xm create let me create a duplicate-named domain!")