mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Add HTTP API to resize the VM
Currently only increasing the number of vCPUs is supported but in the future it will be extended. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
use crate::api::http_endpoint::{VmActionHandler, VmCreate, VmInfo, VmmPing, VmmShutdown};
|
||||
use crate::api::http_endpoint::{
|
||||
VmActionHandler, VmCreate, VmInfo, VmResize, VmmPing, VmmShutdown,
|
||||
};
|
||||
use crate::api::{ApiRequest, VmAction};
|
||||
use crate::{Error, Result};
|
||||
use micro_http::{HttpServer, MediaType, Request, Response, StatusCode, Version};
|
||||
@@ -59,6 +61,7 @@ lazy_static! {
|
||||
r.routes.insert(endpoint!("/vm.reboot"), Box::new(VmActionHandler::new(VmAction::Reboot)));
|
||||
r.routes.insert(endpoint!("/vmm.shutdown"), Box::new(VmmShutdown {}));
|
||||
r.routes.insert(endpoint!("/vmm.ping"), Box::new(VmmPing {}));
|
||||
r.routes.insert(endpoint!("/vm.resize"), Box::new(VmResize {}));
|
||||
|
||||
r
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user