diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-07-30 09:23:11 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-07-30 09:23:11 +0100 |
commit | 78130b8a28e13c6a773cac7429dfba4a1f3c3e26 (patch) | |
tree | 4354d84bea0f793c07f2520714a7f56d4b76f05d | |
parent | cacc71b1730ef62500480671014c1e64300e0871 (diff) | |
download | xen-78130b8a28e13c6a773cac7429dfba4a1f3c3e26.tar.gz xen-78130b8a28e13c6a773cac7429dfba4a1f3c3e26.tar.bz2 xen-78130b8a28e13c6a773cac7429dfba4a1f3c3e26.zip |
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>
-rw-r--r-- | tools/python/xen/xm/shutdown.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/python/xen/xm/shutdown.py b/tools/python/xen/xm/shutdown.py index 2e6294a979..125dcc1e80 100644 --- a/tools/python/xen/xm/shutdown.py +++ b/tools/python/xen/xm/shutdown.py @@ -144,9 +144,10 @@ def main_all(opts, args): def main_dom(opts, args): if len(args) == 0: opts.err('No domain parameter given') if len(args) > 1: opts.err('No multiple domain parameters allowed') - dom = sxp.child_value(server.xend.domain(args[0]), 'name') if serverType == SERVER_XEN_API: - dom = get_single_vm(dom) + dom = get_single_vm(args[0]) + else: + dom = sxp.child_value(server.xend.domain(args[0]), 'name') mode = shutdown_mode(opts) shutdown(opts, [ dom ], mode, opts.vals.wait) |