From 468b6bdab05c942d6c9812cf5065ff90cad261d4 Mon Sep 17 00:00:00 2001 From: Adrian Catangiu Date: Wed, 30 Jun 2021 13:56:19 +0300 Subject: [PATCH] vmresources: json describe mmds-config Signed-off-by: Adrian Catangiu --- src/vmm/src/resources.rs | 5 +---- src/vmm/src/vmm_config/mmds.rs | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/vmm/src/resources.rs b/src/vmm/src/resources.rs index 7b0da9e1260..d4115637308 100644 --- a/src/vmm/src/resources.rs +++ b/src/vmm/src/resources.rs @@ -159,9 +159,6 @@ impl VmResources { .as_ref() .map(BootSourceConfig::from) .unwrap_or_default(); - - // TODO: go through net devices and check for mmds addr - let mmds_config: Option = None; let vmm_config = VmmConfig { balloon_device: self.balloon.get_config().ok(), block_devices: self.block.configs(), @@ -169,7 +166,7 @@ impl VmResources { logger: None, machine_config: Some(self.vm_config.clone()), metrics: None, - mmds_config, + mmds_config: self.mmds_config.clone(), net_devices: self.net_builder.configs(), vsock_device: self.vsock.config(), }; diff --git a/src/vmm/src/vmm_config/mmds.rs b/src/vmm/src/vmm_config/mmds.rs index 430306c3d12..1c4d1091542 100644 --- a/src/vmm/src/vmm_config/mmds.rs +++ b/src/vmm/src/vmm_config/mmds.rs @@ -6,7 +6,7 @@ use std::fmt::{Display, Result}; use std::net::Ipv4Addr; /// Keeps the MMDS configuration. -#[derive(Debug, Deserialize, PartialEq, Serialize)] +#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[serde(deny_unknown_fields)] pub struct MmdsConfig { /// MMDS IPv4 configured address.