Remove GetAPIPodStatus from runtime interface

This commit is contained in:
Random-Liu
2016-01-26 17:46:15 -08:00
committed by Lantao Liu
parent 41b12a18d9
commit 7b4cdb6f8f
8 changed files with 41 additions and 372 deletions

View File

@@ -104,8 +104,7 @@ type DockerManager struct {
// means that some entries may be recycled before a pod has been
// deleted.
reasonCache reasonInfoCache
// TODO(yifan): Record the pull failure so we can eliminate the image checking
// in GetAPIPodStatus()?
// TODO(yifan): Record the pull failure so we can eliminate the image checking?
// Lower level docker image puller.
dockerPuller DockerPuller
@@ -419,17 +418,6 @@ func (dm *DockerManager) inspectContainer(id string, podName, podNamespace strin
return &status, "", nil
}
// GetAPIPodStatus returns docker related status for all containers in the pod
// spec.
func (dm *DockerManager) GetAPIPodStatus(pod *api.Pod) (*api.PodStatus, error) {
// Get the pod status.
podStatus, err := dm.GetPodStatus(pod.UID, pod.Name, pod.Namespace)
if err != nil {
return nil, err
}
return dm.ConvertPodStatusToAPIPodStatus(pod, podStatus)
}
func (dm *DockerManager) ConvertPodStatusToAPIPodStatus(pod *api.Pod, podStatus *kubecontainer.PodStatus) (*api.PodStatus, error) {
var apiPodStatus api.PodStatus
uid := pod.UID