Refactor runtimeversion to be a command instead of option

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
Mrunal Patel 2016-07-15 14:28:52 -07:00
parent 588103f670
commit 32876892fc
2 changed files with 17 additions and 22 deletions

View file

@ -1,9 +1,6 @@
package server
import (
"errors"
"strings"
pb "github.com/kubernetes/kubernetes/pkg/kubelet/api/v1alpha1/runtime"
"golang.org/x/net/context"
)
@ -20,13 +17,6 @@ func (s *Server) Version(ctx context.Context, req *pb.VersionRequest) (*pb.Versi
return nil, nil
}
// FIXME: the logic here may need to be changed. How to determine whether the client/server APIs are compatible?
if strings.Compare(version, *req.Version) != 0 {
return &pb.VersionResponse{
Version: &version,
}, errors.New("The version of the gRPC server API is different from the version of the gRPC client API.")
}
runtimeName := "runc"
runtimeVersion, err := execRuncVersion("runc", "-v")