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

View File

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