cli: Fix kata-env output on Power

[ port from runtime commit 9ac39116b08148de8e66abfca2e5407bc153af87 ]

kata-env output always shows "VMContainerCapable=false" on Power.
This patch fixes the same.

Signed-off-by: bpradipt@in.ibm.com
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
Pradipta Kr. Banerjee 2020-06-29 21:06:28 -07:00 committed by Peng Tao
parent 94fdec4e4b
commit d66f21921b
2 changed files with 1 additions and 5 deletions

View File

@ -9,7 +9,6 @@ import (
"encoding/json"
"errors"
"os"
runtim "runtime"
"strings"
"github.com/BurntSushi/toml"
@ -223,9 +222,6 @@ func getHostInfo() (HostInfo, error) {
}
hostVMContainerCapable := true
if runtim.GOARCH == "ppc64le" {
hostVMContainerCapable = false
}
details := vmContainerCapableDetails{
cpuInfoFile: procCPUInfo,

View File

@ -10,7 +10,7 @@ import "testing"
func getExpectedHostDetails(tmpdir string) (HostInfo, error) {
expectedVendor := ""
expectedModel := "POWER8"
expectedVMContainerCapable := false
expectedVMContainerCapable := true
return genericGetExpectedHostDetails(tmpdir, expectedVendor, expectedModel, expectedVMContainerCapable)
}