blob: e4727b33e37e4c783c3f82143ebd0b4c9b40a61c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
package org.xenoserver.cmdline;
import java.util.LinkedList;
import org.xenoserver.control.CommandDomainStop;
import org.xenoserver.control.CommandFailedException;
import org.xenoserver.control.Defaults;
public class ParseDomainStop extends CommandParser {
public void parse(Defaults d, LinkedList args)
throws ParseFailedException, CommandFailedException {
int domain_id = getIntParameter(args, 'n', d.domainNumber);
if (domain_id == 0) {
throw new ParseFailedException("Expected -n<domain_id>");
}
String output = new CommandDomainStop(d, domain_id).execute();
if (output != null)
System.out.println(output);
}
public String getName() {
return "stop";
}
public String getUsage() {
return "[-n<domain_id>]";
}
public String getHelpText() {
return "Stop the specified domain.";
}
}
|