Merge pull request #63861 from deads2k/client-09-clean

Automatic merge from submit-queue (batch tested with PRs 63589, 63644, 63861, 63872, 63847). 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>.

remove service.deletecollection since the server doesn't support it

Updates the generated service client to match the API available.

@kubernetes/sig-api-machinery-pr-reviews 
@kubernetes/api-reviewers 

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-05-15 17:09:14 -07:00 committed by GitHub
commit 49e9322d4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2 additions and 39 deletions

View File

@ -3407,6 +3407,7 @@ type ServicePort struct {
} }
// +genclient // +genclient
// +genclient:skipVerbs=deleteCollection
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Service is a named abstraction of software service (for example, mysql) consisting of local port // Service is a named abstraction of software service (for example, mysql) consisting of local port
@ -4010,6 +4011,7 @@ const (
// +genclient // +genclient
// +genclient:nonNamespaced // +genclient:nonNamespaced
// +genclient:skipVerbs=deleteCollection
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Namespace provides a scope for Names. // Namespace provides a scope for Names.

View File

@ -112,14 +112,6 @@ func (c *FakeNamespaces) Delete(name string, options *v1.DeleteOptions) error {
return err return err
} }
// DeleteCollection deletes a collection of objects.
func (c *FakeNamespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(namespacesResource, listOptions)
_, err := c.Fake.Invokes(action, &core_v1.NamespaceList{})
return err
}
// Patch applies the patch and returns the patched namespace. // Patch applies the patch and returns the patched namespace.
func (c *FakeNamespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Namespace, err error) { func (c *FakeNamespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Namespace, err error) {
obj, err := c.Fake. obj, err := c.Fake.

View File

@ -120,14 +120,6 @@ func (c *FakeServices) Delete(name string, options *v1.DeleteOptions) error {
return err return err
} }
// DeleteCollection deletes a collection of objects.
func (c *FakeServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(servicesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &core_v1.ServiceList{})
return err
}
// Patch applies the patch and returns the patched service. // Patch applies the patch and returns the patched service.
func (c *FakeServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Service, err error) { func (c *FakeServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Service, err error) {
obj, err := c.Fake. obj, err := c.Fake.

View File

@ -39,7 +39,6 @@ type NamespaceInterface interface {
Update(*v1.Namespace) (*v1.Namespace, error) Update(*v1.Namespace) (*v1.Namespace, error)
UpdateStatus(*v1.Namespace) (*v1.Namespace, error) UpdateStatus(*v1.Namespace) (*v1.Namespace, error)
Delete(name string, options *meta_v1.DeleteOptions) error Delete(name string, options *meta_v1.DeleteOptions) error
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.Namespace, error) Get(name string, options meta_v1.GetOptions) (*v1.Namespace, error)
List(opts meta_v1.ListOptions) (*v1.NamespaceList, error) List(opts meta_v1.ListOptions) (*v1.NamespaceList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error) Watch(opts meta_v1.ListOptions) (watch.Interface, error)
@ -139,16 +138,6 @@ func (c *namespaces) Delete(name string, options *meta_v1.DeleteOptions) error {
Error() Error()
} }
// DeleteCollection deletes a collection of objects.
func (c *namespaces) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Resource("namespaces").
VersionedParams(&listOptions, scheme.ParameterCodec).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched namespace. // Patch applies the patch and returns the patched namespace.
func (c *namespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) { func (c *namespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) {
result = &v1.Namespace{} result = &v1.Namespace{}

View File

@ -39,7 +39,6 @@ type ServiceInterface interface {
Update(*v1.Service) (*v1.Service, error) Update(*v1.Service) (*v1.Service, error)
UpdateStatus(*v1.Service) (*v1.Service, error) UpdateStatus(*v1.Service) (*v1.Service, error)
Delete(name string, options *meta_v1.DeleteOptions) error Delete(name string, options *meta_v1.DeleteOptions) error
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.Service, error) Get(name string, options meta_v1.GetOptions) (*v1.Service, error)
List(opts meta_v1.ListOptions) (*v1.ServiceList, error) List(opts meta_v1.ListOptions) (*v1.ServiceList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error) Watch(opts meta_v1.ListOptions) (watch.Interface, error)
@ -148,17 +147,6 @@ func (c *services) Delete(name string, options *meta_v1.DeleteOptions) error {
Error() Error()
} }
// DeleteCollection deletes a collection of objects.
func (c *services) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("services").
VersionedParams(&listOptions, scheme.ParameterCodec).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched service. // Patch applies the patch and returns the patched service.
func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) {
result = &v1.Service{} result = &v1.Service{}