From ff27b00f5ad234fe1a38459b56e42975ed6a8535 Mon Sep 17 00:00:00 2001 From: Omer Faruk Bayram Date: Thu, 30 Mar 2023 13:22:02 +0300 Subject: [PATCH] ch-remote: fixed `ShutdownVmm` and `Shutdown` commands Fixed `ShutdownVmm` and `Shutdown` commands to call the correct API endpoint. Signed-off-by: Omer Faruk Bayram --- src/bin/ch-remote.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/ch-remote.rs b/src/bin/ch-remote.rs index e39ff4710..a1692b3dc 100644 --- a/src/bin/ch-remote.rs +++ b/src/bin/ch-remote.rs @@ -329,7 +329,8 @@ fn do_command(toplevel: &TopLevel) -> Result<(), Error> { simple_api_command(&mut socket, "PUT", "delete", None).map_err(Error::ApiClient) } SubCommandEnum::ShutdownVmm(_) => { - simple_api_command(&mut socket, "PUT", "shutdown-vmm", None).map_err(Error::ApiClient) + simple_api_full_command(&mut socket, "PUT", "vmm.shutdown", None) + .map_err(Error::ApiClient) } SubCommandEnum::Resume(_) => { simple_api_command(&mut socket, "PUT", "resume", None).map_err(Error::ApiClient) @@ -353,8 +354,7 @@ fn do_command(toplevel: &TopLevel) -> Result<(), Error> { simple_api_full_command(&mut socket, "GET", "vmm.ping", None).map_err(Error::ApiClient) } SubCommandEnum::Shutdown(_) => { - simple_api_full_command(&mut socket, "PUT", "vmm.shutdown", None) - .map_err(Error::ApiClient) + simple_api_command(&mut socket, "PUT", "shutdown", None).map_err(Error::ApiClient) } SubCommandEnum::Resize(ref config) => { resize_api_command(&mut socket, config.cpus, &config.memory, &config.balloon)