Make expandResourceShortcuts part of RESTMapper on client

This commit is contained in:
Clayton Coleman
2014-12-28 00:27:52 -05:00
parent a1ee782df5
commit 8a4f225941
14 changed files with 185 additions and 96 deletions

View File

@@ -21,7 +21,6 @@ import (
"github.com/spf13/cobra"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl"
)
@@ -32,14 +31,13 @@ func (f *Factory) NewCmdVersion(out io.Writer) *cobra.Command {
Run: func(cmd *cobra.Command, args []string) {
if GetFlagBool(cmd, "client") {
kubectl.GetClientVersion(out)
} else {
config, err := f.ClientConfig.ClientConfig()
checkErr(err)
client, err := client.New(config)
checkErr(err)
kubectl.GetVersion(out, client)
return
}
client, err := f.Client(cmd)
checkErr(err)
kubectl.GetVersion(out, client)
},
}
cmd.Flags().BoolP("client", "c", false, "Client version only (no server required)")