| 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)?; |