direct-io.hg

changeset 10968:51c227428166

[XEND] Fix fallback and error path for domain destruction by domid,
or of non-existent domain.

I saw the following error message. (A domain of domain name XXX does
not exist.)

# xm list
Name ID Mem(MiB) VCPUs State Time(s)
Domain-0 0 1019 2 r----- 29.8
# xm destroy XXX
Error: an integer is required

This patch fixes it to print the following error message.

# xm list
Name ID Mem(MiB) VCPUs State Time(s)
Domain-0 0 1019 2 r----- 35.8
# xm destroy XXX
Error: the domain 'XXX' does not exist.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Aug 08 10:03:30 2006 +0100 (2006-08-08)
parents 82230c3273e3
children 9e061d0dc394
files tools/python/xen/xend/XendDomain.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomain.py	Tue Aug 08 09:59:47 2006 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomain.py	Tue Aug 08 10:03:30 2006 +0100
     1.3 @@ -402,9 +402,9 @@ class XendDomain:
     1.4              val = dominfo.destroy()
     1.5          else:
     1.6              try:
     1.7 -                val = xc.domain_destroy(domid)
     1.8 +                val = xc.domain_destroy(int(domid))
     1.9              except Exception, ex:
    1.10 -                raise XendError(str(ex))
    1.11 +                raise XendInvalidDomain(str(domid))
    1.12          return val       
    1.13  
    1.14      def domain_migrate(self, domid, dst, live=False, resource=0, port=0):