Merge pull request #56997 from hzxuzhonghu/cleanup

Automatic merge from submit-queue (batch tested with PRs 56997, 57008, 56984, 56975, 56955). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

code cleanup in discovery client

**What this PR does / why we need it**:

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 78c7c6f8597ac5990c2891d4f73ae0b9a1c013ce
This commit is contained in:
Kubernetes Publisher 2017-12-16 15:23:44 -08:00
commit 99b02d3434
2 changed files with 708 additions and 717 deletions

164
Godeps/Godeps.json generated
View File

@ -372,331 +372,331 @@
},
{
"ImportPath": "k8s.io/api/admissionregistration/v1alpha1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/admissionregistration/v1beta1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/apps/v1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/apps/v1beta1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/apps/v1beta2",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/authentication/v1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/authentication/v1beta1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/authorization/v1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/authorization/v1beta1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/autoscaling/v1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/autoscaling/v2beta1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/batch/v1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/batch/v1beta1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/batch/v2alpha1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/certificates/v1beta1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/core/v1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/events/v1beta1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/extensions/v1beta1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/imagepolicy/v1alpha1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/networking/v1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/policy/v1beta1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/rbac/v1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/rbac/v1alpha1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/rbac/v1beta1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/scheduling/v1alpha1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/settings/v1alpha1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/storage/v1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/storage/v1alpha1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/api/storage/v1beta1",
"Rev": "168091b7c0f030ab2b7a9fc734598880a116c6b8"
"Rev": "3b9b65abe0aa9d995259dad1469ff3e1f18802c5"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1alpha1",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/fields",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/labels",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/selection",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/types",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/cache",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/clock",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/version",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/watch",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
"Rev": "a88dfdd72a1d320a70de7ab2bb3375cfdf237864"
},
{
"ImportPath": "k8s.io/kube-openapi/pkg/common",

View File

@ -395,15 +395,6 @@ func NewDiscoveryClient(c restclient.Interface) *DiscoveryClient {
return &DiscoveryClient{restClient: c, LegacyPrefix: "/api"}
}
func stringDoesntExistIn(str string, slice []string) bool {
for _, s := range slice {
if s == str {
return false
}
}
return true
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *DiscoveryClient) RESTClient() restclient.Interface {