vmm/api: Add vm.add-fs route

Currently unimplemented. Once implemented, this API will allow for
creating virtio-fs devices in the VM after it has booted.

Signed-off-by: Dean Sheather <dean@coder.com>
This commit is contained in:
Dean Sheather
2020-04-14 18:13:48 +10:00
committed by Sebastien Boeuf
parent d35e775ed9
commit bb2139a408
7 changed files with 74 additions and 9 deletions

View File

@@ -487,6 +487,24 @@ impl EndpointHandler for VmAddDisk {
}
}
// /api/v1/vm.add-fs handler
pub struct VmAddFs {}
impl EndpointHandler for VmAddFs {
fn handle_request(
&self,
req: &Request,
_api_notifier: EventFd,
_api_sender: Sender<ApiRequest>,
) -> Response {
match req.method() {
// Not implemented.
Method::Put => Response::new(Version::Http11, StatusCode::NotImplemented),
_ => Response::new(Version::Http11, StatusCode::BadRequest),
}
}
}
// /api/v1/vm.add-pmem handler
pub struct VmAddPmem {}