mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-11 21:02:34 +00:00
cli: Show available guest protection in env output
Show available guest protections in the `kata-runtime env` output. Also bump the formatVersion. Fixes: #1982 Signed-off-by: Yujia Qiao <rapiz3142@gmail.com>
This commit is contained in:
parent
2063b13805
commit
6cc8000cae
@ -130,13 +130,14 @@ type DistroInfo struct {
|
||||
|
||||
// HostInfo stores host details
|
||||
type HostInfo struct {
|
||||
Kernel string
|
||||
Architecture string
|
||||
Distro DistroInfo
|
||||
CPU CPUInfo
|
||||
Memory MemoryInfo
|
||||
VMContainerCapable bool
|
||||
SupportVSocks bool
|
||||
AvailableGuestProtections []string
|
||||
Kernel string
|
||||
Architecture string
|
||||
Distro DistroInfo
|
||||
CPU CPUInfo
|
||||
Memory MemoryInfo
|
||||
VMContainerCapable bool
|
||||
SupportVSocks bool
|
||||
}
|
||||
|
||||
// NetmonInfo stores netmon details
|
||||
@ -241,14 +242,17 @@ func getHostInfo() (HostInfo, error) {
|
||||
|
||||
memoryInfo := getMemoryInfo()
|
||||
|
||||
availableGuestProtection := vc.AvailableGuestProtections()
|
||||
|
||||
host := HostInfo{
|
||||
Kernel: hostKernelVersion,
|
||||
Architecture: arch,
|
||||
Distro: hostDistro,
|
||||
CPU: hostCPU,
|
||||
Memory: memoryInfo,
|
||||
VMContainerCapable: hostVMContainerCapable,
|
||||
SupportVSocks: supportVSocks,
|
||||
Kernel: hostKernelVersion,
|
||||
Architecture: arch,
|
||||
Distro: hostDistro,
|
||||
CPU: hostCPU,
|
||||
Memory: memoryInfo,
|
||||
AvailableGuestProtections: availableGuestProtection,
|
||||
VMContainerCapable: hostVMContainerCapable,
|
||||
SupportVSocks: supportVSocks,
|
||||
}
|
||||
|
||||
return host, nil
|
||||
|
@ -179,10 +179,10 @@ const (
|
||||
|
||||
var guestProtectionStr = [...]string{
|
||||
noneProtection: "none",
|
||||
tdxProtection: "tdx",
|
||||
sevProtection: "sev",
|
||||
pefProtection: "pef",
|
||||
seProtection: "se",
|
||||
sevProtection: "sev",
|
||||
tdxProtection: "tdx",
|
||||
}
|
||||
|
||||
func (gp guestProtection) String() string {
|
||||
|
Loading…
Reference in New Issue
Block a user