mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-09 03:48:05 +00:00
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:
parent
94fdec4e4b
commit
d66f21921b
@ -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,
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user