mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-07 01:50:46 +00:00
published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub) copied from https://github.com/kubernetes/kubernetes.git, branch master, last commit is 122bf004bf5d03f96d9f205d4008b6ea8b47d209
This commit is contained in:
@@ -22,7 +22,6 @@ import (
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||
v1 "k8s.io/client-go/pkg/apis/batch/v1"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
@@ -65,14 +64,14 @@ func (c *FakeJobs) UpdateStatus(job *v1.Job) (*v1.Job, error) {
|
||||
return obj.(*v1.Job), err
|
||||
}
|
||||
|
||||
func (c *FakeJobs) Delete(name string, options *api_v1.DeleteOptions) error {
|
||||
func (c *FakeJobs) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(jobsResource, c.ns, name), &v1.Job{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeJobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
func (c *FakeJobs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.JobList{})
|
||||
|
@@ -21,7 +21,6 @@ import (
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/client-go/pkg/api"
|
||||
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||
v1 "k8s.io/client-go/pkg/apis/batch/v1"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
@@ -37,8 +36,8 @@ type JobInterface interface {
|
||||
Create(*v1.Job) (*v1.Job, error)
|
||||
Update(*v1.Job) (*v1.Job, error)
|
||||
UpdateStatus(*v1.Job) (*v1.Job, error)
|
||||
Delete(name string, options *api_v1.DeleteOptions) error
|
||||
DeleteCollection(options *api_v1.DeleteOptions, listOptions meta_v1.ListOptions) 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.Job, error)
|
||||
List(opts meta_v1.ListOptions) (*v1.JobList, error)
|
||||
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
|
||||
@@ -102,7 +101,7 @@ func (c *jobs) UpdateStatus(job *v1.Job) (result *v1.Job, err error) {
|
||||
}
|
||||
|
||||
// Delete takes name of the job and deletes it. Returns an error if one occurs.
|
||||
func (c *jobs) Delete(name string, options *api_v1.DeleteOptions) error {
|
||||
func (c *jobs) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("jobs").
|
||||
@@ -113,7 +112,7 @@ func (c *jobs) Delete(name string, options *api_v1.DeleteOptions) error {
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *jobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
func (c *jobs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("jobs").
|
||||
|
@@ -17,11 +17,10 @@ limitations under the License.
|
||||
package v2alpha1
|
||||
|
||||
import (
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/client-go/pkg/api"
|
||||
v1 "k8s.io/client-go/pkg/api/v1"
|
||||
v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
@@ -38,10 +37,10 @@ type CronJobInterface interface {
|
||||
Update(*v2alpha1.CronJob) (*v2alpha1.CronJob, error)
|
||||
UpdateStatus(*v2alpha1.CronJob) (*v2alpha1.CronJob, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error
|
||||
Get(name string, options meta_v1.GetOptions) (*v2alpha1.CronJob, error)
|
||||
List(opts meta_v1.ListOptions) (*v2alpha1.CronJobList, error)
|
||||
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v2alpha1.CronJob, error)
|
||||
List(opts v1.ListOptions) (*v2alpha1.CronJobList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error)
|
||||
CronJobExpansion
|
||||
}
|
||||
@@ -113,7 +112,7 @@ func (c *cronJobs) Delete(name string, options *v1.DeleteOptions) error {
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("cronjobs").
|
||||
@@ -124,7 +123,7 @@ func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions meta_
|
||||
}
|
||||
|
||||
// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any.
|
||||
func (c *cronJobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha1.CronJob, err error) {
|
||||
func (c *cronJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) {
|
||||
result = &v2alpha1.CronJob{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
@@ -137,7 +136,7 @@ func (c *cronJobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CronJobs that match those selectors.
|
||||
func (c *cronJobs) List(opts meta_v1.ListOptions) (result *v2alpha1.CronJobList, err error) {
|
||||
func (c *cronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) {
|
||||
result = &v2alpha1.CronJobList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
@@ -149,7 +148,7 @@ func (c *cronJobs) List(opts meta_v1.ListOptions) (result *v2alpha1.CronJobList,
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested cronJobs.
|
||||
func (c *cronJobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.client.Get().
|
||||
Prefix("watch").
|
||||
Namespace(c.ns).
|
||||
|
@@ -17,12 +17,11 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
v1 "k8s.io/client-go/pkg/api/v1"
|
||||
v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
@@ -72,14 +71,14 @@ func (c *FakeCronJobs) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeCronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
func (c *FakeCronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v2alpha1.CronJobList{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeCronJobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha1.CronJob, err error) {
|
||||
func (c *FakeCronJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(cronjobsResource, c.ns, name), &v2alpha1.CronJob{})
|
||||
|
||||
@@ -89,7 +88,7 @@ func (c *FakeCronJobs) Get(name string, options meta_v1.GetOptions) (result *v2a
|
||||
return obj.(*v2alpha1.CronJob), err
|
||||
}
|
||||
|
||||
func (c *FakeCronJobs) List(opts meta_v1.ListOptions) (result *v2alpha1.CronJobList, err error) {
|
||||
func (c *FakeCronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(cronjobsResource, c.ns, opts), &v2alpha1.CronJobList{})
|
||||
|
||||
@@ -111,7 +110,7 @@ func (c *FakeCronJobs) List(opts meta_v1.ListOptions) (result *v2alpha1.CronJobL
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested cronJobs.
|
||||
func (c *FakeCronJobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeCronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(cronjobsResource, c.ns, opts))
|
||||
|
||||
|
@@ -17,12 +17,11 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
v1 "k8s.io/client-go/pkg/api/v1"
|
||||
v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
@@ -72,14 +71,14 @@ func (c *FakeJobs) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeJobs) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
func (c *FakeJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v2alpha1.JobList{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeJobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha1.Job, err error) {
|
||||
func (c *FakeJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.Job, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(jobsResource, c.ns, name), &v2alpha1.Job{})
|
||||
|
||||
@@ -89,7 +88,7 @@ func (c *FakeJobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha
|
||||
return obj.(*v2alpha1.Job), err
|
||||
}
|
||||
|
||||
func (c *FakeJobs) List(opts meta_v1.ListOptions) (result *v2alpha1.JobList, err error) {
|
||||
func (c *FakeJobs) List(opts v1.ListOptions) (result *v2alpha1.JobList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(jobsResource, c.ns, opts), &v2alpha1.JobList{})
|
||||
|
||||
@@ -111,7 +110,7 @@ func (c *FakeJobs) List(opts meta_v1.ListOptions) (result *v2alpha1.JobList, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested jobs.
|
||||
func (c *FakeJobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(jobsResource, c.ns, opts))
|
||||
|
||||
|
@@ -17,11 +17,10 @@ limitations under the License.
|
||||
package v2alpha1
|
||||
|
||||
import (
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/client-go/pkg/api"
|
||||
v1 "k8s.io/client-go/pkg/api/v1"
|
||||
v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
@@ -38,10 +37,10 @@ type JobInterface interface {
|
||||
Update(*v2alpha1.Job) (*v2alpha1.Job, error)
|
||||
UpdateStatus(*v2alpha1.Job) (*v2alpha1.Job, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error
|
||||
Get(name string, options meta_v1.GetOptions) (*v2alpha1.Job, error)
|
||||
List(opts meta_v1.ListOptions) (*v2alpha1.JobList, error)
|
||||
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v2alpha1.Job, error)
|
||||
List(opts v1.ListOptions) (*v2alpha1.JobList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error)
|
||||
JobExpansion
|
||||
}
|
||||
@@ -113,7 +112,7 @@ func (c *jobs) Delete(name string, options *v1.DeleteOptions) error {
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *jobs) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
func (c *jobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("jobs").
|
||||
@@ -124,7 +123,7 @@ func (c *jobs) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.L
|
||||
}
|
||||
|
||||
// Get takes name of the job, and returns the corresponding job object, and an error if there is any.
|
||||
func (c *jobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha1.Job, err error) {
|
||||
func (c *jobs) Get(name string, options v1.GetOptions) (result *v2alpha1.Job, err error) {
|
||||
result = &v2alpha1.Job{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
@@ -137,7 +136,7 @@ func (c *jobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha1.Jo
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Jobs that match those selectors.
|
||||
func (c *jobs) List(opts meta_v1.ListOptions) (result *v2alpha1.JobList, err error) {
|
||||
func (c *jobs) List(opts v1.ListOptions) (result *v2alpha1.JobList, err error) {
|
||||
result = &v2alpha1.JobList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
@@ -149,7 +148,7 @@ func (c *jobs) List(opts meta_v1.ListOptions) (result *v2alpha1.JobList, err err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested jobs.
|
||||
func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *jobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.client.Get().
|
||||
Prefix("watch").
|
||||
Namespace(c.ns).
|
||||
|
Reference in New Issue
Block a user