ia64/xen-unstable

view tools/examples/xi_destroydom.py @ 973:9c7b2b238a29

bitkeeper revision 1.627 (3fbe416fwrLO59ruKs6PLJilJwY1SQ)

xi_destroydom.py:
Fix example domain destroy script.
author kaf24@scramble.cl.cam.ac.uk
date Fri Nov 21 16:46:39 2003 +0000 (2003-11-21)
parents 895f1ca085a7
children
line source
1 #!/usr/bin/env python
3 #
4 # Destroy specified domain.
5 #
7 import Xc, sys, re
9 xc = Xc.new()
11 if len(sys.argv) < 2:
12 print "Specify a domain identifier"
13 sys.exit()
15 if (len(sys.argv) > 2) and re.match( 'force', sys.argv[2] ):
16 xc.domain_destroy( dom=int(sys.argv[1]), force=1 )
17 else:
18 xc.domain_destroy( dom=int(sys.argv[1]), force=0 )