[XM] When two or more domain parameters are given, the xm reboot

command doesn't give a command error. This problem is also 
included in the xm shutdown command. 

This patch checks on domain parameter. If two or more domain 
parameters are given, the command error occurs.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2006-06-29 14:25:35 +01:00
1 parent 0e349a1b9b
commit b4e4e56cb1
1 file changed
+2 -1
+2 -1
View File
@@ -92,7 +92,8 @@ def main_all(opts, args):
shutdown(opts, None, mode, opts.vals.wait)
def main_dom(opts, args):
if len(args) < 1: opts.err('Missing domain')
if len(args) == 0: opts.err('No domain parameter given')
if len(args) > 1: opts.err('No multiple domain parameters allowed')
dom = args[0]
mode = shutdown_mode(opts)
shutdown(opts, [ dom ], mode, opts.vals.wait)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.