MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / request

Method request

vmm/src/api/mod.rs:658–677  ·  view source on GitHub ↗
(
        &self,
        config: Self::RequestBody,
        response_sender: Sender<ApiResponse>,
    )

Source from the content-addressed store, hash-verified

656 type ResponseBody = Option<Body>;
657
658 fn request(
659 &self,
660 config: Self::RequestBody,
661 response_sender: Sender<ApiResponse>,
662 ) -> ApiRequest {
663 Box::new(move |vmm| {
664 info!("API request event: VmAddDevice {config:?}");
665
666 let response = vmm
667 .vm_add_device(config)
668 .map_err(ApiError::VmAddDevice)
669 .map(ApiResponsePayload::VmAction);
670
671 response_sender
672 .send(response)
673 .map_err(VmmError::ApiResponseSend)?;
674
675 Ok(false)
676 })
677 }
678
679 fn send(
680 &self,

Callers 1

get_responseFunction · 0.80

Calls 15

newFunction · 0.85
VmmPingClass · 0.70
mapMethod · 0.45
vm_add_deviceMethod · 0.45
sendMethod · 0.45
vm_add_diskMethod · 0.45
vm_add_fsMethod · 0.45
vm_add_pmemMethod · 0.45
vm_add_netMethod · 0.45
vm_add_vdpaMethod · 0.45
vm_add_vsockMethod · 0.45

Tested by

no test coverage detected