ia64/xen-unstable

changeset 18197:bd9823ec7097

xm, xenapi: Fix a problem in xm client for domain shutdown

Xm did not shut down domains anymore when run in xen-api mode due to a
'None' parameter being passed to xend when looking up a domain. This
fixes the problem.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jul 30 09:23:11 2008 +0100 (2008-07-30)
parents 4160bc28f0fb
children eba86724cc07
files tools/python/xen/xm/shutdown.py
line diff
     1.1 --- a/tools/python/xen/xm/shutdown.py	Wed Jul 30 09:22:24 2008 +0100
     1.2 +++ b/tools/python/xen/xm/shutdown.py	Wed Jul 30 09:23:11 2008 +0100
     1.3 @@ -144,9 +144,10 @@ def main_all(opts, args):
     1.4  def main_dom(opts, args):
     1.5      if len(args) == 0: opts.err('No domain parameter given')
     1.6      if len(args) >  1: opts.err('No multiple domain parameters allowed')
     1.7 -    dom = sxp.child_value(server.xend.domain(args[0]), 'name')
     1.8      if serverType == SERVER_XEN_API:
     1.9 -        dom = get_single_vm(dom)
    1.10 +        dom = get_single_vm(args[0])
    1.11 +    else:
    1.12 +        dom = sxp.child_value(server.xend.domain(args[0]), 'name')
    1.13      mode = shutdown_mode(opts)  
    1.14      shutdown(opts, [ dom ], mode, opts.vals.wait)
    1.15