Merge pull request #7657 from yujuhong/docker_runtime

Removes RunPod in the Runtime interface
pull/6/head
Victor Marmol 2015-05-01 16:09:44 -07:00
commit c5a86387a4
3 changed files with 4 additions and 6 deletions

View File

@ -128,11 +128,11 @@ func (f *FakeRuntime) GetPods(all bool) ([]*Pod, error) {
return f.Podlist, f.Err
}
func (f *FakeRuntime) RunPod(pod *api.Pod, volumeMap map[string]volume.VolumePlugin) error {
func (f *FakeRuntime) SyncPod(pod *api.Pod, _ Pod, _ api.PodStatus) error {
f.Lock()
defer f.Unlock()
f.CalledFunctions = append(f.CalledFunctions, "RunPod")
f.CalledFunctions = append(f.CalledFunctions, "SyncPod")
f.StartedPods = append(f.StartedPods, string(pod.UID))
for _, c := range pod.Spec.Containers {
f.StartedContainers = append(f.StartedContainers, c.Name)

View File

@ -23,7 +23,6 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/types"
"github.com/GoogleCloudPlatform/kubernetes/pkg/volume"
)
type Version interface {
@ -44,8 +43,6 @@ type Runtime interface {
// specifies whether the runtime returns all containers including those already
// exited and dead containers (used for garbage collection).
GetPods(all bool) ([]*Pod, error)
// RunPod starts all the containers of a pod within a namespace.
RunPod(*api.Pod, map[string]volume.Volume) error
// Syncs the running pod into the desired pod.
SyncPod(pod *api.Pod, runningPod Pod, podStatus api.PodStatus) error
// KillPod kills all the containers of a pod.

View File

@ -54,7 +54,8 @@ const (
maxReasonCacheEntries = 200
)
// TODO(yjhong): DockerManager should implement the Runtime interface.
// DockerManager implements the Runtime interface.
var _ kubecontainer.Runtime = &DockerManager{}
type DockerManager struct {
client DockerInterface