Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
cc-env: Remove "CC" from output.
Browse files Browse the repository at this point in the history
Change `CCCapable` in `cc-env` / `kata-env` output to
`VMContainerCapable` to make it project agnostic.

Fixes #967.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
  • Loading branch information
jodh-intel committed Jan 31, 2018
1 parent 3aec1b6 commit 1412ff8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
22 changes: 11 additions & 11 deletions cc-env.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
//
// XXX: Increment for every change to the output format
// (meaning any change to the EnvInfo type).
const formatVersion = "1.0.6"
const formatVersion = "1.0.7"

// MetaInfo stores information on the format of the output itself
type MetaInfo struct {
Expand Down Expand Up @@ -112,10 +112,10 @@ type DistroInfo struct {

// HostInfo stores host details
type HostInfo struct {
Kernel string
Distro DistroInfo
CPU CPUInfo
CCCapable bool
Kernel string
Distro DistroInfo
CPU CPUInfo
VMContainerCapable bool
}

// EnvInfo collects all information that will be displayed by the
Expand Down Expand Up @@ -173,10 +173,10 @@ func getHostInfo() (HostInfo, error) {
return HostInfo{}, err
}

hostCCCapable := true
hostVMContainerCapable := true
err = hostIsClearContainersCapable(procCPUInfo)
if err != nil {
hostCCCapable = false
hostVMContainerCapable = false
}

hostDistro := DistroInfo{
Expand All @@ -190,10 +190,10 @@ func getHostInfo() (HostInfo, error) {
}

ccHost := HostInfo{
Kernel: hostKernelVersion,
Distro: hostDistro,
CPU: hostCPU,
CCCapable: hostCCCapable,
Kernel: hostKernelVersion,
Distro: hostDistro,
CPU: hostCPU,
VMContainerCapable: hostVMContainerCapable,
}

return ccHost, nil
Expand Down
8 changes: 4 additions & 4 deletions cc-env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ func getExpectedHostDetails(tmpdir string) (HostInfo, error) {
}

expectedHostDetails := HostInfo{
Kernel: expectedKernelVersion,
Distro: expectedDistro,
CPU: expectedCPU,
CCCapable: false,
Kernel: expectedKernelVersion,
Distro: expectedDistro,
CPU: expectedCPU,
VMContainerCapable: false,
}

testProcCPUInfo := filepath.Join(tmpdir, "cpuinfo")
Expand Down

0 comments on commit 1412ff8

Please sign in to comment.