mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-07-15 21:57:15 +00:00
ch-remote: Add support for vmm.shutdown
Signed-off-by: Shuaiyi Zhang <zhangsy28@lenovo.com>
This commit is contained in:
parent
00becda899
commit
389264351e
@ -342,6 +342,8 @@ fn do_command(matches: &ArgMatches) -> Result<(), Error> {
|
|||||||
Some("ping") => {
|
Some("ping") => {
|
||||||
simple_api_full_command(&mut socket, "GET", "vmm.ping", None).map_err(Error::ApiClient)
|
simple_api_full_command(&mut socket, "GET", "vmm.ping", None).map_err(Error::ApiClient)
|
||||||
}
|
}
|
||||||
|
Some("shutdown-vmm") => simple_api_full_command(&mut socket, "PUT", "vmm.shutdown", None)
|
||||||
|
.map_err(Error::ApiClient),
|
||||||
Some("resize") => resize_api_command(
|
Some("resize") => resize_api_command(
|
||||||
&mut socket,
|
&mut socket,
|
||||||
matches
|
matches
|
||||||
@ -680,9 +682,8 @@ fn main() {
|
|||||||
.about("Create VM from a JSON configuration")
|
.about("Create VM from a JSON configuration")
|
||||||
.arg(Arg::new("path").index(1).default_value("-")),
|
.arg(Arg::new("path").index(1).default_value("-")),
|
||||||
)
|
)
|
||||||
.subcommand(
|
.subcommand(Command::new("ping").about("Ping the VMM to check for API server availability"))
|
||||||
Command::new("ping").about("Ping the VMM to check for API server availability"),
|
.subcommand(Command::new("shutdown-vmm").about("Shutdown the VMM"));
|
||||||
);
|
|
||||||
|
|
||||||
let matches = app.get_matches();
|
let matches = app.get_matches();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user