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

Method vm_add_net

vmm/src/api/dbus/mod.rs:157–164  ·  view source on GitHub ↗
(&self, net_config: String)

Source from the content-addressed store, hash-verified

155 }
156
157 async fn vm_add_net(&self, net_config: String) -> Result<Optional<String>> {
158 let mut net_config: NetConfig = serde_json::from_str(&net_config).map_err(api_error)?;
159 if net_config.fds.is_some() {
160 warn!("Ignoring FDs sent via the D-Bus request body");
161 net_config.fds = None;
162 }
163 self.vm_action(&VmAddNet, net_config).await
164 }
165
166 async fn vm_add_pmem(&self, pmem_config: String) -> Result<Optional<String>> {
167 let pmem_config = serde_json::from_str(&pmem_config).map_err(api_error)?;

Callers 1

requestMethod · 0.45

Calls 1

vm_actionMethod · 0.80

Tested by

no test coverage detected