Updated files after rebase

Kubernetes-commit: d0890533a99bcb7f3ee173846863960d15064577
This commit is contained in:
Christian Huffman 2020-03-06 08:56:59 -05:00 committed by Kubernetes Publisher
parent ef1eac84b2
commit 686d8407e6
2 changed files with 12 additions and 12 deletions

View File

@ -40,8 +40,8 @@ type CSIDriversGetter interface {
type CSIDriverInterface interface {
Create(ctx context.Context, cSIDriver *v1.CSIDriver, opts metav1.CreateOptions) (*v1.CSIDriver, error)
Update(ctx context.Context, cSIDriver *v1.CSIDriver, opts metav1.UpdateOptions) (*v1.CSIDriver, error)
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CSIDriver, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.CSIDriverList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
@ -129,26 +129,26 @@ func (c *cSIDrivers) Update(ctx context.Context, cSIDriver *v1.CSIDriver, opts m
}
// Delete takes name of the cSIDriver and deletes it. Returns an error if one occurs.
func (c *cSIDrivers) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
func (c *cSIDrivers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Resource("csidrivers").
Name(name).
Body(options).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *cSIDrivers) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
func (c *cSIDrivers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Resource("csidrivers").
VersionedParams(&listOptions, scheme.ParameterCodec).
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Body(&opts).
Do(ctx).
Error()
}

View File

@ -97,15 +97,15 @@ func (c *FakeCSIDrivers) Update(ctx context.Context, cSIDriver *storagev1.CSIDri
}
// Delete takes name of the cSIDriver and deletes it. Returns an error if one occurs.
func (c *FakeCSIDrivers) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
func (c *FakeCSIDrivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(csidriversResource, name), &storagev1.CSIDriver{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeCSIDrivers) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(csidriversResource, listOptions)
func (c *FakeCSIDrivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(csidriversResource, listOpts)
_, err := c.Fake.Invokes(action, &storagev1.CSIDriverList{})
return err