mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-26 02:24:21 +01:00
This reverts commit 196661bc0d.
Reverting because cri-o with devicemapper started
to fail after this commit was merged.
Fixes: #1574.
Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
32 lines
837 B
Go
32 lines
837 B
Go
// Copyright (c) 2019 hyper.sh
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
package types
|
|
|
|
// ContainerState is a sandbox state structure.
|
|
type ContainerState struct {
|
|
State StateString `json:"state"`
|
|
|
|
BlockDeviceID string
|
|
|
|
// File system of the rootfs incase it is block device
|
|
Fstype string `json:"fstype"`
|
|
|
|
// CgroupPath is the cgroup hierarchy where sandbox's processes
|
|
// including the hypervisor are placed.
|
|
CgroupPath string `json:"cgroupPath,omitempty"`
|
|
}
|
|
|
|
// Valid checks that the container state is valid.
|
|
func (state *ContainerState) Valid() bool {
|
|
return state.State.valid()
|
|
}
|
|
|
|
// ValidTransition returns an error if we want to move to
|
|
// an unreachable state.
|
|
func (state *ContainerState) ValidTransition(oldState StateString, newState StateString) error {
|
|
return state.State.validTransition(oldState, newState)
|
|
}
|