Updated files after rebase

This commit is contained in:
Christian Huffman 2020-03-06 08:56:59 -05:00
parent 73611a473f
commit d0890533a9
4 changed files with 24 additions and 15 deletions

View File

@ -14334,8 +14334,7 @@
"items": { "items": {
"$ref": "#/definitions/io.k8s.api.storage.v1.CSIDriver" "$ref": "#/definitions/io.k8s.api.storage.v1.CSIDriver"
}, },
"type": "array", "type": "array"
"x-kubernetes-list-type": "set"
}, },
"kind": { "kind": {
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",

View File

@ -38,7 +38,17 @@ go_library(
"//vendor/k8s.io/klog:go_default_library", "//vendor/k8s.io/klog:go_default_library",
"//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library",
"//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library",
], ] + select({
"@io_bazel_rules_go//go/platform:android": [
"//pkg/features:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library",
],
"@io_bazel_rules_go//go/platform:linux": [
"//pkg/features:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library",
],
"//conditions:default": [],
}),
) )
go_test( go_test(

View File

@ -40,8 +40,8 @@ type CSIDriversGetter interface {
type CSIDriverInterface interface { type CSIDriverInterface interface {
Create(ctx context.Context, cSIDriver *v1.CSIDriver, opts metav1.CreateOptions) (*v1.CSIDriver, error) 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) Update(ctx context.Context, cSIDriver *v1.CSIDriver, opts metav1.UpdateOptions) (*v1.CSIDriver, error)
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CSIDriver, error) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CSIDriver, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.CSIDriverList, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.CSIDriverList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, 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. // 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(). return c.client.Delete().
Resource("csidrivers"). Resource("csidrivers").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // 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 var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Resource("csidrivers"). Resource("csidrivers").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() 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. // 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. _, err := c.Fake.
Invokes(testing.NewRootDeleteAction(csidriversResource, name), &storagev1.CSIDriver{}) Invokes(testing.NewRootDeleteAction(csidriversResource, name), &storagev1.CSIDriver{})
return err return err
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeCSIDrivers) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeCSIDrivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(csidriversResource, listOptions) action := testing.NewRootDeleteCollectionAction(csidriversResource, listOpts)
_, err := c.Fake.Invokes(action, &storagev1.CSIDriverList{}) _, err := c.Fake.Invokes(action, &storagev1.CSIDriverList{})
return err return err