CRI: Rename container/sandbox states

The enum constants are not namespaced. The shorter, unspecifc names are likely
to cause naming conflicts in the future.

Also replace "SandBox" with "Sandbox" in the API.
This commit is contained in:
Yu-Ju Hong
2016-11-01 12:58:04 -07:00
parent 37122c2636
commit 8a6285d844
18 changed files with 391 additions and 389 deletions

View File

@@ -72,13 +72,13 @@ func (c containerStatusByCreated) Less(i, j int) bool { return c[i].CreatedAt.Af
// toKubeContainerState converts runtimeApi.ContainerState to kubecontainer.ContainerState.
func toKubeContainerState(state runtimeApi.ContainerState) kubecontainer.ContainerState {
switch state {
case runtimeApi.ContainerState_CREATED:
case runtimeApi.ContainerState_CONTAINER_CREATED:
return kubecontainer.ContainerStateCreated
case runtimeApi.ContainerState_RUNNING:
case runtimeApi.ContainerState_CONTAINER_RUNNING:
return kubecontainer.ContainerStateRunning
case runtimeApi.ContainerState_EXITED:
case runtimeApi.ContainerState_CONTAINER_EXITED:
return kubecontainer.ContainerStateExited
case runtimeApi.ContainerState_UNKNOWN:
case runtimeApi.ContainerState_CONTAINER_UNKNOWN:
return kubecontainer.ContainerStateUnknown
}