re-run client-gen

This commit is contained in:
deads2k
2017-01-19 13:24:01 -05:00
parent 32a2c2d05c
commit c587b8a21e
332 changed files with 802 additions and 888 deletions

View File

@@ -17,11 +17,11 @@ go_library(
tags = ["automanaged"],
deps = [
"//cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion:go_default_library",
"//pkg/client/restclient:go_default_library",
"//pkg/client/typed/discovery:go_default_library",
"//plugin/pkg/client/auth:go_default_library",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/client-go/pkg/util/flowcontrol",
"//vendor:k8s.io/client-go/rest",
],
)
@@ -30,10 +30,7 @@ go_test(
srcs = ["clientset_test.go"],
library = ":go_default_library",
tags = ["automanaged"],
deps = [
"//pkg/client/restclient:go_default_library",
"//vendor:k8s.io/client-go/pkg/util/flowcontrol",
],
deps = ["//vendor:k8s.io/client-go/pkg/util/flowcontrol"],
)
filegroup(

View File

@@ -19,8 +19,8 @@ package test_internalclientset
import (
"github.com/golang/glog"
"k8s.io/client-go/pkg/util/flowcontrol"
rest "k8s.io/client-go/rest"
internalversiontestgroup "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion"
restclient "k8s.io/kubernetes/pkg/client/restclient"
discovery "k8s.io/kubernetes/pkg/client/typed/discovery"
_ "k8s.io/kubernetes/plugin/pkg/client/auth"
)
@@ -54,7 +54,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface {
}
// NewForConfig creates a new Clientset for the given config.
func NewForConfig(c *restclient.Config) (*Clientset, error) {
func NewForConfig(c *rest.Config) (*Clientset, error) {
configShallowCopy := *c
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
@@ -76,7 +76,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) {
// NewForConfigOrDie creates a new Clientset for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *restclient.Config) *Clientset {
func NewForConfigOrDie(c *rest.Config) *Clientset {
var cs Clientset
cs.TestgroupClient = internalversiontestgroup.NewForConfigOrDie(c)
@@ -85,7 +85,7 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset {
}
// New creates a new Clientset for the given RESTClient.
func New(c restclient.Interface) *Clientset {
func New(c rest.Interface) *Clientset {
var cs Clientset
cs.TestgroupClient = internalversiontestgroup.New(c)

View File

@@ -19,10 +19,10 @@ go_library(
deps = [
"//cmd/libs/go2idl/client-gen/test_apis/testgroup:go_default_library",
"//pkg/api:go_default_library",
"//pkg/client/restclient:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/types",
"//vendor:k8s.io/apimachinery/pkg/watch",
"//vendor:k8s.io/client-go/rest",
],
)

View File

@@ -19,13 +19,13 @@ go_library(
"//cmd/libs/go2idl/client-gen/test_apis/testgroup:go_default_library",
"//cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion:go_default_library",
"//pkg/api:go_default_library",
"//pkg/client/restclient:go_default_library",
"//pkg/client/testing/core:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/labels",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
"//vendor:k8s.io/apimachinery/pkg/types",
"//vendor:k8s.io/apimachinery/pkg/watch",
"//vendor:k8s.io/client-go/rest",
],
)

View File

@@ -17,8 +17,8 @@ limitations under the License.
package fake
import (
rest "k8s.io/client-go/rest"
internalversion "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion"
restclient "k8s.io/kubernetes/pkg/client/restclient"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
@@ -32,7 +32,7 @@ func (c *FakeTestgroup) TestTypes(namespace string) internalversion.TestTypeInte
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeTestgroup) RESTClient() restclient.Interface {
var ret *restclient.RESTClient
func (c *FakeTestgroup) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View File

@@ -17,18 +17,18 @@ limitations under the License.
package internalversion
import (
rest "k8s.io/client-go/rest"
api "k8s.io/kubernetes/pkg/api"
restclient "k8s.io/kubernetes/pkg/client/restclient"
)
type TestgroupInterface interface {
RESTClient() restclient.Interface
RESTClient() rest.Interface
TestTypesGetter
}
// TestgroupClient is used to interact with features provided by the testgroup.k8s.io group.
type TestgroupClient struct {
restClient restclient.Interface
restClient rest.Interface
}
func (c *TestgroupClient) TestTypes(namespace string) TestTypeInterface {
@@ -36,12 +36,12 @@ func (c *TestgroupClient) TestTypes(namespace string) TestTypeInterface {
}
// NewForConfig creates a new TestgroupClient for the given config.
func NewForConfig(c *restclient.Config) (*TestgroupClient, error) {
func NewForConfig(c *rest.Config) (*TestgroupClient, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := restclient.RESTClientFor(&config)
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
@@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*TestgroupClient, error) {
// NewForConfigOrDie creates a new TestgroupClient for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *restclient.Config) *TestgroupClient {
func NewForConfigOrDie(c *rest.Config) *TestgroupClient {
client, err := NewForConfig(c)
if err != nil {
panic(err)
@@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *TestgroupClient {
}
// New creates a new TestgroupClient for the given RESTClient.
func New(c restclient.Interface) *TestgroupClient {
func New(c rest.Interface) *TestgroupClient {
return &TestgroupClient{c}
}
func setConfigDefaults(config *restclient.Config) error {
func setConfigDefaults(config *rest.Config) error {
// if testgroup group is not registered, return an error
g, err := api.Registry.Group("testgroup.k8s.io")
if err != nil {
@@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error {
}
config.APIPath = "/apis"
if config.UserAgent == "" {
config.UserAgent = restclient.DefaultKubernetesUserAgent()
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group {
copyGroupVersion := g.GroupVersion
@@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error {
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *TestgroupClient) RESTClient() restclient.Interface {
func (c *TestgroupClient) RESTClient() rest.Interface {
if c == nil {
return nil
}

View File

@@ -20,9 +20,9 @@ import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
testgroup "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup"
api "k8s.io/kubernetes/pkg/api"
restclient "k8s.io/kubernetes/pkg/client/restclient"
)
// TestTypesGetter has a method to return a TestTypeInterface.
@@ -47,7 +47,7 @@ type TestTypeInterface interface {
// testTypes implements TestTypeInterface
type testTypes struct {
client restclient.Interface
client rest.Interface
ns string
}