mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Implement the /api/v1/vm.info endpoint
This, for now, returns the VM config and its state. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
extern crate threadpool;
|
||||
|
||||
use crate::api::http_endpoint::{VmActionHandler, VmCreate};
|
||||
use crate::api::http_endpoint::{VmActionHandler, VmCreate, VmInfo};
|
||||
use crate::api::{ApiRequest, VmAction};
|
||||
use crate::{Error, Result};
|
||||
use micro_http::{HttpConnection, Request, Response, StatusCode, Version};
|
||||
@@ -56,6 +56,7 @@ lazy_static! {
|
||||
|
||||
r.routes.insert(endpoint!("/vm.create"), Box::new(VmCreate {}));
|
||||
r.routes.insert(endpoint!("/vm.boot"), Box::new(VmActionHandler::new(VmAction::Boot)));
|
||||
r.routes.insert(endpoint!("/vm.info"), Box::new(VmInfo {}));
|
||||
r.routes.insert(endpoint!("/vm.shutdown"), Box::new(VmActionHandler::new(VmAction::Shutdown)));
|
||||
r.routes.insert(endpoint!("/vm.reboot"), Box::new(VmActionHandler::new(VmAction::Reboot)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user