Merge pull request #18680 from caesarxuchao/clean-client

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2015-12-15 01:21:32 -08:00
commit b3ccad2341

View File

@ -25,7 +25,6 @@ import (
"github.com/emicklei/go-restful/swagger"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/version"
@ -156,25 +155,6 @@ func (c *Client) ServerAPIVersions() (*unversioned.APIVersions, error) {
return &v, nil
}
type ComponentValidatorInterface interface {
ValidateComponents() (*api.ComponentStatusList, error)
}
// ValidateComponents retrieves and parses the master's self-monitored cluster state.
// TODO: This should hit the versioned endpoint when that is implemented.
func (c *Client) ValidateComponents() (*api.ComponentStatusList, error) {
body, err := c.Get().AbsPath("/validate").DoRaw()
if err != nil {
return nil, err
}
statuses := []api.ComponentStatus{}
if err := json.Unmarshal(body, &statuses); err != nil {
return nil, fmt.Errorf("got '%s': %v", string(body), err)
}
return &api.ComponentStatusList{Items: statuses}, nil
}
// SwaggerSchemaInterface has a method to retrieve the swagger schema. Used in
// client.Interface
type SwaggerSchemaInterface interface {