mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-27 15:57:09 +00:00
runtime-rs: Reintroduce Vsock and add it to the DeviceType enum
As vsock device will be used in Qemu or other VMMs, the Vsoock is reintroduced to DeviceType enum. Fixes: #8474 Signed-off-by: Pavel Mores <pmores@redhat.com> Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
This commit is contained in:
parent
e31dbc94a5
commit
1a6b45d3b7
@ -10,7 +10,7 @@ use crate::device::driver::vhost_user_blk::VhostUserBlkDevice;
|
|||||||
use crate::{
|
use crate::{
|
||||||
BlockConfig, BlockDevice, HybridVsockConfig, HybridVsockDevice, Hypervisor as hypervisor,
|
BlockConfig, BlockDevice, HybridVsockConfig, HybridVsockDevice, Hypervisor as hypervisor,
|
||||||
NetworkConfig, NetworkDevice, ShareFsConfig, ShareFsDevice, VfioConfig, VfioDevice,
|
NetworkConfig, NetworkDevice, ShareFsConfig, ShareFsDevice, VfioConfig, VfioDevice,
|
||||||
VhostUserConfig, VsockConfig,
|
VhostUserConfig, VsockConfig, VsockDevice,
|
||||||
};
|
};
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
@ -38,6 +38,7 @@ pub enum DeviceType {
|
|||||||
Network(NetworkDevice),
|
Network(NetworkDevice),
|
||||||
ShareFs(ShareFsDevice),
|
ShareFs(ShareFsDevice),
|
||||||
HybridVsock(HybridVsockDevice),
|
HybridVsock(HybridVsockDevice),
|
||||||
|
Vsock(VsockDevice),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for DeviceType {
|
impl fmt::Display for DeviceType {
|
||||||
|
@ -67,6 +67,7 @@ impl DragonballInner {
|
|||||||
DeviceType::ShareFs(sharefs) => self
|
DeviceType::ShareFs(sharefs) => self
|
||||||
.add_share_fs_device(&sharefs.config)
|
.add_share_fs_device(&sharefs.config)
|
||||||
.context("add share fs device"),
|
.context("add share fs device"),
|
||||||
|
DeviceType::Vsock(_) => todo!(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user