1# coding: utf-8
2"""
3    Kubernetes
4
5    No description provided (generated by Swagger Codegen
6    https://github.com/swagger-api/swagger-codegen)
7
8    OpenAPI spec version: v1.14.4
9
10    Generated by: https://github.com/swagger-api/swagger-codegen.git
11"""
12
13from __future__ import absolute_import
14
15import sys
16import os
17import re
18
19# python 2 and python 3 compatibility library
20from six import iteritems
21
22from ..api_client import ApiClient
23
24
25class StorageV1beta1Api(object):
26  """
27    NOTE: This class is auto generated by the swagger code generator program.
28    Do not edit the class manually.
29    Ref: https://github.com/swagger-api/swagger-codegen
30    """
31
32  def __init__(self, api_client=None):
33    if api_client is None:
34      api_client = ApiClient()
35    self.api_client = api_client
36
37  def create_csi_driver(self, body, **kwargs):
38    """
39        create a CSIDriver
40        This method makes a synchronous HTTP request by default. To make an
41        asynchronous HTTP request, please pass async_req=True
42        >>> thread = api.create_csi_driver(body, async_req=True)
43        >>> result = thread.get()
44
45        :param async_req bool
46        :param V1beta1CSIDriver body: (required)
47        :param str pretty: If 'true', then the output is pretty printed.
48        :param str dry_run: When present, indicates that modifications should
49        not be persisted. An invalid or unrecognized dryRun directive will
50        result in an error response and no further processing of the request.
51        Valid values are: - All: all dry run stages will be processed
52        :param str field_manager: fieldManager is a name associated with the
53        actor or entity that is making these changes. The value must be less
54        than or 128 characters long, and only contain printable characters, as
55        defined by https://golang.org/pkg/unicode/#IsPrint.
56        :return: V1beta1CSIDriver
57                 If the method is called asynchronously,
58                 returns the request thread.
59        """
60    kwargs['_return_http_data_only'] = True
61    if kwargs.get('async_req'):
62      return self.create_csi_driver_with_http_info(body, **kwargs)
63    else:
64      (data) = self.create_csi_driver_with_http_info(body, **kwargs)
65      return data
66
67  def create_csi_driver_with_http_info(self, body, **kwargs):
68    """
69        create a CSIDriver
70        This method makes a synchronous HTTP request by default. To make an
71        asynchronous HTTP request, please pass async_req=True
72        >>> thread = api.create_csi_driver_with_http_info(body, async_req=True)
73        >>> result = thread.get()
74
75        :param async_req bool
76        :param V1beta1CSIDriver body: (required)
77        :param str pretty: If 'true', then the output is pretty printed.
78        :param str dry_run: When present, indicates that modifications should
79        not be persisted. An invalid or unrecognized dryRun directive will
80        result in an error response and no further processing of the request.
81        Valid values are: - All: all dry run stages will be processed
82        :param str field_manager: fieldManager is a name associated with the
83        actor or entity that is making these changes. The value must be less
84        than or 128 characters long, and only contain printable characters, as
85        defined by https://golang.org/pkg/unicode/#IsPrint.
86        :return: V1beta1CSIDriver
87                 If the method is called asynchronously,
88                 returns the request thread.
89        """
90
91    all_params = ['body', 'pretty', 'dry_run', 'field_manager']
92    all_params.append('async_req')
93    all_params.append('_return_http_data_only')
94    all_params.append('_preload_content')
95    all_params.append('_request_timeout')
96
97    params = locals()
98    for key, val in iteritems(params['kwargs']):
99      if key not in all_params:
100        raise TypeError("Got an unexpected keyword argument '%s'"
101                        ' to method create_csi_driver' % key)
102      params[key] = val
103    del params['kwargs']
104    # verify the required parameter 'body' is set
105    if ('body' not in params) or (params['body'] is None):
106      raise ValueError(
107          'Missing the required parameter `body` when calling `create_csi_driver`'
108      )
109
110    collection_formats = {}
111
112    path_params = {}
113
114    query_params = []
115    if 'pretty' in params:
116      query_params.append(('pretty', params['pretty']))
117    if 'dry_run' in params:
118      query_params.append(('dryRun', params['dry_run']))
119    if 'field_manager' in params:
120      query_params.append(('fieldManager', params['field_manager']))
121
122    header_params = {}
123
124    form_params = []
125    local_var_files = {}
126
127    body_params = None
128    if 'body' in params:
129      body_params = params['body']
130    # HTTP header `Accept`
131    header_params['Accept'] = self.api_client.\
132        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
133
134    # HTTP header `Content-Type`
135    header_params['Content-Type'] = self.api_client.\
136        select_header_content_type(['*/*'])
137
138    # Authentication setting
139    auth_settings = ['BearerToken']
140
141    return self.api_client.call_api(
142        '/apis/storage.k8s.io/v1beta1/csidrivers',
143        'POST',
144        path_params,
145        query_params,
146        header_params,
147        body=body_params,
148        post_params=form_params,
149        files=local_var_files,
150        response_type='V1beta1CSIDriver',
151        auth_settings=auth_settings,
152        async_req=params.get('async_req'),
153        _return_http_data_only=params.get('_return_http_data_only'),
154        _preload_content=params.get('_preload_content', True),
155        _request_timeout=params.get('_request_timeout'),
156        collection_formats=collection_formats)
157
158  def create_csi_node(self, body, **kwargs):
159    """
160        create a CSINode
161        This method makes a synchronous HTTP request by default. To make an
162        asynchronous HTTP request, please pass async_req=True
163        >>> thread = api.create_csi_node(body, async_req=True)
164        >>> result = thread.get()
165
166        :param async_req bool
167        :param V1beta1CSINode body: (required)
168        :param str pretty: If 'true', then the output is pretty printed.
169        :param str dry_run: When present, indicates that modifications should
170        not be persisted. An invalid or unrecognized dryRun directive will
171        result in an error response and no further processing of the request.
172        Valid values are: - All: all dry run stages will be processed
173        :param str field_manager: fieldManager is a name associated with the
174        actor or entity that is making these changes. The value must be less
175        than or 128 characters long, and only contain printable characters, as
176        defined by https://golang.org/pkg/unicode/#IsPrint.
177        :return: V1beta1CSINode
178                 If the method is called asynchronously,
179                 returns the request thread.
180        """
181    kwargs['_return_http_data_only'] = True
182    if kwargs.get('async_req'):
183      return self.create_csi_node_with_http_info(body, **kwargs)
184    else:
185      (data) = self.create_csi_node_with_http_info(body, **kwargs)
186      return data
187
188  def create_csi_node_with_http_info(self, body, **kwargs):
189    """
190        create a CSINode
191        This method makes a synchronous HTTP request by default. To make an
192        asynchronous HTTP request, please pass async_req=True
193        >>> thread = api.create_csi_node_with_http_info(body, async_req=True)
194        >>> result = thread.get()
195
196        :param async_req bool
197        :param V1beta1CSINode body: (required)
198        :param str pretty: If 'true', then the output is pretty printed.
199        :param str dry_run: When present, indicates that modifications should
200        not be persisted. An invalid or unrecognized dryRun directive will
201        result in an error response and no further processing of the request.
202        Valid values are: - All: all dry run stages will be processed
203        :param str field_manager: fieldManager is a name associated with the
204        actor or entity that is making these changes. The value must be less
205        than or 128 characters long, and only contain printable characters, as
206        defined by https://golang.org/pkg/unicode/#IsPrint.
207        :return: V1beta1CSINode
208                 If the method is called asynchronously,
209                 returns the request thread.
210        """
211
212    all_params = ['body', 'pretty', 'dry_run', 'field_manager']
213    all_params.append('async_req')
214    all_params.append('_return_http_data_only')
215    all_params.append('_preload_content')
216    all_params.append('_request_timeout')
217
218    params = locals()
219    for key, val in iteritems(params['kwargs']):
220      if key not in all_params:
221        raise TypeError("Got an unexpected keyword argument '%s'"
222                        ' to method create_csi_node' % key)
223      params[key] = val
224    del params['kwargs']
225    # verify the required parameter 'body' is set
226    if ('body' not in params) or (params['body'] is None):
227      raise ValueError(
228          'Missing the required parameter `body` when calling `create_csi_node`'
229      )
230
231    collection_formats = {}
232
233    path_params = {}
234
235    query_params = []
236    if 'pretty' in params:
237      query_params.append(('pretty', params['pretty']))
238    if 'dry_run' in params:
239      query_params.append(('dryRun', params['dry_run']))
240    if 'field_manager' in params:
241      query_params.append(('fieldManager', params['field_manager']))
242
243    header_params = {}
244
245    form_params = []
246    local_var_files = {}
247
248    body_params = None
249    if 'body' in params:
250      body_params = params['body']
251    # HTTP header `Accept`
252    header_params['Accept'] = self.api_client.\
253        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
254
255    # HTTP header `Content-Type`
256    header_params['Content-Type'] = self.api_client.\
257        select_header_content_type(['*/*'])
258
259    # Authentication setting
260    auth_settings = ['BearerToken']
261
262    return self.api_client.call_api(
263        '/apis/storage.k8s.io/v1beta1/csinodes',
264        'POST',
265        path_params,
266        query_params,
267        header_params,
268        body=body_params,
269        post_params=form_params,
270        files=local_var_files,
271        response_type='V1beta1CSINode',
272        auth_settings=auth_settings,
273        async_req=params.get('async_req'),
274        _return_http_data_only=params.get('_return_http_data_only'),
275        _preload_content=params.get('_preload_content', True),
276        _request_timeout=params.get('_request_timeout'),
277        collection_formats=collection_formats)
278
279  def create_storage_class(self, body, **kwargs):
280    """
281        create a StorageClass
282        This method makes a synchronous HTTP request by default. To make an
283        asynchronous HTTP request, please pass async_req=True
284        >>> thread = api.create_storage_class(body, async_req=True)
285        >>> result = thread.get()
286
287        :param async_req bool
288        :param V1beta1StorageClass body: (required)
289        :param str pretty: If 'true', then the output is pretty printed.
290        :param str dry_run: When present, indicates that modifications should
291        not be persisted. An invalid or unrecognized dryRun directive will
292        result in an error response and no further processing of the request.
293        Valid values are: - All: all dry run stages will be processed
294        :param str field_manager: fieldManager is a name associated with the
295        actor or entity that is making these changes. The value must be less
296        than or 128 characters long, and only contain printable characters, as
297        defined by https://golang.org/pkg/unicode/#IsPrint.
298        :return: V1beta1StorageClass
299                 If the method is called asynchronously,
300                 returns the request thread.
301        """
302    kwargs['_return_http_data_only'] = True
303    if kwargs.get('async_req'):
304      return self.create_storage_class_with_http_info(body, **kwargs)
305    else:
306      (data) = self.create_storage_class_with_http_info(body, **kwargs)
307      return data
308
309  def create_storage_class_with_http_info(self, body, **kwargs):
310    """
311        create a StorageClass
312        This method makes a synchronous HTTP request by default. To make an
313        asynchronous HTTP request, please pass async_req=True
314        >>> thread = api.create_storage_class_with_http_info(body,
315        async_req=True)
316        >>> result = thread.get()
317
318        :param async_req bool
319        :param V1beta1StorageClass body: (required)
320        :param str pretty: If 'true', then the output is pretty printed.
321        :param str dry_run: When present, indicates that modifications should
322        not be persisted. An invalid or unrecognized dryRun directive will
323        result in an error response and no further processing of the request.
324        Valid values are: - All: all dry run stages will be processed
325        :param str field_manager: fieldManager is a name associated with the
326        actor or entity that is making these changes. The value must be less
327        than or 128 characters long, and only contain printable characters, as
328        defined by https://golang.org/pkg/unicode/#IsPrint.
329        :return: V1beta1StorageClass
330                 If the method is called asynchronously,
331                 returns the request thread.
332        """
333
334    all_params = ['body', 'pretty', 'dry_run', 'field_manager']
335    all_params.append('async_req')
336    all_params.append('_return_http_data_only')
337    all_params.append('_preload_content')
338    all_params.append('_request_timeout')
339
340    params = locals()
341    for key, val in iteritems(params['kwargs']):
342      if key not in all_params:
343        raise TypeError("Got an unexpected keyword argument '%s'"
344                        ' to method create_storage_class' % key)
345      params[key] = val
346    del params['kwargs']
347    # verify the required parameter 'body' is set
348    if ('body' not in params) or (params['body'] is None):
349      raise ValueError(
350          'Missing the required parameter `body` when calling `create_storage_class`'
351      )
352
353    collection_formats = {}
354
355    path_params = {}
356
357    query_params = []
358    if 'pretty' in params:
359      query_params.append(('pretty', params['pretty']))
360    if 'dry_run' in params:
361      query_params.append(('dryRun', params['dry_run']))
362    if 'field_manager' in params:
363      query_params.append(('fieldManager', params['field_manager']))
364
365    header_params = {}
366
367    form_params = []
368    local_var_files = {}
369
370    body_params = None
371    if 'body' in params:
372      body_params = params['body']
373    # HTTP header `Accept`
374    header_params['Accept'] = self.api_client.\
375        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
376
377    # HTTP header `Content-Type`
378    header_params['Content-Type'] = self.api_client.\
379        select_header_content_type(['*/*'])
380
381    # Authentication setting
382    auth_settings = ['BearerToken']
383
384    return self.api_client.call_api(
385        '/apis/storage.k8s.io/v1beta1/storageclasses',
386        'POST',
387        path_params,
388        query_params,
389        header_params,
390        body=body_params,
391        post_params=form_params,
392        files=local_var_files,
393        response_type='V1beta1StorageClass',
394        auth_settings=auth_settings,
395        async_req=params.get('async_req'),
396        _return_http_data_only=params.get('_return_http_data_only'),
397        _preload_content=params.get('_preload_content', True),
398        _request_timeout=params.get('_request_timeout'),
399        collection_formats=collection_formats)
400
401  def create_volume_attachment(self, body, **kwargs):
402    """
403        create a VolumeAttachment
404        This method makes a synchronous HTTP request by default. To make an
405        asynchronous HTTP request, please pass async_req=True
406        >>> thread = api.create_volume_attachment(body, async_req=True)
407        >>> result = thread.get()
408
409        :param async_req bool
410        :param V1beta1VolumeAttachment body: (required)
411        :param str pretty: If 'true', then the output is pretty printed.
412        :param str dry_run: When present, indicates that modifications should
413        not be persisted. An invalid or unrecognized dryRun directive will
414        result in an error response and no further processing of the request.
415        Valid values are: - All: all dry run stages will be processed
416        :param str field_manager: fieldManager is a name associated with the
417        actor or entity that is making these changes. The value must be less
418        than or 128 characters long, and only contain printable characters, as
419        defined by https://golang.org/pkg/unicode/#IsPrint.
420        :return: V1beta1VolumeAttachment
421                 If the method is called asynchronously,
422                 returns the request thread.
423        """
424    kwargs['_return_http_data_only'] = True
425    if kwargs.get('async_req'):
426      return self.create_volume_attachment_with_http_info(body, **kwargs)
427    else:
428      (data) = self.create_volume_attachment_with_http_info(body, **kwargs)
429      return data
430
431  def create_volume_attachment_with_http_info(self, body, **kwargs):
432    """
433        create a VolumeAttachment
434        This method makes a synchronous HTTP request by default. To make an
435        asynchronous HTTP request, please pass async_req=True
436        >>> thread = api.create_volume_attachment_with_http_info(body,
437        async_req=True)
438        >>> result = thread.get()
439
440        :param async_req bool
441        :param V1beta1VolumeAttachment body: (required)
442        :param str pretty: If 'true', then the output is pretty printed.
443        :param str dry_run: When present, indicates that modifications should
444        not be persisted. An invalid or unrecognized dryRun directive will
445        result in an error response and no further processing of the request.
446        Valid values are: - All: all dry run stages will be processed
447        :param str field_manager: fieldManager is a name associated with the
448        actor or entity that is making these changes. The value must be less
449        than or 128 characters long, and only contain printable characters, as
450        defined by https://golang.org/pkg/unicode/#IsPrint.
451        :return: V1beta1VolumeAttachment
452                 If the method is called asynchronously,
453                 returns the request thread.
454        """
455
456    all_params = ['body', 'pretty', 'dry_run', 'field_manager']
457    all_params.append('async_req')
458    all_params.append('_return_http_data_only')
459    all_params.append('_preload_content')
460    all_params.append('_request_timeout')
461
462    params = locals()
463    for key, val in iteritems(params['kwargs']):
464      if key not in all_params:
465        raise TypeError("Got an unexpected keyword argument '%s'"
466                        ' to method create_volume_attachment' % key)
467      params[key] = val
468    del params['kwargs']
469    # verify the required parameter 'body' is set
470    if ('body' not in params) or (params['body'] is None):
471      raise ValueError(
472          'Missing the required parameter `body` when calling `create_volume_attachment`'
473      )
474
475    collection_formats = {}
476
477    path_params = {}
478
479    query_params = []
480    if 'pretty' in params:
481      query_params.append(('pretty', params['pretty']))
482    if 'dry_run' in params:
483      query_params.append(('dryRun', params['dry_run']))
484    if 'field_manager' in params:
485      query_params.append(('fieldManager', params['field_manager']))
486
487    header_params = {}
488
489    form_params = []
490    local_var_files = {}
491
492    body_params = None
493    if 'body' in params:
494      body_params = params['body']
495    # HTTP header `Accept`
496    header_params['Accept'] = self.api_client.\
497        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
498
499    # HTTP header `Content-Type`
500    header_params['Content-Type'] = self.api_client.\
501        select_header_content_type(['*/*'])
502
503    # Authentication setting
504    auth_settings = ['BearerToken']
505
506    return self.api_client.call_api(
507        '/apis/storage.k8s.io/v1beta1/volumeattachments',
508        'POST',
509        path_params,
510        query_params,
511        header_params,
512        body=body_params,
513        post_params=form_params,
514        files=local_var_files,
515        response_type='V1beta1VolumeAttachment',
516        auth_settings=auth_settings,
517        async_req=params.get('async_req'),
518        _return_http_data_only=params.get('_return_http_data_only'),
519        _preload_content=params.get('_preload_content', True),
520        _request_timeout=params.get('_request_timeout'),
521        collection_formats=collection_formats)
522
523  def delete_collection_csi_driver(self, **kwargs):
524    """
525        delete collection of CSIDriver
526        This method makes a synchronous HTTP request by default. To make an
527        asynchronous HTTP request, please pass async_req=True
528        >>> thread = api.delete_collection_csi_driver(async_req=True)
529        >>> result = thread.get()
530
531        :param async_req bool
532        :param str pretty: If 'true', then the output is pretty printed.
533        :param str _continue: The continue option should be set when retrieving
534        more results from the server. Since this value is server defined,
535        clients may only use the continue value from a previous query result
536        with identical query parameters (except for the value of continue) and
537        the server may reject a continue value it does not recognize. If the
538        specified continue value is no longer valid whether due to expiration
539        (generally five to fifteen minutes) or a configuration change on the
540        server, the server will respond with a 410 ResourceExpired error
541        together with a continue token. If the client needs a consistent list,
542        it must restart their list without the continue field. Otherwise, the
543        client may send another list request with the token received with the
544        410 error, the server will respond with a list starting from the next
545        key, but from the latest snapshot, which is inconsistent from the
546        previous list results - objects that are created, modified, or deleted
547        after the first list request will be included in the response, as long
548        as their keys are after the \"next key\".  This field is not supported
549        when watch is true. Clients may start a watch from the last
550        resourceVersion value returned by the server and not miss any
551        modifications.
552        :param str field_selector: A selector to restrict the list of returned
553        objects by their fields. Defaults to everything.
554        :param str label_selector: A selector to restrict the list of returned
555        objects by their labels. Defaults to everything.
556        :param int limit: limit is a maximum number of responses to return for a
557        list call. If more items exist, the server will set the `continue` field
558        on the list metadata to a value that can be used with the same initial
559        query to retrieve the next set of results. Setting a limit may return
560        fewer than the requested amount of items (up to zero items) in the event
561        all requested objects are filtered out and clients should only use the
562        presence of the continue field to determine whether more results are
563        available. Servers may choose not to support the limit argument and will
564        return all of the available results. If limit is specified and the
565        continue field is empty, clients may assume that no more results are
566        available. This field is not supported if watch is true.  The server
567        guarantees that the objects returned when using continue will be
568        identical to issuing a single list call without a limit - that is, no
569        objects created, modified, or deleted after the first request is issued
570        will be included in any subsequent continued requests. This is sometimes
571        referred to as a consistent snapshot, and ensures that a client that is
572        using limit to receive smaller chunks of a very large result can ensure
573        they see all possible objects. If objects are updated during a chunked
574        list the version of the object that was present at the time the first
575        list result was calculated is returned.
576        :param str resource_version: When specified with a watch call, shows
577        changes that occur after that particular version of a resource. Defaults
578        to changes from the beginning of history. When specified for list: - if
579        unset, then the result is returned from remote storage based on
580        quorum-read flag; - if it's 0, then we simply return what we currently
581        have in cache, no guarantee; - if set to non zero, then the result is at
582        least as fresh as given rv.
583        :param int timeout_seconds: Timeout for the list/watch call. This limits
584        the duration of the call, regardless of any activity or inactivity.
585        :param bool watch: Watch for changes to the described resources and
586        return them as a stream of add, update, and remove notifications.
587        Specify resourceVersion.
588        :return: V1Status
589                 If the method is called asynchronously,
590                 returns the request thread.
591        """
592    kwargs['_return_http_data_only'] = True
593    if kwargs.get('async_req'):
594      return self.delete_collection_csi_driver_with_http_info(**kwargs)
595    else:
596      (data) = self.delete_collection_csi_driver_with_http_info(**kwargs)
597      return data
598
599  def delete_collection_csi_driver_with_http_info(self, **kwargs):
600    """
601        delete collection of CSIDriver
602        This method makes a synchronous HTTP request by default. To make an
603        asynchronous HTTP request, please pass async_req=True
604        >>> thread =
605        api.delete_collection_csi_driver_with_http_info(async_req=True)
606        >>> result = thread.get()
607
608        :param async_req bool
609        :param str pretty: If 'true', then the output is pretty printed.
610        :param str _continue: The continue option should be set when retrieving
611        more results from the server. Since this value is server defined,
612        clients may only use the continue value from a previous query result
613        with identical query parameters (except for the value of continue) and
614        the server may reject a continue value it does not recognize. If the
615        specified continue value is no longer valid whether due to expiration
616        (generally five to fifteen minutes) or a configuration change on the
617        server, the server will respond with a 410 ResourceExpired error
618        together with a continue token. If the client needs a consistent list,
619        it must restart their list without the continue field. Otherwise, the
620        client may send another list request with the token received with the
621        410 error, the server will respond with a list starting from the next
622        key, but from the latest snapshot, which is inconsistent from the
623        previous list results - objects that are created, modified, or deleted
624        after the first list request will be included in the response, as long
625        as their keys are after the \"next key\".  This field is not supported
626        when watch is true. Clients may start a watch from the last
627        resourceVersion value returned by the server and not miss any
628        modifications.
629        :param str field_selector: A selector to restrict the list of returned
630        objects by their fields. Defaults to everything.
631        :param str label_selector: A selector to restrict the list of returned
632        objects by their labels. Defaults to everything.
633        :param int limit: limit is a maximum number of responses to return for a
634        list call. If more items exist, the server will set the `continue` field
635        on the list metadata to a value that can be used with the same initial
636        query to retrieve the next set of results. Setting a limit may return
637        fewer than the requested amount of items (up to zero items) in the event
638        all requested objects are filtered out and clients should only use the
639        presence of the continue field to determine whether more results are
640        available. Servers may choose not to support the limit argument and will
641        return all of the available results. If limit is specified and the
642        continue field is empty, clients may assume that no more results are
643        available. This field is not supported if watch is true.  The server
644        guarantees that the objects returned when using continue will be
645        identical to issuing a single list call without a limit - that is, no
646        objects created, modified, or deleted after the first request is issued
647        will be included in any subsequent continued requests. This is sometimes
648        referred to as a consistent snapshot, and ensures that a client that is
649        using limit to receive smaller chunks of a very large result can ensure
650        they see all possible objects. If objects are updated during a chunked
651        list the version of the object that was present at the time the first
652        list result was calculated is returned.
653        :param str resource_version: When specified with a watch call, shows
654        changes that occur after that particular version of a resource. Defaults
655        to changes from the beginning of history. When specified for list: - if
656        unset, then the result is returned from remote storage based on
657        quorum-read flag; - if it's 0, then we simply return what we currently
658        have in cache, no guarantee; - if set to non zero, then the result is at
659        least as fresh as given rv.
660        :param int timeout_seconds: Timeout for the list/watch call. This limits
661        the duration of the call, regardless of any activity or inactivity.
662        :param bool watch: Watch for changes to the described resources and
663        return them as a stream of add, update, and remove notifications.
664        Specify resourceVersion.
665        :return: V1Status
666                 If the method is called asynchronously,
667                 returns the request thread.
668        """
669
670    all_params = [
671        'pretty', '_continue', 'field_selector', 'label_selector', 'limit',
672        'resource_version', 'timeout_seconds', 'watch'
673    ]
674    all_params.append('async_req')
675    all_params.append('_return_http_data_only')
676    all_params.append('_preload_content')
677    all_params.append('_request_timeout')
678
679    params = locals()
680    for key, val in iteritems(params['kwargs']):
681      if key not in all_params:
682        raise TypeError("Got an unexpected keyword argument '%s'"
683                        ' to method delete_collection_csi_driver' % key)
684      params[key] = val
685    del params['kwargs']
686
687    collection_formats = {}
688
689    path_params = {}
690
691    query_params = []
692    if 'pretty' in params:
693      query_params.append(('pretty', params['pretty']))
694    if '_continue' in params:
695      query_params.append(('continue', params['_continue']))
696    if 'field_selector' in params:
697      query_params.append(('fieldSelector', params['field_selector']))
698    if 'label_selector' in params:
699      query_params.append(('labelSelector', params['label_selector']))
700    if 'limit' in params:
701      query_params.append(('limit', params['limit']))
702    if 'resource_version' in params:
703      query_params.append(('resourceVersion', params['resource_version']))
704    if 'timeout_seconds' in params:
705      query_params.append(('timeoutSeconds', params['timeout_seconds']))
706    if 'watch' in params:
707      query_params.append(('watch', params['watch']))
708
709    header_params = {}
710
711    form_params = []
712    local_var_files = {}
713
714    body_params = None
715    # HTTP header `Accept`
716    header_params['Accept'] = self.api_client.\
717        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
718
719    # HTTP header `Content-Type`
720    header_params['Content-Type'] = self.api_client.\
721        select_header_content_type(['*/*'])
722
723    # Authentication setting
724    auth_settings = ['BearerToken']
725
726    return self.api_client.call_api(
727        '/apis/storage.k8s.io/v1beta1/csidrivers',
728        'DELETE',
729        path_params,
730        query_params,
731        header_params,
732        body=body_params,
733        post_params=form_params,
734        files=local_var_files,
735        response_type='V1Status',
736        auth_settings=auth_settings,
737        async_req=params.get('async_req'),
738        _return_http_data_only=params.get('_return_http_data_only'),
739        _preload_content=params.get('_preload_content', True),
740        _request_timeout=params.get('_request_timeout'),
741        collection_formats=collection_formats)
742
743  def delete_collection_csi_node(self, **kwargs):
744    """
745        delete collection of CSINode
746        This method makes a synchronous HTTP request by default. To make an
747        asynchronous HTTP request, please pass async_req=True
748        >>> thread = api.delete_collection_csi_node(async_req=True)
749        >>> result = thread.get()
750
751        :param async_req bool
752        :param str pretty: If 'true', then the output is pretty printed.
753        :param str _continue: The continue option should be set when retrieving
754        more results from the server. Since this value is server defined,
755        clients may only use the continue value from a previous query result
756        with identical query parameters (except for the value of continue) and
757        the server may reject a continue value it does not recognize. If the
758        specified continue value is no longer valid whether due to expiration
759        (generally five to fifteen minutes) or a configuration change on the
760        server, the server will respond with a 410 ResourceExpired error
761        together with a continue token. If the client needs a consistent list,
762        it must restart their list without the continue field. Otherwise, the
763        client may send another list request with the token received with the
764        410 error, the server will respond with a list starting from the next
765        key, but from the latest snapshot, which is inconsistent from the
766        previous list results - objects that are created, modified, or deleted
767        after the first list request will be included in the response, as long
768        as their keys are after the \"next key\".  This field is not supported
769        when watch is true. Clients may start a watch from the last
770        resourceVersion value returned by the server and not miss any
771        modifications.
772        :param str field_selector: A selector to restrict the list of returned
773        objects by their fields. Defaults to everything.
774        :param str label_selector: A selector to restrict the list of returned
775        objects by their labels. Defaults to everything.
776        :param int limit: limit is a maximum number of responses to return for a
777        list call. If more items exist, the server will set the `continue` field
778        on the list metadata to a value that can be used with the same initial
779        query to retrieve the next set of results. Setting a limit may return
780        fewer than the requested amount of items (up to zero items) in the event
781        all requested objects are filtered out and clients should only use the
782        presence of the continue field to determine whether more results are
783        available. Servers may choose not to support the limit argument and will
784        return all of the available results. If limit is specified and the
785        continue field is empty, clients may assume that no more results are
786        available. This field is not supported if watch is true.  The server
787        guarantees that the objects returned when using continue will be
788        identical to issuing a single list call without a limit - that is, no
789        objects created, modified, or deleted after the first request is issued
790        will be included in any subsequent continued requests. This is sometimes
791        referred to as a consistent snapshot, and ensures that a client that is
792        using limit to receive smaller chunks of a very large result can ensure
793        they see all possible objects. If objects are updated during a chunked
794        list the version of the object that was present at the time the first
795        list result was calculated is returned.
796        :param str resource_version: When specified with a watch call, shows
797        changes that occur after that particular version of a resource. Defaults
798        to changes from the beginning of history. When specified for list: - if
799        unset, then the result is returned from remote storage based on
800        quorum-read flag; - if it's 0, then we simply return what we currently
801        have in cache, no guarantee; - if set to non zero, then the result is at
802        least as fresh as given rv.
803        :param int timeout_seconds: Timeout for the list/watch call. This limits
804        the duration of the call, regardless of any activity or inactivity.
805        :param bool watch: Watch for changes to the described resources and
806        return them as a stream of add, update, and remove notifications.
807        Specify resourceVersion.
808        :return: V1Status
809                 If the method is called asynchronously,
810                 returns the request thread.
811        """
812    kwargs['_return_http_data_only'] = True
813    if kwargs.get('async_req'):
814      return self.delete_collection_csi_node_with_http_info(**kwargs)
815    else:
816      (data) = self.delete_collection_csi_node_with_http_info(**kwargs)
817      return data
818
819  def delete_collection_csi_node_with_http_info(self, **kwargs):
820    """
821        delete collection of CSINode
822        This method makes a synchronous HTTP request by default. To make an
823        asynchronous HTTP request, please pass async_req=True
824        >>> thread =
825        api.delete_collection_csi_node_with_http_info(async_req=True)
826        >>> result = thread.get()
827
828        :param async_req bool
829        :param str pretty: If 'true', then the output is pretty printed.
830        :param str _continue: The continue option should be set when retrieving
831        more results from the server. Since this value is server defined,
832        clients may only use the continue value from a previous query result
833        with identical query parameters (except for the value of continue) and
834        the server may reject a continue value it does not recognize. If the
835        specified continue value is no longer valid whether due to expiration
836        (generally five to fifteen minutes) or a configuration change on the
837        server, the server will respond with a 410 ResourceExpired error
838        together with a continue token. If the client needs a consistent list,
839        it must restart their list without the continue field. Otherwise, the
840        client may send another list request with the token received with the
841        410 error, the server will respond with a list starting from the next
842        key, but from the latest snapshot, which is inconsistent from the
843        previous list results - objects that are created, modified, or deleted
844        after the first list request will be included in the response, as long
845        as their keys are after the \"next key\".  This field is not supported
846        when watch is true. Clients may start a watch from the last
847        resourceVersion value returned by the server and not miss any
848        modifications.
849        :param str field_selector: A selector to restrict the list of returned
850        objects by their fields. Defaults to everything.
851        :param str label_selector: A selector to restrict the list of returned
852        objects by their labels. Defaults to everything.
853        :param int limit: limit is a maximum number of responses to return for a
854        list call. If more items exist, the server will set the `continue` field
855        on the list metadata to a value that can be used with the same initial
856        query to retrieve the next set of results. Setting a limit may return
857        fewer than the requested amount of items (up to zero items) in the event
858        all requested objects are filtered out and clients should only use the
859        presence of the continue field to determine whether more results are
860        available. Servers may choose not to support the limit argument and will
861        return all of the available results. If limit is specified and the
862        continue field is empty, clients may assume that no more results are
863        available. This field is not supported if watch is true.  The server
864        guarantees that the objects returned when using continue will be
865        identical to issuing a single list call without a limit - that is, no
866        objects created, modified, or deleted after the first request is issued
867        will be included in any subsequent continued requests. This is sometimes
868        referred to as a consistent snapshot, and ensures that a client that is
869        using limit to receive smaller chunks of a very large result can ensure
870        they see all possible objects. If objects are updated during a chunked
871        list the version of the object that was present at the time the first
872        list result was calculated is returned.
873        :param str resource_version: When specified with a watch call, shows
874        changes that occur after that particular version of a resource. Defaults
875        to changes from the beginning of history. When specified for list: - if
876        unset, then the result is returned from remote storage based on
877        quorum-read flag; - if it's 0, then we simply return what we currently
878        have in cache, no guarantee; - if set to non zero, then the result is at
879        least as fresh as given rv.
880        :param int timeout_seconds: Timeout for the list/watch call. This limits
881        the duration of the call, regardless of any activity or inactivity.
882        :param bool watch: Watch for changes to the described resources and
883        return them as a stream of add, update, and remove notifications.
884        Specify resourceVersion.
885        :return: V1Status
886                 If the method is called asynchronously,
887                 returns the request thread.
888        """
889
890    all_params = [
891        'pretty', '_continue', 'field_selector', 'label_selector', 'limit',
892        'resource_version', 'timeout_seconds', 'watch'
893    ]
894    all_params.append('async_req')
895    all_params.append('_return_http_data_only')
896    all_params.append('_preload_content')
897    all_params.append('_request_timeout')
898
899    params = locals()
900    for key, val in iteritems(params['kwargs']):
901      if key not in all_params:
902        raise TypeError("Got an unexpected keyword argument '%s'"
903                        ' to method delete_collection_csi_node' % key)
904      params[key] = val
905    del params['kwargs']
906
907    collection_formats = {}
908
909    path_params = {}
910
911    query_params = []
912    if 'pretty' in params:
913      query_params.append(('pretty', params['pretty']))
914    if '_continue' in params:
915      query_params.append(('continue', params['_continue']))
916    if 'field_selector' in params:
917      query_params.append(('fieldSelector', params['field_selector']))
918    if 'label_selector' in params:
919      query_params.append(('labelSelector', params['label_selector']))
920    if 'limit' in params:
921      query_params.append(('limit', params['limit']))
922    if 'resource_version' in params:
923      query_params.append(('resourceVersion', params['resource_version']))
924    if 'timeout_seconds' in params:
925      query_params.append(('timeoutSeconds', params['timeout_seconds']))
926    if 'watch' in params:
927      query_params.append(('watch', params['watch']))
928
929    header_params = {}
930
931    form_params = []
932    local_var_files = {}
933
934    body_params = None
935    # HTTP header `Accept`
936    header_params['Accept'] = self.api_client.\
937        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
938
939    # HTTP header `Content-Type`
940    header_params['Content-Type'] = self.api_client.\
941        select_header_content_type(['*/*'])
942
943    # Authentication setting
944    auth_settings = ['BearerToken']
945
946    return self.api_client.call_api(
947        '/apis/storage.k8s.io/v1beta1/csinodes',
948        'DELETE',
949        path_params,
950        query_params,
951        header_params,
952        body=body_params,
953        post_params=form_params,
954        files=local_var_files,
955        response_type='V1Status',
956        auth_settings=auth_settings,
957        async_req=params.get('async_req'),
958        _return_http_data_only=params.get('_return_http_data_only'),
959        _preload_content=params.get('_preload_content', True),
960        _request_timeout=params.get('_request_timeout'),
961        collection_formats=collection_formats)
962
963  def delete_collection_storage_class(self, **kwargs):
964    """
965        delete collection of StorageClass
966        This method makes a synchronous HTTP request by default. To make an
967        asynchronous HTTP request, please pass async_req=True
968        >>> thread = api.delete_collection_storage_class(async_req=True)
969        >>> result = thread.get()
970
971        :param async_req bool
972        :param str pretty: If 'true', then the output is pretty printed.
973        :param str _continue: The continue option should be set when retrieving
974        more results from the server. Since this value is server defined,
975        clients may only use the continue value from a previous query result
976        with identical query parameters (except for the value of continue) and
977        the server may reject a continue value it does not recognize. If the
978        specified continue value is no longer valid whether due to expiration
979        (generally five to fifteen minutes) or a configuration change on the
980        server, the server will respond with a 410 ResourceExpired error
981        together with a continue token. If the client needs a consistent list,
982        it must restart their list without the continue field. Otherwise, the
983        client may send another list request with the token received with the
984        410 error, the server will respond with a list starting from the next
985        key, but from the latest snapshot, which is inconsistent from the
986        previous list results - objects that are created, modified, or deleted
987        after the first list request will be included in the response, as long
988        as their keys are after the \"next key\".  This field is not supported
989        when watch is true. Clients may start a watch from the last
990        resourceVersion value returned by the server and not miss any
991        modifications.
992        :param str field_selector: A selector to restrict the list of returned
993        objects by their fields. Defaults to everything.
994        :param str label_selector: A selector to restrict the list of returned
995        objects by their labels. Defaults to everything.
996        :param int limit: limit is a maximum number of responses to return for a
997        list call. If more items exist, the server will set the `continue` field
998        on the list metadata to a value that can be used with the same initial
999        query to retrieve the next set of results. Setting a limit may return
1000        fewer than the requested amount of items (up to zero items) in the event
1001        all requested objects are filtered out and clients should only use the
1002        presence of the continue field to determine whether more results are
1003        available. Servers may choose not to support the limit argument and will
1004        return all of the available results. If limit is specified and the
1005        continue field is empty, clients may assume that no more results are
1006        available. This field is not supported if watch is true.  The server
1007        guarantees that the objects returned when using continue will be
1008        identical to issuing a single list call without a limit - that is, no
1009        objects created, modified, or deleted after the first request is issued
1010        will be included in any subsequent continued requests. This is sometimes
1011        referred to as a consistent snapshot, and ensures that a client that is
1012        using limit to receive smaller chunks of a very large result can ensure
1013        they see all possible objects. If objects are updated during a chunked
1014        list the version of the object that was present at the time the first
1015        list result was calculated is returned.
1016        :param str resource_version: When specified with a watch call, shows
1017        changes that occur after that particular version of a resource. Defaults
1018        to changes from the beginning of history. When specified for list: - if
1019        unset, then the result is returned from remote storage based on
1020        quorum-read flag; - if it's 0, then we simply return what we currently
1021        have in cache, no guarantee; - if set to non zero, then the result is at
1022        least as fresh as given rv.
1023        :param int timeout_seconds: Timeout for the list/watch call. This limits
1024        the duration of the call, regardless of any activity or inactivity.
1025        :param bool watch: Watch for changes to the described resources and
1026        return them as a stream of add, update, and remove notifications.
1027        Specify resourceVersion.
1028        :return: V1Status
1029                 If the method is called asynchronously,
1030                 returns the request thread.
1031        """
1032    kwargs['_return_http_data_only'] = True
1033    if kwargs.get('async_req'):
1034      return self.delete_collection_storage_class_with_http_info(**kwargs)
1035    else:
1036      (data) = self.delete_collection_storage_class_with_http_info(**kwargs)
1037      return data
1038
1039  def delete_collection_storage_class_with_http_info(self, **kwargs):
1040    """
1041        delete collection of StorageClass
1042        This method makes a synchronous HTTP request by default. To make an
1043        asynchronous HTTP request, please pass async_req=True
1044        >>> thread =
1045        api.delete_collection_storage_class_with_http_info(async_req=True)
1046        >>> result = thread.get()
1047
1048        :param async_req bool
1049        :param str pretty: If 'true', then the output is pretty printed.
1050        :param str _continue: The continue option should be set when retrieving
1051        more results from the server. Since this value is server defined,
1052        clients may only use the continue value from a previous query result
1053        with identical query parameters (except for the value of continue) and
1054        the server may reject a continue value it does not recognize. If the
1055        specified continue value is no longer valid whether due to expiration
1056        (generally five to fifteen minutes) or a configuration change on the
1057        server, the server will respond with a 410 ResourceExpired error
1058        together with a continue token. If the client needs a consistent list,
1059        it must restart their list without the continue field. Otherwise, the
1060        client may send another list request with the token received with the
1061        410 error, the server will respond with a list starting from the next
1062        key, but from the latest snapshot, which is inconsistent from the
1063        previous list results - objects that are created, modified, or deleted
1064        after the first list request will be included in the response, as long
1065        as their keys are after the \"next key\".  This field is not supported
1066        when watch is true. Clients may start a watch from the last
1067        resourceVersion value returned by the server and not miss any
1068        modifications.
1069        :param str field_selector: A selector to restrict the list of returned
1070        objects by their fields. Defaults to everything.
1071        :param str label_selector: A selector to restrict the list of returned
1072        objects by their labels. Defaults to everything.
1073        :param int limit: limit is a maximum number of responses to return for a
1074        list call. If more items exist, the server will set the `continue` field
1075        on the list metadata to a value that can be used with the same initial
1076        query to retrieve the next set of results. Setting a limit may return
1077        fewer than the requested amount of items (up to zero items) in the event
1078        all requested objects are filtered out and clients should only use the
1079        presence of the continue field to determine whether more results are
1080        available. Servers may choose not to support the limit argument and will
1081        return all of the available results. If limit is specified and the
1082        continue field is empty, clients may assume that no more results are
1083        available. This field is not supported if watch is true.  The server
1084        guarantees that the objects returned when using continue will be
1085        identical to issuing a single list call without a limit - that is, no
1086        objects created, modified, or deleted after the first request is issued
1087        will be included in any subsequent continued requests. This is sometimes
1088        referred to as a consistent snapshot, and ensures that a client that is
1089        using limit to receive smaller chunks of a very large result can ensure
1090        they see all possible objects. If objects are updated during a chunked
1091        list the version of the object that was present at the time the first
1092        list result was calculated is returned.
1093        :param str resource_version: When specified with a watch call, shows
1094        changes that occur after that particular version of a resource. Defaults
1095        to changes from the beginning of history. When specified for list: - if
1096        unset, then the result is returned from remote storage based on
1097        quorum-read flag; - if it's 0, then we simply return what we currently
1098        have in cache, no guarantee; - if set to non zero, then the result is at
1099        least as fresh as given rv.
1100        :param int timeout_seconds: Timeout for the list/watch call. This limits
1101        the duration of the call, regardless of any activity or inactivity.
1102        :param bool watch: Watch for changes to the described resources and
1103        return them as a stream of add, update, and remove notifications.
1104        Specify resourceVersion.
1105        :return: V1Status
1106                 If the method is called asynchronously,
1107                 returns the request thread.
1108        """
1109
1110    all_params = [
1111        'pretty', '_continue', 'field_selector', 'label_selector', 'limit',
1112        'resource_version', 'timeout_seconds', 'watch'
1113    ]
1114    all_params.append('async_req')
1115    all_params.append('_return_http_data_only')
1116    all_params.append('_preload_content')
1117    all_params.append('_request_timeout')
1118
1119    params = locals()
1120    for key, val in iteritems(params['kwargs']):
1121      if key not in all_params:
1122        raise TypeError("Got an unexpected keyword argument '%s'"
1123                        ' to method delete_collection_storage_class' % key)
1124      params[key] = val
1125    del params['kwargs']
1126
1127    collection_formats = {}
1128
1129    path_params = {}
1130
1131    query_params = []
1132    if 'pretty' in params:
1133      query_params.append(('pretty', params['pretty']))
1134    if '_continue' in params:
1135      query_params.append(('continue', params['_continue']))
1136    if 'field_selector' in params:
1137      query_params.append(('fieldSelector', params['field_selector']))
1138    if 'label_selector' in params:
1139      query_params.append(('labelSelector', params['label_selector']))
1140    if 'limit' in params:
1141      query_params.append(('limit', params['limit']))
1142    if 'resource_version' in params:
1143      query_params.append(('resourceVersion', params['resource_version']))
1144    if 'timeout_seconds' in params:
1145      query_params.append(('timeoutSeconds', params['timeout_seconds']))
1146    if 'watch' in params:
1147      query_params.append(('watch', params['watch']))
1148
1149    header_params = {}
1150
1151    form_params = []
1152    local_var_files = {}
1153
1154    body_params = None
1155    # HTTP header `Accept`
1156    header_params['Accept'] = self.api_client.\
1157        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
1158
1159    # HTTP header `Content-Type`
1160    header_params['Content-Type'] = self.api_client.\
1161        select_header_content_type(['*/*'])
1162
1163    # Authentication setting
1164    auth_settings = ['BearerToken']
1165
1166    return self.api_client.call_api(
1167        '/apis/storage.k8s.io/v1beta1/storageclasses',
1168        'DELETE',
1169        path_params,
1170        query_params,
1171        header_params,
1172        body=body_params,
1173        post_params=form_params,
1174        files=local_var_files,
1175        response_type='V1Status',
1176        auth_settings=auth_settings,
1177        async_req=params.get('async_req'),
1178        _return_http_data_only=params.get('_return_http_data_only'),
1179        _preload_content=params.get('_preload_content', True),
1180        _request_timeout=params.get('_request_timeout'),
1181        collection_formats=collection_formats)
1182
1183  def delete_collection_volume_attachment(self, **kwargs):
1184    """
1185        delete collection of VolumeAttachment
1186        This method makes a synchronous HTTP request by default. To make an
1187        asynchronous HTTP request, please pass async_req=True
1188        >>> thread = api.delete_collection_volume_attachment(async_req=True)
1189        >>> result = thread.get()
1190
1191        :param async_req bool
1192        :param str pretty: If 'true', then the output is pretty printed.
1193        :param str _continue: The continue option should be set when retrieving
1194        more results from the server. Since this value is server defined,
1195        clients may only use the continue value from a previous query result
1196        with identical query parameters (except for the value of continue) and
1197        the server may reject a continue value it does not recognize. If the
1198        specified continue value is no longer valid whether due to expiration
1199        (generally five to fifteen minutes) or a configuration change on the
1200        server, the server will respond with a 410 ResourceExpired error
1201        together with a continue token. If the client needs a consistent list,
1202        it must restart their list without the continue field. Otherwise, the
1203        client may send another list request with the token received with the
1204        410 error, the server will respond with a list starting from the next
1205        key, but from the latest snapshot, which is inconsistent from the
1206        previous list results - objects that are created, modified, or deleted
1207        after the first list request will be included in the response, as long
1208        as their keys are after the \"next key\".  This field is not supported
1209        when watch is true. Clients may start a watch from the last
1210        resourceVersion value returned by the server and not miss any
1211        modifications.
1212        :param str field_selector: A selector to restrict the list of returned
1213        objects by their fields. Defaults to everything.
1214        :param str label_selector: A selector to restrict the list of returned
1215        objects by their labels. Defaults to everything.
1216        :param int limit: limit is a maximum number of responses to return for a
1217        list call. If more items exist, the server will set the `continue` field
1218        on the list metadata to a value that can be used with the same initial
1219        query to retrieve the next set of results. Setting a limit may return
1220        fewer than the requested amount of items (up to zero items) in the event
1221        all requested objects are filtered out and clients should only use the
1222        presence of the continue field to determine whether more results are
1223        available. Servers may choose not to support the limit argument and will
1224        return all of the available results. If limit is specified and the
1225        continue field is empty, clients may assume that no more results are
1226        available. This field is not supported if watch is true.  The server
1227        guarantees that the objects returned when using continue will be
1228        identical to issuing a single list call without a limit - that is, no
1229        objects created, modified, or deleted after the first request is issued
1230        will be included in any subsequent continued requests. This is sometimes
1231        referred to as a consistent snapshot, and ensures that a client that is
1232        using limit to receive smaller chunks of a very large result can ensure
1233        they see all possible objects. If objects are updated during a chunked
1234        list the version of the object that was present at the time the first
1235        list result was calculated is returned.
1236        :param str resource_version: When specified with a watch call, shows
1237        changes that occur after that particular version of a resource. Defaults
1238        to changes from the beginning of history. When specified for list: - if
1239        unset, then the result is returned from remote storage based on
1240        quorum-read flag; - if it's 0, then we simply return what we currently
1241        have in cache, no guarantee; - if set to non zero, then the result is at
1242        least as fresh as given rv.
1243        :param int timeout_seconds: Timeout for the list/watch call. This limits
1244        the duration of the call, regardless of any activity or inactivity.
1245        :param bool watch: Watch for changes to the described resources and
1246        return them as a stream of add, update, and remove notifications.
1247        Specify resourceVersion.
1248        :return: V1Status
1249                 If the method is called asynchronously,
1250                 returns the request thread.
1251        """
1252    kwargs['_return_http_data_only'] = True
1253    if kwargs.get('async_req'):
1254      return self.delete_collection_volume_attachment_with_http_info(**kwargs)
1255    else:
1256      (data) = self.delete_collection_volume_attachment_with_http_info(**kwargs)
1257      return data
1258
1259  def delete_collection_volume_attachment_with_http_info(self, **kwargs):
1260    """
1261        delete collection of VolumeAttachment
1262        This method makes a synchronous HTTP request by default. To make an
1263        asynchronous HTTP request, please pass async_req=True
1264        >>> thread =
1265        api.delete_collection_volume_attachment_with_http_info(async_req=True)
1266        >>> result = thread.get()
1267
1268        :param async_req bool
1269        :param str pretty: If 'true', then the output is pretty printed.
1270        :param str _continue: The continue option should be set when retrieving
1271        more results from the server. Since this value is server defined,
1272        clients may only use the continue value from a previous query result
1273        with identical query parameters (except for the value of continue) and
1274        the server may reject a continue value it does not recognize. If the
1275        specified continue value is no longer valid whether due to expiration
1276        (generally five to fifteen minutes) or a configuration change on the
1277        server, the server will respond with a 410 ResourceExpired error
1278        together with a continue token. If the client needs a consistent list,
1279        it must restart their list without the continue field. Otherwise, the
1280        client may send another list request with the token received with the
1281        410 error, the server will respond with a list starting from the next
1282        key, but from the latest snapshot, which is inconsistent from the
1283        previous list results - objects that are created, modified, or deleted
1284        after the first list request will be included in the response, as long
1285        as their keys are after the \"next key\".  This field is not supported
1286        when watch is true. Clients may start a watch from the last
1287        resourceVersion value returned by the server and not miss any
1288        modifications.
1289        :param str field_selector: A selector to restrict the list of returned
1290        objects by their fields. Defaults to everything.
1291        :param str label_selector: A selector to restrict the list of returned
1292        objects by their labels. Defaults to everything.
1293        :param int limit: limit is a maximum number of responses to return for a
1294        list call. If more items exist, the server will set the `continue` field
1295        on the list metadata to a value that can be used with the same initial
1296        query to retrieve the next set of results. Setting a limit may return
1297        fewer than the requested amount of items (up to zero items) in the event
1298        all requested objects are filtered out and clients should only use the
1299        presence of the continue field to determine whether more results are
1300        available. Servers may choose not to support the limit argument and will
1301        return all of the available results. If limit is specified and the
1302        continue field is empty, clients may assume that no more results are
1303        available. This field is not supported if watch is true.  The server
1304        guarantees that the objects returned when using continue will be
1305        identical to issuing a single list call without a limit - that is, no
1306        objects created, modified, or deleted after the first request is issued
1307        will be included in any subsequent continued requests. This is sometimes
1308        referred to as a consistent snapshot, and ensures that a client that is
1309        using limit to receive smaller chunks of a very large result can ensure
1310        they see all possible objects. If objects are updated during a chunked
1311        list the version of the object that was present at the time the first
1312        list result was calculated is returned.
1313        :param str resource_version: When specified with a watch call, shows
1314        changes that occur after that particular version of a resource. Defaults
1315        to changes from the beginning of history. When specified for list: - if
1316        unset, then the result is returned from remote storage based on
1317        quorum-read flag; - if it's 0, then we simply return what we currently
1318        have in cache, no guarantee; - if set to non zero, then the result is at
1319        least as fresh as given rv.
1320        :param int timeout_seconds: Timeout for the list/watch call. This limits
1321        the duration of the call, regardless of any activity or inactivity.
1322        :param bool watch: Watch for changes to the described resources and
1323        return them as a stream of add, update, and remove notifications.
1324        Specify resourceVersion.
1325        :return: V1Status
1326                 If the method is called asynchronously,
1327                 returns the request thread.
1328        """
1329
1330    all_params = [
1331        'pretty', '_continue', 'field_selector', 'label_selector', 'limit',
1332        'resource_version', 'timeout_seconds', 'watch'
1333    ]
1334    all_params.append('async_req')
1335    all_params.append('_return_http_data_only')
1336    all_params.append('_preload_content')
1337    all_params.append('_request_timeout')
1338
1339    params = locals()
1340    for key, val in iteritems(params['kwargs']):
1341      if key not in all_params:
1342        raise TypeError("Got an unexpected keyword argument '%s'"
1343                        ' to method delete_collection_volume_attachment' % key)
1344      params[key] = val
1345    del params['kwargs']
1346
1347    collection_formats = {}
1348
1349    path_params = {}
1350
1351    query_params = []
1352    if 'pretty' in params:
1353      query_params.append(('pretty', params['pretty']))
1354    if '_continue' in params:
1355      query_params.append(('continue', params['_continue']))
1356    if 'field_selector' in params:
1357      query_params.append(('fieldSelector', params['field_selector']))
1358    if 'label_selector' in params:
1359      query_params.append(('labelSelector', params['label_selector']))
1360    if 'limit' in params:
1361      query_params.append(('limit', params['limit']))
1362    if 'resource_version' in params:
1363      query_params.append(('resourceVersion', params['resource_version']))
1364    if 'timeout_seconds' in params:
1365      query_params.append(('timeoutSeconds', params['timeout_seconds']))
1366    if 'watch' in params:
1367      query_params.append(('watch', params['watch']))
1368
1369    header_params = {}
1370
1371    form_params = []
1372    local_var_files = {}
1373
1374    body_params = None
1375    # HTTP header `Accept`
1376    header_params['Accept'] = self.api_client.\
1377        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
1378
1379    # HTTP header `Content-Type`
1380    header_params['Content-Type'] = self.api_client.\
1381        select_header_content_type(['*/*'])
1382
1383    # Authentication setting
1384    auth_settings = ['BearerToken']
1385
1386    return self.api_client.call_api(
1387        '/apis/storage.k8s.io/v1beta1/volumeattachments',
1388        'DELETE',
1389        path_params,
1390        query_params,
1391        header_params,
1392        body=body_params,
1393        post_params=form_params,
1394        files=local_var_files,
1395        response_type='V1Status',
1396        auth_settings=auth_settings,
1397        async_req=params.get('async_req'),
1398        _return_http_data_only=params.get('_return_http_data_only'),
1399        _preload_content=params.get('_preload_content', True),
1400        _request_timeout=params.get('_request_timeout'),
1401        collection_formats=collection_formats)
1402
1403  def delete_csi_driver(self, name, **kwargs):
1404    """
1405        delete a CSIDriver
1406        This method makes a synchronous HTTP request by default. To make an
1407        asynchronous HTTP request, please pass async_req=True
1408        >>> thread = api.delete_csi_driver(name, async_req=True)
1409        >>> result = thread.get()
1410
1411        :param async_req bool
1412        :param str name: name of the CSIDriver (required)
1413        :param str pretty: If 'true', then the output is pretty printed.
1414        :param V1DeleteOptions body:
1415        :param str dry_run: When present, indicates that modifications should
1416        not be persisted. An invalid or unrecognized dryRun directive will
1417        result in an error response and no further processing of the request.
1418        Valid values are: - All: all dry run stages will be processed
1419        :param int grace_period_seconds: The duration in seconds before the
1420        object should be deleted. Value must be non-negative integer. The value
1421        zero indicates delete immediately. If this value is nil, the default
1422        grace period for the specified type will be used. Defaults to a per
1423        object value if not specified. zero means delete immediately.
1424        :param bool orphan_dependents: Deprecated: please use the
1425        PropagationPolicy, this field will be deprecated in 1.7. Should the
1426        dependent objects be orphaned. If true/false, the \"orphan\" finalizer
1427        will be added to/removed from the object's finalizers list. Either this
1428        field or PropagationPolicy may be set, but not both.
1429        :param str propagation_policy: Whether and how garbage collection will
1430        be performed. Either this field or OrphanDependents may be set, but not
1431        both. The default policy is decided by the existing finalizer set in the
1432        metadata.finalizers and the resource-specific default policy. Acceptable
1433        values are: 'Orphan' - orphan the dependents; 'Background' - allow the
1434        garbage collector to delete the dependents in the background;
1435        'Foreground' - a cascading policy that deletes all dependents in the
1436        foreground.
1437        :return: V1Status
1438                 If the method is called asynchronously,
1439                 returns the request thread.
1440        """
1441    kwargs['_return_http_data_only'] = True
1442    if kwargs.get('async_req'):
1443      return self.delete_csi_driver_with_http_info(name, **kwargs)
1444    else:
1445      (data) = self.delete_csi_driver_with_http_info(name, **kwargs)
1446      return data
1447
1448  def delete_csi_driver_with_http_info(self, name, **kwargs):
1449    """
1450        delete a CSIDriver
1451        This method makes a synchronous HTTP request by default. To make an
1452        asynchronous HTTP request, please pass async_req=True
1453        >>> thread = api.delete_csi_driver_with_http_info(name, async_req=True)
1454        >>> result = thread.get()
1455
1456        :param async_req bool
1457        :param str name: name of the CSIDriver (required)
1458        :param str pretty: If 'true', then the output is pretty printed.
1459        :param V1DeleteOptions body:
1460        :param str dry_run: When present, indicates that modifications should
1461        not be persisted. An invalid or unrecognized dryRun directive will
1462        result in an error response and no further processing of the request.
1463        Valid values are: - All: all dry run stages will be processed
1464        :param int grace_period_seconds: The duration in seconds before the
1465        object should be deleted. Value must be non-negative integer. The value
1466        zero indicates delete immediately. If this value is nil, the default
1467        grace period for the specified type will be used. Defaults to a per
1468        object value if not specified. zero means delete immediately.
1469        :param bool orphan_dependents: Deprecated: please use the
1470        PropagationPolicy, this field will be deprecated in 1.7. Should the
1471        dependent objects be orphaned. If true/false, the \"orphan\" finalizer
1472        will be added to/removed from the object's finalizers list. Either this
1473        field or PropagationPolicy may be set, but not both.
1474        :param str propagation_policy: Whether and how garbage collection will
1475        be performed. Either this field or OrphanDependents may be set, but not
1476        both. The default policy is decided by the existing finalizer set in the
1477        metadata.finalizers and the resource-specific default policy. Acceptable
1478        values are: 'Orphan' - orphan the dependents; 'Background' - allow the
1479        garbage collector to delete the dependents in the background;
1480        'Foreground' - a cascading policy that deletes all dependents in the
1481        foreground.
1482        :return: V1Status
1483                 If the method is called asynchronously,
1484                 returns the request thread.
1485        """
1486
1487    all_params = [
1488        'name', 'pretty', 'body', 'dry_run', 'grace_period_seconds',
1489        'orphan_dependents', 'propagation_policy'
1490    ]
1491    all_params.append('async_req')
1492    all_params.append('_return_http_data_only')
1493    all_params.append('_preload_content')
1494    all_params.append('_request_timeout')
1495
1496    params = locals()
1497    for key, val in iteritems(params['kwargs']):
1498      if key not in all_params:
1499        raise TypeError("Got an unexpected keyword argument '%s'"
1500                        ' to method delete_csi_driver' % key)
1501      params[key] = val
1502    del params['kwargs']
1503    # verify the required parameter 'name' is set
1504    if ('name' not in params) or (params['name'] is None):
1505      raise ValueError(
1506          'Missing the required parameter `name` when calling `delete_csi_driver`'
1507      )
1508
1509    collection_formats = {}
1510
1511    path_params = {}
1512    if 'name' in params:
1513      path_params['name'] = params['name']
1514
1515    query_params = []
1516    if 'pretty' in params:
1517      query_params.append(('pretty', params['pretty']))
1518    if 'dry_run' in params:
1519      query_params.append(('dryRun', params['dry_run']))
1520    if 'grace_period_seconds' in params:
1521      query_params.append(
1522          ('gracePeriodSeconds', params['grace_period_seconds']))
1523    if 'orphan_dependents' in params:
1524      query_params.append(('orphanDependents', params['orphan_dependents']))
1525    if 'propagation_policy' in params:
1526      query_params.append(('propagationPolicy', params['propagation_policy']))
1527
1528    header_params = {}
1529
1530    form_params = []
1531    local_var_files = {}
1532
1533    body_params = None
1534    if 'body' in params:
1535      body_params = params['body']
1536    # HTTP header `Accept`
1537    header_params['Accept'] = self.api_client.\
1538        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
1539
1540    # HTTP header `Content-Type`
1541    header_params['Content-Type'] = self.api_client.\
1542        select_header_content_type(['*/*'])
1543
1544    # Authentication setting
1545    auth_settings = ['BearerToken']
1546
1547    return self.api_client.call_api(
1548        '/apis/storage.k8s.io/v1beta1/csidrivers/{name}',
1549        'DELETE',
1550        path_params,
1551        query_params,
1552        header_params,
1553        body=body_params,
1554        post_params=form_params,
1555        files=local_var_files,
1556        response_type='V1Status',
1557        auth_settings=auth_settings,
1558        async_req=params.get('async_req'),
1559        _return_http_data_only=params.get('_return_http_data_only'),
1560        _preload_content=params.get('_preload_content', True),
1561        _request_timeout=params.get('_request_timeout'),
1562        collection_formats=collection_formats)
1563
1564  def delete_csi_node(self, name, **kwargs):
1565    """
1566        delete a CSINode
1567        This method makes a synchronous HTTP request by default. To make an
1568        asynchronous HTTP request, please pass async_req=True
1569        >>> thread = api.delete_csi_node(name, async_req=True)
1570        >>> result = thread.get()
1571
1572        :param async_req bool
1573        :param str name: name of the CSINode (required)
1574        :param str pretty: If 'true', then the output is pretty printed.
1575        :param V1DeleteOptions body:
1576        :param str dry_run: When present, indicates that modifications should
1577        not be persisted. An invalid or unrecognized dryRun directive will
1578        result in an error response and no further processing of the request.
1579        Valid values are: - All: all dry run stages will be processed
1580        :param int grace_period_seconds: The duration in seconds before the
1581        object should be deleted. Value must be non-negative integer. The value
1582        zero indicates delete immediately. If this value is nil, the default
1583        grace period for the specified type will be used. Defaults to a per
1584        object value if not specified. zero means delete immediately.
1585        :param bool orphan_dependents: Deprecated: please use the
1586        PropagationPolicy, this field will be deprecated in 1.7. Should the
1587        dependent objects be orphaned. If true/false, the \"orphan\" finalizer
1588        will be added to/removed from the object's finalizers list. Either this
1589        field or PropagationPolicy may be set, but not both.
1590        :param str propagation_policy: Whether and how garbage collection will
1591        be performed. Either this field or OrphanDependents may be set, but not
1592        both. The default policy is decided by the existing finalizer set in the
1593        metadata.finalizers and the resource-specific default policy. Acceptable
1594        values are: 'Orphan' - orphan the dependents; 'Background' - allow the
1595        garbage collector to delete the dependents in the background;
1596        'Foreground' - a cascading policy that deletes all dependents in the
1597        foreground.
1598        :return: V1Status
1599                 If the method is called asynchronously,
1600                 returns the request thread.
1601        """
1602    kwargs['_return_http_data_only'] = True
1603    if kwargs.get('async_req'):
1604      return self.delete_csi_node_with_http_info(name, **kwargs)
1605    else:
1606      (data) = self.delete_csi_node_with_http_info(name, **kwargs)
1607      return data
1608
1609  def delete_csi_node_with_http_info(self, name, **kwargs):
1610    """
1611        delete a CSINode
1612        This method makes a synchronous HTTP request by default. To make an
1613        asynchronous HTTP request, please pass async_req=True
1614        >>> thread = api.delete_csi_node_with_http_info(name, async_req=True)
1615        >>> result = thread.get()
1616
1617        :param async_req bool
1618        :param str name: name of the CSINode (required)
1619        :param str pretty: If 'true', then the output is pretty printed.
1620        :param V1DeleteOptions body:
1621        :param str dry_run: When present, indicates that modifications should
1622        not be persisted. An invalid or unrecognized dryRun directive will
1623        result in an error response and no further processing of the request.
1624        Valid values are: - All: all dry run stages will be processed
1625        :param int grace_period_seconds: The duration in seconds before the
1626        object should be deleted. Value must be non-negative integer. The value
1627        zero indicates delete immediately. If this value is nil, the default
1628        grace period for the specified type will be used. Defaults to a per
1629        object value if not specified. zero means delete immediately.
1630        :param bool orphan_dependents: Deprecated: please use the
1631        PropagationPolicy, this field will be deprecated in 1.7. Should the
1632        dependent objects be orphaned. If true/false, the \"orphan\" finalizer
1633        will be added to/removed from the object's finalizers list. Either this
1634        field or PropagationPolicy may be set, but not both.
1635        :param str propagation_policy: Whether and how garbage collection will
1636        be performed. Either this field or OrphanDependents may be set, but not
1637        both. The default policy is decided by the existing finalizer set in the
1638        metadata.finalizers and the resource-specific default policy. Acceptable
1639        values are: 'Orphan' - orphan the dependents; 'Background' - allow the
1640        garbage collector to delete the dependents in the background;
1641        'Foreground' - a cascading policy that deletes all dependents in the
1642        foreground.
1643        :return: V1Status
1644                 If the method is called asynchronously,
1645                 returns the request thread.
1646        """
1647
1648    all_params = [
1649        'name', 'pretty', 'body', 'dry_run', 'grace_period_seconds',
1650        'orphan_dependents', 'propagation_policy'
1651    ]
1652    all_params.append('async_req')
1653    all_params.append('_return_http_data_only')
1654    all_params.append('_preload_content')
1655    all_params.append('_request_timeout')
1656
1657    params = locals()
1658    for key, val in iteritems(params['kwargs']):
1659      if key not in all_params:
1660        raise TypeError("Got an unexpected keyword argument '%s'"
1661                        ' to method delete_csi_node' % key)
1662      params[key] = val
1663    del params['kwargs']
1664    # verify the required parameter 'name' is set
1665    if ('name' not in params) or (params['name'] is None):
1666      raise ValueError(
1667          'Missing the required parameter `name` when calling `delete_csi_node`'
1668      )
1669
1670    collection_formats = {}
1671
1672    path_params = {}
1673    if 'name' in params:
1674      path_params['name'] = params['name']
1675
1676    query_params = []
1677    if 'pretty' in params:
1678      query_params.append(('pretty', params['pretty']))
1679    if 'dry_run' in params:
1680      query_params.append(('dryRun', params['dry_run']))
1681    if 'grace_period_seconds' in params:
1682      query_params.append(
1683          ('gracePeriodSeconds', params['grace_period_seconds']))
1684    if 'orphan_dependents' in params:
1685      query_params.append(('orphanDependents', params['orphan_dependents']))
1686    if 'propagation_policy' in params:
1687      query_params.append(('propagationPolicy', params['propagation_policy']))
1688
1689    header_params = {}
1690
1691    form_params = []
1692    local_var_files = {}
1693
1694    body_params = None
1695    if 'body' in params:
1696      body_params = params['body']
1697    # HTTP header `Accept`
1698    header_params['Accept'] = self.api_client.\
1699        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
1700
1701    # HTTP header `Content-Type`
1702    header_params['Content-Type'] = self.api_client.\
1703        select_header_content_type(['*/*'])
1704
1705    # Authentication setting
1706    auth_settings = ['BearerToken']
1707
1708    return self.api_client.call_api(
1709        '/apis/storage.k8s.io/v1beta1/csinodes/{name}',
1710        'DELETE',
1711        path_params,
1712        query_params,
1713        header_params,
1714        body=body_params,
1715        post_params=form_params,
1716        files=local_var_files,
1717        response_type='V1Status',
1718        auth_settings=auth_settings,
1719        async_req=params.get('async_req'),
1720        _return_http_data_only=params.get('_return_http_data_only'),
1721        _preload_content=params.get('_preload_content', True),
1722        _request_timeout=params.get('_request_timeout'),
1723        collection_formats=collection_formats)
1724
1725  def delete_storage_class(self, name, **kwargs):
1726    """
1727        delete a StorageClass
1728        This method makes a synchronous HTTP request by default. To make an
1729        asynchronous HTTP request, please pass async_req=True
1730        >>> thread = api.delete_storage_class(name, async_req=True)
1731        >>> result = thread.get()
1732
1733        :param async_req bool
1734        :param str name: name of the StorageClass (required)
1735        :param str pretty: If 'true', then the output is pretty printed.
1736        :param V1DeleteOptions body:
1737        :param str dry_run: When present, indicates that modifications should
1738        not be persisted. An invalid or unrecognized dryRun directive will
1739        result in an error response and no further processing of the request.
1740        Valid values are: - All: all dry run stages will be processed
1741        :param int grace_period_seconds: The duration in seconds before the
1742        object should be deleted. Value must be non-negative integer. The value
1743        zero indicates delete immediately. If this value is nil, the default
1744        grace period for the specified type will be used. Defaults to a per
1745        object value if not specified. zero means delete immediately.
1746        :param bool orphan_dependents: Deprecated: please use the
1747        PropagationPolicy, this field will be deprecated in 1.7. Should the
1748        dependent objects be orphaned. If true/false, the \"orphan\" finalizer
1749        will be added to/removed from the object's finalizers list. Either this
1750        field or PropagationPolicy may be set, but not both.
1751        :param str propagation_policy: Whether and how garbage collection will
1752        be performed. Either this field or OrphanDependents may be set, but not
1753        both. The default policy is decided by the existing finalizer set in the
1754        metadata.finalizers and the resource-specific default policy. Acceptable
1755        values are: 'Orphan' - orphan the dependents; 'Background' - allow the
1756        garbage collector to delete the dependents in the background;
1757        'Foreground' - a cascading policy that deletes all dependents in the
1758        foreground.
1759        :return: V1Status
1760                 If the method is called asynchronously,
1761                 returns the request thread.
1762        """
1763    kwargs['_return_http_data_only'] = True
1764    if kwargs.get('async_req'):
1765      return self.delete_storage_class_with_http_info(name, **kwargs)
1766    else:
1767      (data) = self.delete_storage_class_with_http_info(name, **kwargs)
1768      return data
1769
1770  def delete_storage_class_with_http_info(self, name, **kwargs):
1771    """
1772        delete a StorageClass
1773        This method makes a synchronous HTTP request by default. To make an
1774        asynchronous HTTP request, please pass async_req=True
1775        >>> thread = api.delete_storage_class_with_http_info(name,
1776        async_req=True)
1777        >>> result = thread.get()
1778
1779        :param async_req bool
1780        :param str name: name of the StorageClass (required)
1781        :param str pretty: If 'true', then the output is pretty printed.
1782        :param V1DeleteOptions body:
1783        :param str dry_run: When present, indicates that modifications should
1784        not be persisted. An invalid or unrecognized dryRun directive will
1785        result in an error response and no further processing of the request.
1786        Valid values are: - All: all dry run stages will be processed
1787        :param int grace_period_seconds: The duration in seconds before the
1788        object should be deleted. Value must be non-negative integer. The value
1789        zero indicates delete immediately. If this value is nil, the default
1790        grace period for the specified type will be used. Defaults to a per
1791        object value if not specified. zero means delete immediately.
1792        :param bool orphan_dependents: Deprecated: please use the
1793        PropagationPolicy, this field will be deprecated in 1.7. Should the
1794        dependent objects be orphaned. If true/false, the \"orphan\" finalizer
1795        will be added to/removed from the object's finalizers list. Either this
1796        field or PropagationPolicy may be set, but not both.
1797        :param str propagation_policy: Whether and how garbage collection will
1798        be performed. Either this field or OrphanDependents may be set, but not
1799        both. The default policy is decided by the existing finalizer set in the
1800        metadata.finalizers and the resource-specific default policy. Acceptable
1801        values are: 'Orphan' - orphan the dependents; 'Background' - allow the
1802        garbage collector to delete the dependents in the background;
1803        'Foreground' - a cascading policy that deletes all dependents in the
1804        foreground.
1805        :return: V1Status
1806                 If the method is called asynchronously,
1807                 returns the request thread.
1808        """
1809
1810    all_params = [
1811        'name', 'pretty', 'body', 'dry_run', 'grace_period_seconds',
1812        'orphan_dependents', 'propagation_policy'
1813    ]
1814    all_params.append('async_req')
1815    all_params.append('_return_http_data_only')
1816    all_params.append('_preload_content')
1817    all_params.append('_request_timeout')
1818
1819    params = locals()
1820    for key, val in iteritems(params['kwargs']):
1821      if key not in all_params:
1822        raise TypeError("Got an unexpected keyword argument '%s'"
1823                        ' to method delete_storage_class' % key)
1824      params[key] = val
1825    del params['kwargs']
1826    # verify the required parameter 'name' is set
1827    if ('name' not in params) or (params['name'] is None):
1828      raise ValueError(
1829          'Missing the required parameter `name` when calling `delete_storage_class`'
1830      )
1831
1832    collection_formats = {}
1833
1834    path_params = {}
1835    if 'name' in params:
1836      path_params['name'] = params['name']
1837
1838    query_params = []
1839    if 'pretty' in params:
1840      query_params.append(('pretty', params['pretty']))
1841    if 'dry_run' in params:
1842      query_params.append(('dryRun', params['dry_run']))
1843    if 'grace_period_seconds' in params:
1844      query_params.append(
1845          ('gracePeriodSeconds', params['grace_period_seconds']))
1846    if 'orphan_dependents' in params:
1847      query_params.append(('orphanDependents', params['orphan_dependents']))
1848    if 'propagation_policy' in params:
1849      query_params.append(('propagationPolicy', params['propagation_policy']))
1850
1851    header_params = {}
1852
1853    form_params = []
1854    local_var_files = {}
1855
1856    body_params = None
1857    if 'body' in params:
1858      body_params = params['body']
1859    # HTTP header `Accept`
1860    header_params['Accept'] = self.api_client.\
1861        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
1862
1863    # HTTP header `Content-Type`
1864    header_params['Content-Type'] = self.api_client.\
1865        select_header_content_type(['*/*'])
1866
1867    # Authentication setting
1868    auth_settings = ['BearerToken']
1869
1870    return self.api_client.call_api(
1871        '/apis/storage.k8s.io/v1beta1/storageclasses/{name}',
1872        'DELETE',
1873        path_params,
1874        query_params,
1875        header_params,
1876        body=body_params,
1877        post_params=form_params,
1878        files=local_var_files,
1879        response_type='V1Status',
1880        auth_settings=auth_settings,
1881        async_req=params.get('async_req'),
1882        _return_http_data_only=params.get('_return_http_data_only'),
1883        _preload_content=params.get('_preload_content', True),
1884        _request_timeout=params.get('_request_timeout'),
1885        collection_formats=collection_formats)
1886
1887  def delete_volume_attachment(self, name, **kwargs):
1888    """
1889        delete a VolumeAttachment
1890        This method makes a synchronous HTTP request by default. To make an
1891        asynchronous HTTP request, please pass async_req=True
1892        >>> thread = api.delete_volume_attachment(name, async_req=True)
1893        >>> result = thread.get()
1894
1895        :param async_req bool
1896        :param str name: name of the VolumeAttachment (required)
1897        :param str pretty: If 'true', then the output is pretty printed.
1898        :param V1DeleteOptions body:
1899        :param str dry_run: When present, indicates that modifications should
1900        not be persisted. An invalid or unrecognized dryRun directive will
1901        result in an error response and no further processing of the request.
1902        Valid values are: - All: all dry run stages will be processed
1903        :param int grace_period_seconds: The duration in seconds before the
1904        object should be deleted. Value must be non-negative integer. The value
1905        zero indicates delete immediately. If this value is nil, the default
1906        grace period for the specified type will be used. Defaults to a per
1907        object value if not specified. zero means delete immediately.
1908        :param bool orphan_dependents: Deprecated: please use the
1909        PropagationPolicy, this field will be deprecated in 1.7. Should the
1910        dependent objects be orphaned. If true/false, the \"orphan\" finalizer
1911        will be added to/removed from the object's finalizers list. Either this
1912        field or PropagationPolicy may be set, but not both.
1913        :param str propagation_policy: Whether and how garbage collection will
1914        be performed. Either this field or OrphanDependents may be set, but not
1915        both. The default policy is decided by the existing finalizer set in the
1916        metadata.finalizers and the resource-specific default policy. Acceptable
1917        values are: 'Orphan' - orphan the dependents; 'Background' - allow the
1918        garbage collector to delete the dependents in the background;
1919        'Foreground' - a cascading policy that deletes all dependents in the
1920        foreground.
1921        :return: V1Status
1922                 If the method is called asynchronously,
1923                 returns the request thread.
1924        """
1925    kwargs['_return_http_data_only'] = True
1926    if kwargs.get('async_req'):
1927      return self.delete_volume_attachment_with_http_info(name, **kwargs)
1928    else:
1929      (data) = self.delete_volume_attachment_with_http_info(name, **kwargs)
1930      return data
1931
1932  def delete_volume_attachment_with_http_info(self, name, **kwargs):
1933    """
1934        delete a VolumeAttachment
1935        This method makes a synchronous HTTP request by default. To make an
1936        asynchronous HTTP request, please pass async_req=True
1937        >>> thread = api.delete_volume_attachment_with_http_info(name,
1938        async_req=True)
1939        >>> result = thread.get()
1940
1941        :param async_req bool
1942        :param str name: name of the VolumeAttachment (required)
1943        :param str pretty: If 'true', then the output is pretty printed.
1944        :param V1DeleteOptions body:
1945        :param str dry_run: When present, indicates that modifications should
1946        not be persisted. An invalid or unrecognized dryRun directive will
1947        result in an error response and no further processing of the request.
1948        Valid values are: - All: all dry run stages will be processed
1949        :param int grace_period_seconds: The duration in seconds before the
1950        object should be deleted. Value must be non-negative integer. The value
1951        zero indicates delete immediately. If this value is nil, the default
1952        grace period for the specified type will be used. Defaults to a per
1953        object value if not specified. zero means delete immediately.
1954        :param bool orphan_dependents: Deprecated: please use the
1955        PropagationPolicy, this field will be deprecated in 1.7. Should the
1956        dependent objects be orphaned. If true/false, the \"orphan\" finalizer
1957        will be added to/removed from the object's finalizers list. Either this
1958        field or PropagationPolicy may be set, but not both.
1959        :param str propagation_policy: Whether and how garbage collection will
1960        be performed. Either this field or OrphanDependents may be set, but not
1961        both. The default policy is decided by the existing finalizer set in the
1962        metadata.finalizers and the resource-specific default policy. Acceptable
1963        values are: 'Orphan' - orphan the dependents; 'Background' - allow the
1964        garbage collector to delete the dependents in the background;
1965        'Foreground' - a cascading policy that deletes all dependents in the
1966        foreground.
1967        :return: V1Status
1968                 If the method is called asynchronously,
1969                 returns the request thread.
1970        """
1971
1972    all_params = [
1973        'name', 'pretty', 'body', 'dry_run', 'grace_period_seconds',
1974        'orphan_dependents', 'propagation_policy'
1975    ]
1976    all_params.append('async_req')
1977    all_params.append('_return_http_data_only')
1978    all_params.append('_preload_content')
1979    all_params.append('_request_timeout')
1980
1981    params = locals()
1982    for key, val in iteritems(params['kwargs']):
1983      if key not in all_params:
1984        raise TypeError("Got an unexpected keyword argument '%s'"
1985                        ' to method delete_volume_attachment' % key)
1986      params[key] = val
1987    del params['kwargs']
1988    # verify the required parameter 'name' is set
1989    if ('name' not in params) or (params['name'] is None):
1990      raise ValueError(
1991          'Missing the required parameter `name` when calling `delete_volume_attachment`'
1992      )
1993
1994    collection_formats = {}
1995
1996    path_params = {}
1997    if 'name' in params:
1998      path_params['name'] = params['name']
1999
2000    query_params = []
2001    if 'pretty' in params:
2002      query_params.append(('pretty', params['pretty']))
2003    if 'dry_run' in params:
2004      query_params.append(('dryRun', params['dry_run']))
2005    if 'grace_period_seconds' in params:
2006      query_params.append(
2007          ('gracePeriodSeconds', params['grace_period_seconds']))
2008    if 'orphan_dependents' in params:
2009      query_params.append(('orphanDependents', params['orphan_dependents']))
2010    if 'propagation_policy' in params:
2011      query_params.append(('propagationPolicy', params['propagation_policy']))
2012
2013    header_params = {}
2014
2015    form_params = []
2016    local_var_files = {}
2017
2018    body_params = None
2019    if 'body' in params:
2020      body_params = params['body']
2021    # HTTP header `Accept`
2022    header_params['Accept'] = self.api_client.\
2023        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
2024
2025    # HTTP header `Content-Type`
2026    header_params['Content-Type'] = self.api_client.\
2027        select_header_content_type(['*/*'])
2028
2029    # Authentication setting
2030    auth_settings = ['BearerToken']
2031
2032    return self.api_client.call_api(
2033        '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}',
2034        'DELETE',
2035        path_params,
2036        query_params,
2037        header_params,
2038        body=body_params,
2039        post_params=form_params,
2040        files=local_var_files,
2041        response_type='V1Status',
2042        auth_settings=auth_settings,
2043        async_req=params.get('async_req'),
2044        _return_http_data_only=params.get('_return_http_data_only'),
2045        _preload_content=params.get('_preload_content', True),
2046        _request_timeout=params.get('_request_timeout'),
2047        collection_formats=collection_formats)
2048
2049  def get_api_resources(self, **kwargs):
2050    """
2051        get available resources
2052        This method makes a synchronous HTTP request by default. To make an
2053        asynchronous HTTP request, please pass async_req=True
2054        >>> thread = api.get_api_resources(async_req=True)
2055        >>> result = thread.get()
2056
2057        :param async_req bool
2058        :return: V1APIResourceList
2059                 If the method is called asynchronously,
2060                 returns the request thread.
2061        """
2062    kwargs['_return_http_data_only'] = True
2063    if kwargs.get('async_req'):
2064      return self.get_api_resources_with_http_info(**kwargs)
2065    else:
2066      (data) = self.get_api_resources_with_http_info(**kwargs)
2067      return data
2068
2069  def get_api_resources_with_http_info(self, **kwargs):
2070    """
2071        get available resources
2072        This method makes a synchronous HTTP request by default. To make an
2073        asynchronous HTTP request, please pass async_req=True
2074        >>> thread = api.get_api_resources_with_http_info(async_req=True)
2075        >>> result = thread.get()
2076
2077        :param async_req bool
2078        :return: V1APIResourceList
2079                 If the method is called asynchronously,
2080                 returns the request thread.
2081        """
2082
2083    all_params = []
2084    all_params.append('async_req')
2085    all_params.append('_return_http_data_only')
2086    all_params.append('_preload_content')
2087    all_params.append('_request_timeout')
2088
2089    params = locals()
2090    for key, val in iteritems(params['kwargs']):
2091      if key not in all_params:
2092        raise TypeError("Got an unexpected keyword argument '%s'"
2093                        ' to method get_api_resources' % key)
2094      params[key] = val
2095    del params['kwargs']
2096
2097    collection_formats = {}
2098
2099    path_params = {}
2100
2101    query_params = []
2102
2103    header_params = {}
2104
2105    form_params = []
2106    local_var_files = {}
2107
2108    body_params = None
2109    # HTTP header `Accept`
2110    header_params['Accept'] = self.api_client.\
2111        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
2112
2113    # HTTP header `Content-Type`
2114    header_params['Content-Type'] = self.api_client.\
2115        select_header_content_type(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
2116
2117    # Authentication setting
2118    auth_settings = ['BearerToken']
2119
2120    return self.api_client.call_api(
2121        '/apis/storage.k8s.io/v1beta1/',
2122        'GET',
2123        path_params,
2124        query_params,
2125        header_params,
2126        body=body_params,
2127        post_params=form_params,
2128        files=local_var_files,
2129        response_type='V1APIResourceList',
2130        auth_settings=auth_settings,
2131        async_req=params.get('async_req'),
2132        _return_http_data_only=params.get('_return_http_data_only'),
2133        _preload_content=params.get('_preload_content', True),
2134        _request_timeout=params.get('_request_timeout'),
2135        collection_formats=collection_formats)
2136
2137  def list_csi_driver(self, **kwargs):
2138    """
2139        list or watch objects of kind CSIDriver
2140        This method makes a synchronous HTTP request by default. To make an
2141        asynchronous HTTP request, please pass async_req=True
2142        >>> thread = api.list_csi_driver(async_req=True)
2143        >>> result = thread.get()
2144
2145        :param async_req bool
2146        :param str pretty: If 'true', then the output is pretty printed.
2147        :param str _continue: The continue option should be set when retrieving
2148        more results from the server. Since this value is server defined,
2149        clients may only use the continue value from a previous query result
2150        with identical query parameters (except for the value of continue) and
2151        the server may reject a continue value it does not recognize. If the
2152        specified continue value is no longer valid whether due to expiration
2153        (generally five to fifteen minutes) or a configuration change on the
2154        server, the server will respond with a 410 ResourceExpired error
2155        together with a continue token. If the client needs a consistent list,
2156        it must restart their list without the continue field. Otherwise, the
2157        client may send another list request with the token received with the
2158        410 error, the server will respond with a list starting from the next
2159        key, but from the latest snapshot, which is inconsistent from the
2160        previous list results - objects that are created, modified, or deleted
2161        after the first list request will be included in the response, as long
2162        as their keys are after the \"next key\".  This field is not supported
2163        when watch is true. Clients may start a watch from the last
2164        resourceVersion value returned by the server and not miss any
2165        modifications.
2166        :param str field_selector: A selector to restrict the list of returned
2167        objects by their fields. Defaults to everything.
2168        :param str label_selector: A selector to restrict the list of returned
2169        objects by their labels. Defaults to everything.
2170        :param int limit: limit is a maximum number of responses to return for a
2171        list call. If more items exist, the server will set the `continue` field
2172        on the list metadata to a value that can be used with the same initial
2173        query to retrieve the next set of results. Setting a limit may return
2174        fewer than the requested amount of items (up to zero items) in the event
2175        all requested objects are filtered out and clients should only use the
2176        presence of the continue field to determine whether more results are
2177        available. Servers may choose not to support the limit argument and will
2178        return all of the available results. If limit is specified and the
2179        continue field is empty, clients may assume that no more results are
2180        available. This field is not supported if watch is true.  The server
2181        guarantees that the objects returned when using continue will be
2182        identical to issuing a single list call without a limit - that is, no
2183        objects created, modified, or deleted after the first request is issued
2184        will be included in any subsequent continued requests. This is sometimes
2185        referred to as a consistent snapshot, and ensures that a client that is
2186        using limit to receive smaller chunks of a very large result can ensure
2187        they see all possible objects. If objects are updated during a chunked
2188        list the version of the object that was present at the time the first
2189        list result was calculated is returned.
2190        :param str resource_version: When specified with a watch call, shows
2191        changes that occur after that particular version of a resource. Defaults
2192        to changes from the beginning of history. When specified for list: - if
2193        unset, then the result is returned from remote storage based on
2194        quorum-read flag; - if it's 0, then we simply return what we currently
2195        have in cache, no guarantee; - if set to non zero, then the result is at
2196        least as fresh as given rv.
2197        :param int timeout_seconds: Timeout for the list/watch call. This limits
2198        the duration of the call, regardless of any activity or inactivity.
2199        :param bool watch: Watch for changes to the described resources and
2200        return them as a stream of add, update, and remove notifications.
2201        Specify resourceVersion.
2202        :return: V1beta1CSIDriverList
2203                 If the method is called asynchronously,
2204                 returns the request thread.
2205        """
2206    kwargs['_return_http_data_only'] = True
2207    if kwargs.get('async_req'):
2208      return self.list_csi_driver_with_http_info(**kwargs)
2209    else:
2210      (data) = self.list_csi_driver_with_http_info(**kwargs)
2211      return data
2212
2213  def list_csi_driver_with_http_info(self, **kwargs):
2214    """
2215        list or watch objects of kind CSIDriver
2216        This method makes a synchronous HTTP request by default. To make an
2217        asynchronous HTTP request, please pass async_req=True
2218        >>> thread = api.list_csi_driver_with_http_info(async_req=True)
2219        >>> result = thread.get()
2220
2221        :param async_req bool
2222        :param str pretty: If 'true', then the output is pretty printed.
2223        :param str _continue: The continue option should be set when retrieving
2224        more results from the server. Since this value is server defined,
2225        clients may only use the continue value from a previous query result
2226        with identical query parameters (except for the value of continue) and
2227        the server may reject a continue value it does not recognize. If the
2228        specified continue value is no longer valid whether due to expiration
2229        (generally five to fifteen minutes) or a configuration change on the
2230        server, the server will respond with a 410 ResourceExpired error
2231        together with a continue token. If the client needs a consistent list,
2232        it must restart their list without the continue field. Otherwise, the
2233        client may send another list request with the token received with the
2234        410 error, the server will respond with a list starting from the next
2235        key, but from the latest snapshot, which is inconsistent from the
2236        previous list results - objects that are created, modified, or deleted
2237        after the first list request will be included in the response, as long
2238        as their keys are after the \"next key\".  This field is not supported
2239        when watch is true. Clients may start a watch from the last
2240        resourceVersion value returned by the server and not miss any
2241        modifications.
2242        :param str field_selector: A selector to restrict the list of returned
2243        objects by their fields. Defaults to everything.
2244        :param str label_selector: A selector to restrict the list of returned
2245        objects by their labels. Defaults to everything.
2246        :param int limit: limit is a maximum number of responses to return for a
2247        list call. If more items exist, the server will set the `continue` field
2248        on the list metadata to a value that can be used with the same initial
2249        query to retrieve the next set of results. Setting a limit may return
2250        fewer than the requested amount of items (up to zero items) in the event
2251        all requested objects are filtered out and clients should only use the
2252        presence of the continue field to determine whether more results are
2253        available. Servers may choose not to support the limit argument and will
2254        return all of the available results. If limit is specified and the
2255        continue field is empty, clients may assume that no more results are
2256        available. This field is not supported if watch is true.  The server
2257        guarantees that the objects returned when using continue will be
2258        identical to issuing a single list call without a limit - that is, no
2259        objects created, modified, or deleted after the first request is issued
2260        will be included in any subsequent continued requests. This is sometimes
2261        referred to as a consistent snapshot, and ensures that a client that is
2262        using limit to receive smaller chunks of a very large result can ensure
2263        they see all possible objects. If objects are updated during a chunked
2264        list the version of the object that was present at the time the first
2265        list result was calculated is returned.
2266        :param str resource_version: When specified with a watch call, shows
2267        changes that occur after that particular version of a resource. Defaults
2268        to changes from the beginning of history. When specified for list: - if
2269        unset, then the result is returned from remote storage based on
2270        quorum-read flag; - if it's 0, then we simply return what we currently
2271        have in cache, no guarantee; - if set to non zero, then the result is at
2272        least as fresh as given rv.
2273        :param int timeout_seconds: Timeout for the list/watch call. This limits
2274        the duration of the call, regardless of any activity or inactivity.
2275        :param bool watch: Watch for changes to the described resources and
2276        return them as a stream of add, update, and remove notifications.
2277        Specify resourceVersion.
2278        :return: V1beta1CSIDriverList
2279                 If the method is called asynchronously,
2280                 returns the request thread.
2281        """
2282
2283    all_params = [
2284        'pretty', '_continue', 'field_selector', 'label_selector', 'limit',
2285        'resource_version', 'timeout_seconds', 'watch'
2286    ]
2287    all_params.append('async_req')
2288    all_params.append('_return_http_data_only')
2289    all_params.append('_preload_content')
2290    all_params.append('_request_timeout')
2291
2292    params = locals()
2293    for key, val in iteritems(params['kwargs']):
2294      if key not in all_params:
2295        raise TypeError("Got an unexpected keyword argument '%s'"
2296                        ' to method list_csi_driver' % key)
2297      params[key] = val
2298    del params['kwargs']
2299
2300    collection_formats = {}
2301
2302    path_params = {}
2303
2304    query_params = []
2305    if 'pretty' in params:
2306      query_params.append(('pretty', params['pretty']))
2307    if '_continue' in params:
2308      query_params.append(('continue', params['_continue']))
2309    if 'field_selector' in params:
2310      query_params.append(('fieldSelector', params['field_selector']))
2311    if 'label_selector' in params:
2312      query_params.append(('labelSelector', params['label_selector']))
2313    if 'limit' in params:
2314      query_params.append(('limit', params['limit']))
2315    if 'resource_version' in params:
2316      query_params.append(('resourceVersion', params['resource_version']))
2317    if 'timeout_seconds' in params:
2318      query_params.append(('timeoutSeconds', params['timeout_seconds']))
2319    if 'watch' in params:
2320      query_params.append(('watch', params['watch']))
2321
2322    header_params = {}
2323
2324    form_params = []
2325    local_var_files = {}
2326
2327    body_params = None
2328    # HTTP header `Accept`
2329    header_params['Accept'] = self.api_client.\
2330        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
2331
2332    # HTTP header `Content-Type`
2333    header_params['Content-Type'] = self.api_client.\
2334        select_header_content_type(['*/*'])
2335
2336    # Authentication setting
2337    auth_settings = ['BearerToken']
2338
2339    return self.api_client.call_api(
2340        '/apis/storage.k8s.io/v1beta1/csidrivers',
2341        'GET',
2342        path_params,
2343        query_params,
2344        header_params,
2345        body=body_params,
2346        post_params=form_params,
2347        files=local_var_files,
2348        response_type='V1beta1CSIDriverList',
2349        auth_settings=auth_settings,
2350        async_req=params.get('async_req'),
2351        _return_http_data_only=params.get('_return_http_data_only'),
2352        _preload_content=params.get('_preload_content', True),
2353        _request_timeout=params.get('_request_timeout'),
2354        collection_formats=collection_formats)
2355
2356  def list_csi_node(self, **kwargs):
2357    """
2358        list or watch objects of kind CSINode
2359        This method makes a synchronous HTTP request by default. To make an
2360        asynchronous HTTP request, please pass async_req=True
2361        >>> thread = api.list_csi_node(async_req=True)
2362        >>> result = thread.get()
2363
2364        :param async_req bool
2365        :param str pretty: If 'true', then the output is pretty printed.
2366        :param str _continue: The continue option should be set when retrieving
2367        more results from the server. Since this value is server defined,
2368        clients may only use the continue value from a previous query result
2369        with identical query parameters (except for the value of continue) and
2370        the server may reject a continue value it does not recognize. If the
2371        specified continue value is no longer valid whether due to expiration
2372        (generally five to fifteen minutes) or a configuration change on the
2373        server, the server will respond with a 410 ResourceExpired error
2374        together with a continue token. If the client needs a consistent list,
2375        it must restart their list without the continue field. Otherwise, the
2376        client may send another list request with the token received with the
2377        410 error, the server will respond with a list starting from the next
2378        key, but from the latest snapshot, which is inconsistent from the
2379        previous list results - objects that are created, modified, or deleted
2380        after the first list request will be included in the response, as long
2381        as their keys are after the \"next key\".  This field is not supported
2382        when watch is true. Clients may start a watch from the last
2383        resourceVersion value returned by the server and not miss any
2384        modifications.
2385        :param str field_selector: A selector to restrict the list of returned
2386        objects by their fields. Defaults to everything.
2387        :param str label_selector: A selector to restrict the list of returned
2388        objects by their labels. Defaults to everything.
2389        :param int limit: limit is a maximum number of responses to return for a
2390        list call. If more items exist, the server will set the `continue` field
2391        on the list metadata to a value that can be used with the same initial
2392        query to retrieve the next set of results. Setting a limit may return
2393        fewer than the requested amount of items (up to zero items) in the event
2394        all requested objects are filtered out and clients should only use the
2395        presence of the continue field to determine whether more results are
2396        available. Servers may choose not to support the limit argument and will
2397        return all of the available results. If limit is specified and the
2398        continue field is empty, clients may assume that no more results are
2399        available. This field is not supported if watch is true.  The server
2400        guarantees that the objects returned when using continue will be
2401        identical to issuing a single list call without a limit - that is, no
2402        objects created, modified, or deleted after the first request is issued
2403        will be included in any subsequent continued requests. This is sometimes
2404        referred to as a consistent snapshot, and ensures that a client that is
2405        using limit to receive smaller chunks of a very large result can ensure
2406        they see all possible objects. If objects are updated during a chunked
2407        list the version of the object that was present at the time the first
2408        list result was calculated is returned.
2409        :param str resource_version: When specified with a watch call, shows
2410        changes that occur after that particular version of a resource. Defaults
2411        to changes from the beginning of history. When specified for list: - if
2412        unset, then the result is returned from remote storage based on
2413        quorum-read flag; - if it's 0, then we simply return what we currently
2414        have in cache, no guarantee; - if set to non zero, then the result is at
2415        least as fresh as given rv.
2416        :param int timeout_seconds: Timeout for the list/watch call. This limits
2417        the duration of the call, regardless of any activity or inactivity.
2418        :param bool watch: Watch for changes to the described resources and
2419        return them as a stream of add, update, and remove notifications.
2420        Specify resourceVersion.
2421        :return: V1beta1CSINodeList
2422                 If the method is called asynchronously,
2423                 returns the request thread.
2424        """
2425    kwargs['_return_http_data_only'] = True
2426    if kwargs.get('async_req'):
2427      return self.list_csi_node_with_http_info(**kwargs)
2428    else:
2429      (data) = self.list_csi_node_with_http_info(**kwargs)
2430      return data
2431
2432  def list_csi_node_with_http_info(self, **kwargs):
2433    """
2434        list or watch objects of kind CSINode
2435        This method makes a synchronous HTTP request by default. To make an
2436        asynchronous HTTP request, please pass async_req=True
2437        >>> thread = api.list_csi_node_with_http_info(async_req=True)
2438        >>> result = thread.get()
2439
2440        :param async_req bool
2441        :param str pretty: If 'true', then the output is pretty printed.
2442        :param str _continue: The continue option should be set when retrieving
2443        more results from the server. Since this value is server defined,
2444        clients may only use the continue value from a previous query result
2445        with identical query parameters (except for the value of continue) and
2446        the server may reject a continue value it does not recognize. If the
2447        specified continue value is no longer valid whether due to expiration
2448        (generally five to fifteen minutes) or a configuration change on the
2449        server, the server will respond with a 410 ResourceExpired error
2450        together with a continue token. If the client needs a consistent list,
2451        it must restart their list without the continue field. Otherwise, the
2452        client may send another list request with the token received with the
2453        410 error, the server will respond with a list starting from the next
2454        key, but from the latest snapshot, which is inconsistent from the
2455        previous list results - objects that are created, modified, or deleted
2456        after the first list request will be included in the response, as long
2457        as their keys are after the \"next key\".  This field is not supported
2458        when watch is true. Clients may start a watch from the last
2459        resourceVersion value returned by the server and not miss any
2460        modifications.
2461        :param str field_selector: A selector to restrict the list of returned
2462        objects by their fields. Defaults to everything.
2463        :param str label_selector: A selector to restrict the list of returned
2464        objects by their labels. Defaults to everything.
2465        :param int limit: limit is a maximum number of responses to return for a
2466        list call. If more items exist, the server will set the `continue` field
2467        on the list metadata to a value that can be used with the same initial
2468        query to retrieve the next set of results. Setting a limit may return
2469        fewer than the requested amount of items (up to zero items) in the event
2470        all requested objects are filtered out and clients should only use the
2471        presence of the continue field to determine whether more results are
2472        available. Servers may choose not to support the limit argument and will
2473        return all of the available results. If limit is specified and the
2474        continue field is empty, clients may assume that no more results are
2475        available. This field is not supported if watch is true.  The server
2476        guarantees that the objects returned when using continue will be
2477        identical to issuing a single list call without a limit - that is, no
2478        objects created, modified, or deleted after the first request is issued
2479        will be included in any subsequent continued requests. This is sometimes
2480        referred to as a consistent snapshot, and ensures that a client that is
2481        using limit to receive smaller chunks of a very large result can ensure
2482        they see all possible objects. If objects are updated during a chunked
2483        list the version of the object that was present at the time the first
2484        list result was calculated is returned.
2485        :param str resource_version: When specified with a watch call, shows
2486        changes that occur after that particular version of a resource. Defaults
2487        to changes from the beginning of history. When specified for list: - if
2488        unset, then the result is returned from remote storage based on
2489        quorum-read flag; - if it's 0, then we simply return what we currently
2490        have in cache, no guarantee; - if set to non zero, then the result is at
2491        least as fresh as given rv.
2492        :param int timeout_seconds: Timeout for the list/watch call. This limits
2493        the duration of the call, regardless of any activity or inactivity.
2494        :param bool watch: Watch for changes to the described resources and
2495        return them as a stream of add, update, and remove notifications.
2496        Specify resourceVersion.
2497        :return: V1beta1CSINodeList
2498                 If the method is called asynchronously,
2499                 returns the request thread.
2500        """
2501
2502    all_params = [
2503        'pretty', '_continue', 'field_selector', 'label_selector', 'limit',
2504        'resource_version', 'timeout_seconds', 'watch'
2505    ]
2506    all_params.append('async_req')
2507    all_params.append('_return_http_data_only')
2508    all_params.append('_preload_content')
2509    all_params.append('_request_timeout')
2510
2511    params = locals()
2512    for key, val in iteritems(params['kwargs']):
2513      if key not in all_params:
2514        raise TypeError("Got an unexpected keyword argument '%s'"
2515                        ' to method list_csi_node' % key)
2516      params[key] = val
2517    del params['kwargs']
2518
2519    collection_formats = {}
2520
2521    path_params = {}
2522
2523    query_params = []
2524    if 'pretty' in params:
2525      query_params.append(('pretty', params['pretty']))
2526    if '_continue' in params:
2527      query_params.append(('continue', params['_continue']))
2528    if 'field_selector' in params:
2529      query_params.append(('fieldSelector', params['field_selector']))
2530    if 'label_selector' in params:
2531      query_params.append(('labelSelector', params['label_selector']))
2532    if 'limit' in params:
2533      query_params.append(('limit', params['limit']))
2534    if 'resource_version' in params:
2535      query_params.append(('resourceVersion', params['resource_version']))
2536    if 'timeout_seconds' in params:
2537      query_params.append(('timeoutSeconds', params['timeout_seconds']))
2538    if 'watch' in params:
2539      query_params.append(('watch', params['watch']))
2540
2541    header_params = {}
2542
2543    form_params = []
2544    local_var_files = {}
2545
2546    body_params = None
2547    # HTTP header `Accept`
2548    header_params['Accept'] = self.api_client.\
2549        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
2550
2551    # HTTP header `Content-Type`
2552    header_params['Content-Type'] = self.api_client.\
2553        select_header_content_type(['*/*'])
2554
2555    # Authentication setting
2556    auth_settings = ['BearerToken']
2557
2558    return self.api_client.call_api(
2559        '/apis/storage.k8s.io/v1beta1/csinodes',
2560        'GET',
2561        path_params,
2562        query_params,
2563        header_params,
2564        body=body_params,
2565        post_params=form_params,
2566        files=local_var_files,
2567        response_type='V1beta1CSINodeList',
2568        auth_settings=auth_settings,
2569        async_req=params.get('async_req'),
2570        _return_http_data_only=params.get('_return_http_data_only'),
2571        _preload_content=params.get('_preload_content', True),
2572        _request_timeout=params.get('_request_timeout'),
2573        collection_formats=collection_formats)
2574
2575  def list_storage_class(self, **kwargs):
2576    """
2577        list or watch objects of kind StorageClass
2578        This method makes a synchronous HTTP request by default. To make an
2579        asynchronous HTTP request, please pass async_req=True
2580        >>> thread = api.list_storage_class(async_req=True)
2581        >>> result = thread.get()
2582
2583        :param async_req bool
2584        :param str pretty: If 'true', then the output is pretty printed.
2585        :param str _continue: The continue option should be set when retrieving
2586        more results from the server. Since this value is server defined,
2587        clients may only use the continue value from a previous query result
2588        with identical query parameters (except for the value of continue) and
2589        the server may reject a continue value it does not recognize. If the
2590        specified continue value is no longer valid whether due to expiration
2591        (generally five to fifteen minutes) or a configuration change on the
2592        server, the server will respond with a 410 ResourceExpired error
2593        together with a continue token. If the client needs a consistent list,
2594        it must restart their list without the continue field. Otherwise, the
2595        client may send another list request with the token received with the
2596        410 error, the server will respond with a list starting from the next
2597        key, but from the latest snapshot, which is inconsistent from the
2598        previous list results - objects that are created, modified, or deleted
2599        after the first list request will be included in the response, as long
2600        as their keys are after the \"next key\".  This field is not supported
2601        when watch is true. Clients may start a watch from the last
2602        resourceVersion value returned by the server and not miss any
2603        modifications.
2604        :param str field_selector: A selector to restrict the list of returned
2605        objects by their fields. Defaults to everything.
2606        :param str label_selector: A selector to restrict the list of returned
2607        objects by their labels. Defaults to everything.
2608        :param int limit: limit is a maximum number of responses to return for a
2609        list call. If more items exist, the server will set the `continue` field
2610        on the list metadata to a value that can be used with the same initial
2611        query to retrieve the next set of results. Setting a limit may return
2612        fewer than the requested amount of items (up to zero items) in the event
2613        all requested objects are filtered out and clients should only use the
2614        presence of the continue field to determine whether more results are
2615        available. Servers may choose not to support the limit argument and will
2616        return all of the available results. If limit is specified and the
2617        continue field is empty, clients may assume that no more results are
2618        available. This field is not supported if watch is true.  The server
2619        guarantees that the objects returned when using continue will be
2620        identical to issuing a single list call without a limit - that is, no
2621        objects created, modified, or deleted after the first request is issued
2622        will be included in any subsequent continued requests. This is sometimes
2623        referred to as a consistent snapshot, and ensures that a client that is
2624        using limit to receive smaller chunks of a very large result can ensure
2625        they see all possible objects. If objects are updated during a chunked
2626        list the version of the object that was present at the time the first
2627        list result was calculated is returned.
2628        :param str resource_version: When specified with a watch call, shows
2629        changes that occur after that particular version of a resource. Defaults
2630        to changes from the beginning of history. When specified for list: - if
2631        unset, then the result is returned from remote storage based on
2632        quorum-read flag; - if it's 0, then we simply return what we currently
2633        have in cache, no guarantee; - if set to non zero, then the result is at
2634        least as fresh as given rv.
2635        :param int timeout_seconds: Timeout for the list/watch call. This limits
2636        the duration of the call, regardless of any activity or inactivity.
2637        :param bool watch: Watch for changes to the described resources and
2638        return them as a stream of add, update, and remove notifications.
2639        Specify resourceVersion.
2640        :return: V1beta1StorageClassList
2641                 If the method is called asynchronously,
2642                 returns the request thread.
2643        """
2644    kwargs['_return_http_data_only'] = True
2645    if kwargs.get('async_req'):
2646      return self.list_storage_class_with_http_info(**kwargs)
2647    else:
2648      (data) = self.list_storage_class_with_http_info(**kwargs)
2649      return data
2650
2651  def list_storage_class_with_http_info(self, **kwargs):
2652    """
2653        list or watch objects of kind StorageClass
2654        This method makes a synchronous HTTP request by default. To make an
2655        asynchronous HTTP request, please pass async_req=True
2656        >>> thread = api.list_storage_class_with_http_info(async_req=True)
2657        >>> result = thread.get()
2658
2659        :param async_req bool
2660        :param str pretty: If 'true', then the output is pretty printed.
2661        :param str _continue: The continue option should be set when retrieving
2662        more results from the server. Since this value is server defined,
2663        clients may only use the continue value from a previous query result
2664        with identical query parameters (except for the value of continue) and
2665        the server may reject a continue value it does not recognize. If the
2666        specified continue value is no longer valid whether due to expiration
2667        (generally five to fifteen minutes) or a configuration change on the
2668        server, the server will respond with a 410 ResourceExpired error
2669        together with a continue token. If the client needs a consistent list,
2670        it must restart their list without the continue field. Otherwise, the
2671        client may send another list request with the token received with the
2672        410 error, the server will respond with a list starting from the next
2673        key, but from the latest snapshot, which is inconsistent from the
2674        previous list results - objects that are created, modified, or deleted
2675        after the first list request will be included in the response, as long
2676        as their keys are after the \"next key\".  This field is not supported
2677        when watch is true. Clients may start a watch from the last
2678        resourceVersion value returned by the server and not miss any
2679        modifications.
2680        :param str field_selector: A selector to restrict the list of returned
2681        objects by their fields. Defaults to everything.
2682        :param str label_selector: A selector to restrict the list of returned
2683        objects by their labels. Defaults to everything.
2684        :param int limit: limit is a maximum number of responses to return for a
2685        list call. If more items exist, the server will set the `continue` field
2686        on the list metadata to a value that can be used with the same initial
2687        query to retrieve the next set of results. Setting a limit may return
2688        fewer than the requested amount of items (up to zero items) in the event
2689        all requested objects are filtered out and clients should only use the
2690        presence of the continue field to determine whether more results are
2691        available. Servers may choose not to support the limit argument and will
2692        return all of the available results. If limit is specified and the
2693        continue field is empty, clients may assume that no more results are
2694        available. This field is not supported if watch is true.  The server
2695        guarantees that the objects returned when using continue will be
2696        identical to issuing a single list call without a limit - that is, no
2697        objects created, modified, or deleted after the first request is issued
2698        will be included in any subsequent continued requests. This is sometimes
2699        referred to as a consistent snapshot, and ensures that a client that is
2700        using limit to receive smaller chunks of a very large result can ensure
2701        they see all possible objects. If objects are updated during a chunked
2702        list the version of the object that was present at the time the first
2703        list result was calculated is returned.
2704        :param str resource_version: When specified with a watch call, shows
2705        changes that occur after that particular version of a resource. Defaults
2706        to changes from the beginning of history. When specified for list: - if
2707        unset, then the result is returned from remote storage based on
2708        quorum-read flag; - if it's 0, then we simply return what we currently
2709        have in cache, no guarantee; - if set to non zero, then the result is at
2710        least as fresh as given rv.
2711        :param int timeout_seconds: Timeout for the list/watch call. This limits
2712        the duration of the call, regardless of any activity or inactivity.
2713        :param bool watch: Watch for changes to the described resources and
2714        return them as a stream of add, update, and remove notifications.
2715        Specify resourceVersion.
2716        :return: V1beta1StorageClassList
2717                 If the method is called asynchronously,
2718                 returns the request thread.
2719        """
2720
2721    all_params = [
2722        'pretty', '_continue', 'field_selector', 'label_selector', 'limit',
2723        'resource_version', 'timeout_seconds', 'watch'
2724    ]
2725    all_params.append('async_req')
2726    all_params.append('_return_http_data_only')
2727    all_params.append('_preload_content')
2728    all_params.append('_request_timeout')
2729
2730    params = locals()
2731    for key, val in iteritems(params['kwargs']):
2732      if key not in all_params:
2733        raise TypeError("Got an unexpected keyword argument '%s'"
2734                        ' to method list_storage_class' % key)
2735      params[key] = val
2736    del params['kwargs']
2737
2738    collection_formats = {}
2739
2740    path_params = {}
2741
2742    query_params = []
2743    if 'pretty' in params:
2744      query_params.append(('pretty', params['pretty']))
2745    if '_continue' in params:
2746      query_params.append(('continue', params['_continue']))
2747    if 'field_selector' in params:
2748      query_params.append(('fieldSelector', params['field_selector']))
2749    if 'label_selector' in params:
2750      query_params.append(('labelSelector', params['label_selector']))
2751    if 'limit' in params:
2752      query_params.append(('limit', params['limit']))
2753    if 'resource_version' in params:
2754      query_params.append(('resourceVersion', params['resource_version']))
2755    if 'timeout_seconds' in params:
2756      query_params.append(('timeoutSeconds', params['timeout_seconds']))
2757    if 'watch' in params:
2758      query_params.append(('watch', params['watch']))
2759
2760    header_params = {}
2761
2762    form_params = []
2763    local_var_files = {}
2764
2765    body_params = None
2766    # HTTP header `Accept`
2767    header_params['Accept'] = self.api_client.\
2768        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
2769
2770    # HTTP header `Content-Type`
2771    header_params['Content-Type'] = self.api_client.\
2772        select_header_content_type(['*/*'])
2773
2774    # Authentication setting
2775    auth_settings = ['BearerToken']
2776
2777    return self.api_client.call_api(
2778        '/apis/storage.k8s.io/v1beta1/storageclasses',
2779        'GET',
2780        path_params,
2781        query_params,
2782        header_params,
2783        body=body_params,
2784        post_params=form_params,
2785        files=local_var_files,
2786        response_type='V1beta1StorageClassList',
2787        auth_settings=auth_settings,
2788        async_req=params.get('async_req'),
2789        _return_http_data_only=params.get('_return_http_data_only'),
2790        _preload_content=params.get('_preload_content', True),
2791        _request_timeout=params.get('_request_timeout'),
2792        collection_formats=collection_formats)
2793
2794  def list_volume_attachment(self, **kwargs):
2795    """
2796        list or watch objects of kind VolumeAttachment
2797        This method makes a synchronous HTTP request by default. To make an
2798        asynchronous HTTP request, please pass async_req=True
2799        >>> thread = api.list_volume_attachment(async_req=True)
2800        >>> result = thread.get()
2801
2802        :param async_req bool
2803        :param str pretty: If 'true', then the output is pretty printed.
2804        :param str _continue: The continue option should be set when retrieving
2805        more results from the server. Since this value is server defined,
2806        clients may only use the continue value from a previous query result
2807        with identical query parameters (except for the value of continue) and
2808        the server may reject a continue value it does not recognize. If the
2809        specified continue value is no longer valid whether due to expiration
2810        (generally five to fifteen minutes) or a configuration change on the
2811        server, the server will respond with a 410 ResourceExpired error
2812        together with a continue token. If the client needs a consistent list,
2813        it must restart their list without the continue field. Otherwise, the
2814        client may send another list request with the token received with the
2815        410 error, the server will respond with a list starting from the next
2816        key, but from the latest snapshot, which is inconsistent from the
2817        previous list results - objects that are created, modified, or deleted
2818        after the first list request will be included in the response, as long
2819        as their keys are after the \"next key\".  This field is not supported
2820        when watch is true. Clients may start a watch from the last
2821        resourceVersion value returned by the server and not miss any
2822        modifications.
2823        :param str field_selector: A selector to restrict the list of returned
2824        objects by their fields. Defaults to everything.
2825        :param str label_selector: A selector to restrict the list of returned
2826        objects by their labels. Defaults to everything.
2827        :param int limit: limit is a maximum number of responses to return for a
2828        list call. If more items exist, the server will set the `continue` field
2829        on the list metadata to a value that can be used with the same initial
2830        query to retrieve the next set of results. Setting a limit may return
2831        fewer than the requested amount of items (up to zero items) in the event
2832        all requested objects are filtered out and clients should only use the
2833        presence of the continue field to determine whether more results are
2834        available. Servers may choose not to support the limit argument and will
2835        return all of the available results. If limit is specified and the
2836        continue field is empty, clients may assume that no more results are
2837        available. This field is not supported if watch is true.  The server
2838        guarantees that the objects returned when using continue will be
2839        identical to issuing a single list call without a limit - that is, no
2840        objects created, modified, or deleted after the first request is issued
2841        will be included in any subsequent continued requests. This is sometimes
2842        referred to as a consistent snapshot, and ensures that a client that is
2843        using limit to receive smaller chunks of a very large result can ensure
2844        they see all possible objects. If objects are updated during a chunked
2845        list the version of the object that was present at the time the first
2846        list result was calculated is returned.
2847        :param str resource_version: When specified with a watch call, shows
2848        changes that occur after that particular version of a resource. Defaults
2849        to changes from the beginning of history. When specified for list: - if
2850        unset, then the result is returned from remote storage based on
2851        quorum-read flag; - if it's 0, then we simply return what we currently
2852        have in cache, no guarantee; - if set to non zero, then the result is at
2853        least as fresh as given rv.
2854        :param int timeout_seconds: Timeout for the list/watch call. This limits
2855        the duration of the call, regardless of any activity or inactivity.
2856        :param bool watch: Watch for changes to the described resources and
2857        return them as a stream of add, update, and remove notifications.
2858        Specify resourceVersion.
2859        :return: V1beta1VolumeAttachmentList
2860                 If the method is called asynchronously,
2861                 returns the request thread.
2862        """
2863    kwargs['_return_http_data_only'] = True
2864    if kwargs.get('async_req'):
2865      return self.list_volume_attachment_with_http_info(**kwargs)
2866    else:
2867      (data) = self.list_volume_attachment_with_http_info(**kwargs)
2868      return data
2869
2870  def list_volume_attachment_with_http_info(self, **kwargs):
2871    """
2872        list or watch objects of kind VolumeAttachment
2873        This method makes a synchronous HTTP request by default. To make an
2874        asynchronous HTTP request, please pass async_req=True
2875        >>> thread = api.list_volume_attachment_with_http_info(async_req=True)
2876        >>> result = thread.get()
2877
2878        :param async_req bool
2879        :param str pretty: If 'true', then the output is pretty printed.
2880        :param str _continue: The continue option should be set when retrieving
2881        more results from the server. Since this value is server defined,
2882        clients may only use the continue value from a previous query result
2883        with identical query parameters (except for the value of continue) and
2884        the server may reject a continue value it does not recognize. If the
2885        specified continue value is no longer valid whether due to expiration
2886        (generally five to fifteen minutes) or a configuration change on the
2887        server, the server will respond with a 410 ResourceExpired error
2888        together with a continue token. If the client needs a consistent list,
2889        it must restart their list without the continue field. Otherwise, the
2890        client may send another list request with the token received with the
2891        410 error, the server will respond with a list starting from the next
2892        key, but from the latest snapshot, which is inconsistent from the
2893        previous list results - objects that are created, modified, or deleted
2894        after the first list request will be included in the response, as long
2895        as their keys are after the \"next key\".  This field is not supported
2896        when watch is true. Clients may start a watch from the last
2897        resourceVersion value returned by the server and not miss any
2898        modifications.
2899        :param str field_selector: A selector to restrict the list of returned
2900        objects by their fields. Defaults to everything.
2901        :param str label_selector: A selector to restrict the list of returned
2902        objects by their labels. Defaults to everything.
2903        :param int limit: limit is a maximum number of responses to return for a
2904        list call. If more items exist, the server will set the `continue` field
2905        on the list metadata to a value that can be used with the same initial
2906        query to retrieve the next set of results. Setting a limit may return
2907        fewer than the requested amount of items (up to zero items) in the event
2908        all requested objects are filtered out and clients should only use the
2909        presence of the continue field to determine whether more results are
2910        available. Servers may choose not to support the limit argument and will
2911        return all of the available results. If limit is specified and the
2912        continue field is empty, clients may assume that no more results are
2913        available. This field is not supported if watch is true.  The server
2914        guarantees that the objects returned when using continue will be
2915        identical to issuing a single list call without a limit - that is, no
2916        objects created, modified, or deleted after the first request is issued
2917        will be included in any subsequent continued requests. This is sometimes
2918        referred to as a consistent snapshot, and ensures that a client that is
2919        using limit to receive smaller chunks of a very large result can ensure
2920        they see all possible objects. If objects are updated during a chunked
2921        list the version of the object that was present at the time the first
2922        list result was calculated is returned.
2923        :param str resource_version: When specified with a watch call, shows
2924        changes that occur after that particular version of a resource. Defaults
2925        to changes from the beginning of history. When specified for list: - if
2926        unset, then the result is returned from remote storage based on
2927        quorum-read flag; - if it's 0, then we simply return what we currently
2928        have in cache, no guarantee; - if set to non zero, then the result is at
2929        least as fresh as given rv.
2930        :param int timeout_seconds: Timeout for the list/watch call. This limits
2931        the duration of the call, regardless of any activity or inactivity.
2932        :param bool watch: Watch for changes to the described resources and
2933        return them as a stream of add, update, and remove notifications.
2934        Specify resourceVersion.
2935        :return: V1beta1VolumeAttachmentList
2936                 If the method is called asynchronously,
2937                 returns the request thread.
2938        """
2939
2940    all_params = [
2941        'pretty', '_continue', 'field_selector', 'label_selector', 'limit',
2942        'resource_version', 'timeout_seconds', 'watch'
2943    ]
2944    all_params.append('async_req')
2945    all_params.append('_return_http_data_only')
2946    all_params.append('_preload_content')
2947    all_params.append('_request_timeout')
2948
2949    params = locals()
2950    for key, val in iteritems(params['kwargs']):
2951      if key not in all_params:
2952        raise TypeError("Got an unexpected keyword argument '%s'"
2953                        ' to method list_volume_attachment' % key)
2954      params[key] = val
2955    del params['kwargs']
2956
2957    collection_formats = {}
2958
2959    path_params = {}
2960
2961    query_params = []
2962    if 'pretty' in params:
2963      query_params.append(('pretty', params['pretty']))
2964    if '_continue' in params:
2965      query_params.append(('continue', params['_continue']))
2966    if 'field_selector' in params:
2967      query_params.append(('fieldSelector', params['field_selector']))
2968    if 'label_selector' in params:
2969      query_params.append(('labelSelector', params['label_selector']))
2970    if 'limit' in params:
2971      query_params.append(('limit', params['limit']))
2972    if 'resource_version' in params:
2973      query_params.append(('resourceVersion', params['resource_version']))
2974    if 'timeout_seconds' in params:
2975      query_params.append(('timeoutSeconds', params['timeout_seconds']))
2976    if 'watch' in params:
2977      query_params.append(('watch', params['watch']))
2978
2979    header_params = {}
2980
2981    form_params = []
2982    local_var_files = {}
2983
2984    body_params = None
2985    # HTTP header `Accept`
2986    header_params['Accept'] = self.api_client.\
2987        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
2988
2989    # HTTP header `Content-Type`
2990    header_params['Content-Type'] = self.api_client.\
2991        select_header_content_type(['*/*'])
2992
2993    # Authentication setting
2994    auth_settings = ['BearerToken']
2995
2996    return self.api_client.call_api(
2997        '/apis/storage.k8s.io/v1beta1/volumeattachments',
2998        'GET',
2999        path_params,
3000        query_params,
3001        header_params,
3002        body=body_params,
3003        post_params=form_params,
3004        files=local_var_files,
3005        response_type='V1beta1VolumeAttachmentList',
3006        auth_settings=auth_settings,
3007        async_req=params.get('async_req'),
3008        _return_http_data_only=params.get('_return_http_data_only'),
3009        _preload_content=params.get('_preload_content', True),
3010        _request_timeout=params.get('_request_timeout'),
3011        collection_formats=collection_formats)
3012
3013  def patch_csi_driver(self, name, body, **kwargs):
3014    """
3015        partially update the specified CSIDriver
3016        This method makes a synchronous HTTP request by default. To make an
3017        asynchronous HTTP request, please pass async_req=True
3018        >>> thread = api.patch_csi_driver(name, body, async_req=True)
3019        >>> result = thread.get()
3020
3021        :param async_req bool
3022        :param str name: name of the CSIDriver (required)
3023        :param object body: (required)
3024        :param str pretty: If 'true', then the output is pretty printed.
3025        :param str dry_run: When present, indicates that modifications should
3026        not be persisted. An invalid or unrecognized dryRun directive will
3027        result in an error response and no further processing of the request.
3028        Valid values are: - All: all dry run stages will be processed
3029        :param str field_manager: fieldManager is a name associated with the
3030        actor or entity that is making these changes. The value must be less
3031        than or 128 characters long, and only contain printable characters, as
3032        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
3033        required for apply requests (application/apply-patch) but optional for
3034        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
3035        :param bool force: Force is going to \"force\" Apply requests. It means
3036        user will re-acquire conflicting fields owned by other people. Force
3037        flag must be unset for non-apply patch requests.
3038        :return: V1beta1CSIDriver
3039                 If the method is called asynchronously,
3040                 returns the request thread.
3041        """
3042    kwargs['_return_http_data_only'] = True
3043    if kwargs.get('async_req'):
3044      return self.patch_csi_driver_with_http_info(name, body, **kwargs)
3045    else:
3046      (data) = self.patch_csi_driver_with_http_info(name, body, **kwargs)
3047      return data
3048
3049  def patch_csi_driver_with_http_info(self, name, body, **kwargs):
3050    """
3051        partially update the specified CSIDriver
3052        This method makes a synchronous HTTP request by default. To make an
3053        asynchronous HTTP request, please pass async_req=True
3054        >>> thread = api.patch_csi_driver_with_http_info(name, body,
3055        async_req=True)
3056        >>> result = thread.get()
3057
3058        :param async_req bool
3059        :param str name: name of the CSIDriver (required)
3060        :param object body: (required)
3061        :param str pretty: If 'true', then the output is pretty printed.
3062        :param str dry_run: When present, indicates that modifications should
3063        not be persisted. An invalid or unrecognized dryRun directive will
3064        result in an error response and no further processing of the request.
3065        Valid values are: - All: all dry run stages will be processed
3066        :param str field_manager: fieldManager is a name associated with the
3067        actor or entity that is making these changes. The value must be less
3068        than or 128 characters long, and only contain printable characters, as
3069        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
3070        required for apply requests (application/apply-patch) but optional for
3071        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
3072        :param bool force: Force is going to \"force\" Apply requests. It means
3073        user will re-acquire conflicting fields owned by other people. Force
3074        flag must be unset for non-apply patch requests.
3075        :return: V1beta1CSIDriver
3076                 If the method is called asynchronously,
3077                 returns the request thread.
3078        """
3079
3080    all_params = ['name', 'body', 'pretty', 'dry_run', 'field_manager', 'force']
3081    all_params.append('async_req')
3082    all_params.append('_return_http_data_only')
3083    all_params.append('_preload_content')
3084    all_params.append('_request_timeout')
3085
3086    params = locals()
3087    for key, val in iteritems(params['kwargs']):
3088      if key not in all_params:
3089        raise TypeError("Got an unexpected keyword argument '%s'"
3090                        ' to method patch_csi_driver' % key)
3091      params[key] = val
3092    del params['kwargs']
3093    # verify the required parameter 'name' is set
3094    if ('name' not in params) or (params['name'] is None):
3095      raise ValueError(
3096          'Missing the required parameter `name` when calling `patch_csi_driver`'
3097      )
3098    # verify the required parameter 'body' is set
3099    if ('body' not in params) or (params['body'] is None):
3100      raise ValueError(
3101          'Missing the required parameter `body` when calling `patch_csi_driver`'
3102      )
3103
3104    collection_formats = {}
3105
3106    path_params = {}
3107    if 'name' in params:
3108      path_params['name'] = params['name']
3109
3110    query_params = []
3111    if 'pretty' in params:
3112      query_params.append(('pretty', params['pretty']))
3113    if 'dry_run' in params:
3114      query_params.append(('dryRun', params['dry_run']))
3115    if 'field_manager' in params:
3116      query_params.append(('fieldManager', params['field_manager']))
3117    if 'force' in params:
3118      query_params.append(('force', params['force']))
3119
3120    header_params = {}
3121
3122    form_params = []
3123    local_var_files = {}
3124
3125    body_params = None
3126    if 'body' in params:
3127      body_params = params['body']
3128    # HTTP header `Accept`
3129    header_params['Accept'] = self.api_client.\
3130        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
3131
3132    # HTTP header `Content-Type`
3133    header_params['Content-Type'] = self.api_client.\
3134        select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
3135
3136    # Authentication setting
3137    auth_settings = ['BearerToken']
3138
3139    return self.api_client.call_api(
3140        '/apis/storage.k8s.io/v1beta1/csidrivers/{name}',
3141        'PATCH',
3142        path_params,
3143        query_params,
3144        header_params,
3145        body=body_params,
3146        post_params=form_params,
3147        files=local_var_files,
3148        response_type='V1beta1CSIDriver',
3149        auth_settings=auth_settings,
3150        async_req=params.get('async_req'),
3151        _return_http_data_only=params.get('_return_http_data_only'),
3152        _preload_content=params.get('_preload_content', True),
3153        _request_timeout=params.get('_request_timeout'),
3154        collection_formats=collection_formats)
3155
3156  def patch_csi_node(self, name, body, **kwargs):
3157    """
3158        partially update the specified CSINode
3159        This method makes a synchronous HTTP request by default. To make an
3160        asynchronous HTTP request, please pass async_req=True
3161        >>> thread = api.patch_csi_node(name, body, async_req=True)
3162        >>> result = thread.get()
3163
3164        :param async_req bool
3165        :param str name: name of the CSINode (required)
3166        :param object body: (required)
3167        :param str pretty: If 'true', then the output is pretty printed.
3168        :param str dry_run: When present, indicates that modifications should
3169        not be persisted. An invalid or unrecognized dryRun directive will
3170        result in an error response and no further processing of the request.
3171        Valid values are: - All: all dry run stages will be processed
3172        :param str field_manager: fieldManager is a name associated with the
3173        actor or entity that is making these changes. The value must be less
3174        than or 128 characters long, and only contain printable characters, as
3175        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
3176        required for apply requests (application/apply-patch) but optional for
3177        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
3178        :param bool force: Force is going to \"force\" Apply requests. It means
3179        user will re-acquire conflicting fields owned by other people. Force
3180        flag must be unset for non-apply patch requests.
3181        :return: V1beta1CSINode
3182                 If the method is called asynchronously,
3183                 returns the request thread.
3184        """
3185    kwargs['_return_http_data_only'] = True
3186    if kwargs.get('async_req'):
3187      return self.patch_csi_node_with_http_info(name, body, **kwargs)
3188    else:
3189      (data) = self.patch_csi_node_with_http_info(name, body, **kwargs)
3190      return data
3191
3192  def patch_csi_node_with_http_info(self, name, body, **kwargs):
3193    """
3194        partially update the specified CSINode
3195        This method makes a synchronous HTTP request by default. To make an
3196        asynchronous HTTP request, please pass async_req=True
3197        >>> thread = api.patch_csi_node_with_http_info(name, body,
3198        async_req=True)
3199        >>> result = thread.get()
3200
3201        :param async_req bool
3202        :param str name: name of the CSINode (required)
3203        :param object body: (required)
3204        :param str pretty: If 'true', then the output is pretty printed.
3205        :param str dry_run: When present, indicates that modifications should
3206        not be persisted. An invalid or unrecognized dryRun directive will
3207        result in an error response and no further processing of the request.
3208        Valid values are: - All: all dry run stages will be processed
3209        :param str field_manager: fieldManager is a name associated with the
3210        actor or entity that is making these changes. The value must be less
3211        than or 128 characters long, and only contain printable characters, as
3212        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
3213        required for apply requests (application/apply-patch) but optional for
3214        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
3215        :param bool force: Force is going to \"force\" Apply requests. It means
3216        user will re-acquire conflicting fields owned by other people. Force
3217        flag must be unset for non-apply patch requests.
3218        :return: V1beta1CSINode
3219                 If the method is called asynchronously,
3220                 returns the request thread.
3221        """
3222
3223    all_params = ['name', 'body', 'pretty', 'dry_run', 'field_manager', 'force']
3224    all_params.append('async_req')
3225    all_params.append('_return_http_data_only')
3226    all_params.append('_preload_content')
3227    all_params.append('_request_timeout')
3228
3229    params = locals()
3230    for key, val in iteritems(params['kwargs']):
3231      if key not in all_params:
3232        raise TypeError("Got an unexpected keyword argument '%s'"
3233                        ' to method patch_csi_node' % key)
3234      params[key] = val
3235    del params['kwargs']
3236    # verify the required parameter 'name' is set
3237    if ('name' not in params) or (params['name'] is None):
3238      raise ValueError(
3239          'Missing the required parameter `name` when calling `patch_csi_node`')
3240    # verify the required parameter 'body' is set
3241    if ('body' not in params) or (params['body'] is None):
3242      raise ValueError(
3243          'Missing the required parameter `body` when calling `patch_csi_node`')
3244
3245    collection_formats = {}
3246
3247    path_params = {}
3248    if 'name' in params:
3249      path_params['name'] = params['name']
3250
3251    query_params = []
3252    if 'pretty' in params:
3253      query_params.append(('pretty', params['pretty']))
3254    if 'dry_run' in params:
3255      query_params.append(('dryRun', params['dry_run']))
3256    if 'field_manager' in params:
3257      query_params.append(('fieldManager', params['field_manager']))
3258    if 'force' in params:
3259      query_params.append(('force', params['force']))
3260
3261    header_params = {}
3262
3263    form_params = []
3264    local_var_files = {}
3265
3266    body_params = None
3267    if 'body' in params:
3268      body_params = params['body']
3269    # HTTP header `Accept`
3270    header_params['Accept'] = self.api_client.\
3271        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
3272
3273    # HTTP header `Content-Type`
3274    header_params['Content-Type'] = self.api_client.\
3275        select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
3276
3277    # Authentication setting
3278    auth_settings = ['BearerToken']
3279
3280    return self.api_client.call_api(
3281        '/apis/storage.k8s.io/v1beta1/csinodes/{name}',
3282        'PATCH',
3283        path_params,
3284        query_params,
3285        header_params,
3286        body=body_params,
3287        post_params=form_params,
3288        files=local_var_files,
3289        response_type='V1beta1CSINode',
3290        auth_settings=auth_settings,
3291        async_req=params.get('async_req'),
3292        _return_http_data_only=params.get('_return_http_data_only'),
3293        _preload_content=params.get('_preload_content', True),
3294        _request_timeout=params.get('_request_timeout'),
3295        collection_formats=collection_formats)
3296
3297  def patch_storage_class(self, name, body, **kwargs):
3298    """
3299        partially update the specified StorageClass
3300        This method makes a synchronous HTTP request by default. To make an
3301        asynchronous HTTP request, please pass async_req=True
3302        >>> thread = api.patch_storage_class(name, body, async_req=True)
3303        >>> result = thread.get()
3304
3305        :param async_req bool
3306        :param str name: name of the StorageClass (required)
3307        :param object body: (required)
3308        :param str pretty: If 'true', then the output is pretty printed.
3309        :param str dry_run: When present, indicates that modifications should
3310        not be persisted. An invalid or unrecognized dryRun directive will
3311        result in an error response and no further processing of the request.
3312        Valid values are: - All: all dry run stages will be processed
3313        :param str field_manager: fieldManager is a name associated with the
3314        actor or entity that is making these changes. The value must be less
3315        than or 128 characters long, and only contain printable characters, as
3316        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
3317        required for apply requests (application/apply-patch) but optional for
3318        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
3319        :param bool force: Force is going to \"force\" Apply requests. It means
3320        user will re-acquire conflicting fields owned by other people. Force
3321        flag must be unset for non-apply patch requests.
3322        :return: V1beta1StorageClass
3323                 If the method is called asynchronously,
3324                 returns the request thread.
3325        """
3326    kwargs['_return_http_data_only'] = True
3327    if kwargs.get('async_req'):
3328      return self.patch_storage_class_with_http_info(name, body, **kwargs)
3329    else:
3330      (data) = self.patch_storage_class_with_http_info(name, body, **kwargs)
3331      return data
3332
3333  def patch_storage_class_with_http_info(self, name, body, **kwargs):
3334    """
3335        partially update the specified StorageClass
3336        This method makes a synchronous HTTP request by default. To make an
3337        asynchronous HTTP request, please pass async_req=True
3338        >>> thread = api.patch_storage_class_with_http_info(name, body,
3339        async_req=True)
3340        >>> result = thread.get()
3341
3342        :param async_req bool
3343        :param str name: name of the StorageClass (required)
3344        :param object body: (required)
3345        :param str pretty: If 'true', then the output is pretty printed.
3346        :param str dry_run: When present, indicates that modifications should
3347        not be persisted. An invalid or unrecognized dryRun directive will
3348        result in an error response and no further processing of the request.
3349        Valid values are: - All: all dry run stages will be processed
3350        :param str field_manager: fieldManager is a name associated with the
3351        actor or entity that is making these changes. The value must be less
3352        than or 128 characters long, and only contain printable characters, as
3353        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
3354        required for apply requests (application/apply-patch) but optional for
3355        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
3356        :param bool force: Force is going to \"force\" Apply requests. It means
3357        user will re-acquire conflicting fields owned by other people. Force
3358        flag must be unset for non-apply patch requests.
3359        :return: V1beta1StorageClass
3360                 If the method is called asynchronously,
3361                 returns the request thread.
3362        """
3363
3364    all_params = ['name', 'body', 'pretty', 'dry_run', 'field_manager', 'force']
3365    all_params.append('async_req')
3366    all_params.append('_return_http_data_only')
3367    all_params.append('_preload_content')
3368    all_params.append('_request_timeout')
3369
3370    params = locals()
3371    for key, val in iteritems(params['kwargs']):
3372      if key not in all_params:
3373        raise TypeError("Got an unexpected keyword argument '%s'"
3374                        ' to method patch_storage_class' % key)
3375      params[key] = val
3376    del params['kwargs']
3377    # verify the required parameter 'name' is set
3378    if ('name' not in params) or (params['name'] is None):
3379      raise ValueError(
3380          'Missing the required parameter `name` when calling `patch_storage_class`'
3381      )
3382    # verify the required parameter 'body' is set
3383    if ('body' not in params) or (params['body'] is None):
3384      raise ValueError(
3385          'Missing the required parameter `body` when calling `patch_storage_class`'
3386      )
3387
3388    collection_formats = {}
3389
3390    path_params = {}
3391    if 'name' in params:
3392      path_params['name'] = params['name']
3393
3394    query_params = []
3395    if 'pretty' in params:
3396      query_params.append(('pretty', params['pretty']))
3397    if 'dry_run' in params:
3398      query_params.append(('dryRun', params['dry_run']))
3399    if 'field_manager' in params:
3400      query_params.append(('fieldManager', params['field_manager']))
3401    if 'force' in params:
3402      query_params.append(('force', params['force']))
3403
3404    header_params = {}
3405
3406    form_params = []
3407    local_var_files = {}
3408
3409    body_params = None
3410    if 'body' in params:
3411      body_params = params['body']
3412    # HTTP header `Accept`
3413    header_params['Accept'] = self.api_client.\
3414        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
3415
3416    # HTTP header `Content-Type`
3417    header_params['Content-Type'] = self.api_client.\
3418        select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
3419
3420    # Authentication setting
3421    auth_settings = ['BearerToken']
3422
3423    return self.api_client.call_api(
3424        '/apis/storage.k8s.io/v1beta1/storageclasses/{name}',
3425        'PATCH',
3426        path_params,
3427        query_params,
3428        header_params,
3429        body=body_params,
3430        post_params=form_params,
3431        files=local_var_files,
3432        response_type='V1beta1StorageClass',
3433        auth_settings=auth_settings,
3434        async_req=params.get('async_req'),
3435        _return_http_data_only=params.get('_return_http_data_only'),
3436        _preload_content=params.get('_preload_content', True),
3437        _request_timeout=params.get('_request_timeout'),
3438        collection_formats=collection_formats)
3439
3440  def patch_volume_attachment(self, name, body, **kwargs):
3441    """
3442        partially update the specified VolumeAttachment
3443        This method makes a synchronous HTTP request by default. To make an
3444        asynchronous HTTP request, please pass async_req=True
3445        >>> thread = api.patch_volume_attachment(name, body, async_req=True)
3446        >>> result = thread.get()
3447
3448        :param async_req bool
3449        :param str name: name of the VolumeAttachment (required)
3450        :param object body: (required)
3451        :param str pretty: If 'true', then the output is pretty printed.
3452        :param str dry_run: When present, indicates that modifications should
3453        not be persisted. An invalid or unrecognized dryRun directive will
3454        result in an error response and no further processing of the request.
3455        Valid values are: - All: all dry run stages will be processed
3456        :param str field_manager: fieldManager is a name associated with the
3457        actor or entity that is making these changes. The value must be less
3458        than or 128 characters long, and only contain printable characters, as
3459        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
3460        required for apply requests (application/apply-patch) but optional for
3461        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
3462        :param bool force: Force is going to \"force\" Apply requests. It means
3463        user will re-acquire conflicting fields owned by other people. Force
3464        flag must be unset for non-apply patch requests.
3465        :return: V1beta1VolumeAttachment
3466                 If the method is called asynchronously,
3467                 returns the request thread.
3468        """
3469    kwargs['_return_http_data_only'] = True
3470    if kwargs.get('async_req'):
3471      return self.patch_volume_attachment_with_http_info(name, body, **kwargs)
3472    else:
3473      (data) = self.patch_volume_attachment_with_http_info(name, body, **kwargs)
3474      return data
3475
3476  def patch_volume_attachment_with_http_info(self, name, body, **kwargs):
3477    """
3478        partially update the specified VolumeAttachment
3479        This method makes a synchronous HTTP request by default. To make an
3480        asynchronous HTTP request, please pass async_req=True
3481        >>> thread = api.patch_volume_attachment_with_http_info(name, body,
3482        async_req=True)
3483        >>> result = thread.get()
3484
3485        :param async_req bool
3486        :param str name: name of the VolumeAttachment (required)
3487        :param object body: (required)
3488        :param str pretty: If 'true', then the output is pretty printed.
3489        :param str dry_run: When present, indicates that modifications should
3490        not be persisted. An invalid or unrecognized dryRun directive will
3491        result in an error response and no further processing of the request.
3492        Valid values are: - All: all dry run stages will be processed
3493        :param str field_manager: fieldManager is a name associated with the
3494        actor or entity that is making these changes. The value must be less
3495        than or 128 characters long, and only contain printable characters, as
3496        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
3497        required for apply requests (application/apply-patch) but optional for
3498        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
3499        :param bool force: Force is going to \"force\" Apply requests. It means
3500        user will re-acquire conflicting fields owned by other people. Force
3501        flag must be unset for non-apply patch requests.
3502        :return: V1beta1VolumeAttachment
3503                 If the method is called asynchronously,
3504                 returns the request thread.
3505        """
3506
3507    all_params = ['name', 'body', 'pretty', 'dry_run', 'field_manager', 'force']
3508    all_params.append('async_req')
3509    all_params.append('_return_http_data_only')
3510    all_params.append('_preload_content')
3511    all_params.append('_request_timeout')
3512
3513    params = locals()
3514    for key, val in iteritems(params['kwargs']):
3515      if key not in all_params:
3516        raise TypeError("Got an unexpected keyword argument '%s'"
3517                        ' to method patch_volume_attachment' % key)
3518      params[key] = val
3519    del params['kwargs']
3520    # verify the required parameter 'name' is set
3521    if ('name' not in params) or (params['name'] is None):
3522      raise ValueError(
3523          'Missing the required parameter `name` when calling `patch_volume_attachment`'
3524      )
3525    # verify the required parameter 'body' is set
3526    if ('body' not in params) or (params['body'] is None):
3527      raise ValueError(
3528          'Missing the required parameter `body` when calling `patch_volume_attachment`'
3529      )
3530
3531    collection_formats = {}
3532
3533    path_params = {}
3534    if 'name' in params:
3535      path_params['name'] = params['name']
3536
3537    query_params = []
3538    if 'pretty' in params:
3539      query_params.append(('pretty', params['pretty']))
3540    if 'dry_run' in params:
3541      query_params.append(('dryRun', params['dry_run']))
3542    if 'field_manager' in params:
3543      query_params.append(('fieldManager', params['field_manager']))
3544    if 'force' in params:
3545      query_params.append(('force', params['force']))
3546
3547    header_params = {}
3548
3549    form_params = []
3550    local_var_files = {}
3551
3552    body_params = None
3553    if 'body' in params:
3554      body_params = params['body']
3555    # HTTP header `Accept`
3556    header_params['Accept'] = self.api_client.\
3557        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
3558
3559    # HTTP header `Content-Type`
3560    header_params['Content-Type'] = self.api_client.\
3561        select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
3562
3563    # Authentication setting
3564    auth_settings = ['BearerToken']
3565
3566    return self.api_client.call_api(
3567        '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}',
3568        'PATCH',
3569        path_params,
3570        query_params,
3571        header_params,
3572        body=body_params,
3573        post_params=form_params,
3574        files=local_var_files,
3575        response_type='V1beta1VolumeAttachment',
3576        auth_settings=auth_settings,
3577        async_req=params.get('async_req'),
3578        _return_http_data_only=params.get('_return_http_data_only'),
3579        _preload_content=params.get('_preload_content', True),
3580        _request_timeout=params.get('_request_timeout'),
3581        collection_formats=collection_formats)
3582
3583  def read_csi_driver(self, name, **kwargs):
3584    """
3585        read the specified CSIDriver
3586        This method makes a synchronous HTTP request by default. To make an
3587        asynchronous HTTP request, please pass async_req=True
3588        >>> thread = api.read_csi_driver(name, async_req=True)
3589        >>> result = thread.get()
3590
3591        :param async_req bool
3592        :param str name: name of the CSIDriver (required)
3593        :param str pretty: If 'true', then the output is pretty printed.
3594        :param bool exact: Should the export be exact.  Exact export maintains
3595        cluster-specific fields like 'Namespace'. Deprecated. Planned for
3596        removal in 1.18.
3597        :param bool export: Should this value be exported.  Export strips fields
3598        that a user can not specify. Deprecated. Planned for removal in 1.18.
3599        :return: V1beta1CSIDriver
3600                 If the method is called asynchronously,
3601                 returns the request thread.
3602        """
3603    kwargs['_return_http_data_only'] = True
3604    if kwargs.get('async_req'):
3605      return self.read_csi_driver_with_http_info(name, **kwargs)
3606    else:
3607      (data) = self.read_csi_driver_with_http_info(name, **kwargs)
3608      return data
3609
3610  def read_csi_driver_with_http_info(self, name, **kwargs):
3611    """
3612        read the specified CSIDriver
3613        This method makes a synchronous HTTP request by default. To make an
3614        asynchronous HTTP request, please pass async_req=True
3615        >>> thread = api.read_csi_driver_with_http_info(name, async_req=True)
3616        >>> result = thread.get()
3617
3618        :param async_req bool
3619        :param str name: name of the CSIDriver (required)
3620        :param str pretty: If 'true', then the output is pretty printed.
3621        :param bool exact: Should the export be exact.  Exact export maintains
3622        cluster-specific fields like 'Namespace'. Deprecated. Planned for
3623        removal in 1.18.
3624        :param bool export: Should this value be exported.  Export strips fields
3625        that a user can not specify. Deprecated. Planned for removal in 1.18.
3626        :return: V1beta1CSIDriver
3627                 If the method is called asynchronously,
3628                 returns the request thread.
3629        """
3630
3631    all_params = ['name', 'pretty', 'exact', 'export']
3632    all_params.append('async_req')
3633    all_params.append('_return_http_data_only')
3634    all_params.append('_preload_content')
3635    all_params.append('_request_timeout')
3636
3637    params = locals()
3638    for key, val in iteritems(params['kwargs']):
3639      if key not in all_params:
3640        raise TypeError("Got an unexpected keyword argument '%s'"
3641                        ' to method read_csi_driver' % key)
3642      params[key] = val
3643    del params['kwargs']
3644    # verify the required parameter 'name' is set
3645    if ('name' not in params) or (params['name'] is None):
3646      raise ValueError(
3647          'Missing the required parameter `name` when calling `read_csi_driver`'
3648      )
3649
3650    collection_formats = {}
3651
3652    path_params = {}
3653    if 'name' in params:
3654      path_params['name'] = params['name']
3655
3656    query_params = []
3657    if 'pretty' in params:
3658      query_params.append(('pretty', params['pretty']))
3659    if 'exact' in params:
3660      query_params.append(('exact', params['exact']))
3661    if 'export' in params:
3662      query_params.append(('export', params['export']))
3663
3664    header_params = {}
3665
3666    form_params = []
3667    local_var_files = {}
3668
3669    body_params = None
3670    # HTTP header `Accept`
3671    header_params['Accept'] = self.api_client.\
3672        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
3673
3674    # HTTP header `Content-Type`
3675    header_params['Content-Type'] = self.api_client.\
3676        select_header_content_type(['*/*'])
3677
3678    # Authentication setting
3679    auth_settings = ['BearerToken']
3680
3681    return self.api_client.call_api(
3682        '/apis/storage.k8s.io/v1beta1/csidrivers/{name}',
3683        'GET',
3684        path_params,
3685        query_params,
3686        header_params,
3687        body=body_params,
3688        post_params=form_params,
3689        files=local_var_files,
3690        response_type='V1beta1CSIDriver',
3691        auth_settings=auth_settings,
3692        async_req=params.get('async_req'),
3693        _return_http_data_only=params.get('_return_http_data_only'),
3694        _preload_content=params.get('_preload_content', True),
3695        _request_timeout=params.get('_request_timeout'),
3696        collection_formats=collection_formats)
3697
3698  def read_csi_node(self, name, **kwargs):
3699    """
3700        read the specified CSINode
3701        This method makes a synchronous HTTP request by default. To make an
3702        asynchronous HTTP request, please pass async_req=True
3703        >>> thread = api.read_csi_node(name, async_req=True)
3704        >>> result = thread.get()
3705
3706        :param async_req bool
3707        :param str name: name of the CSINode (required)
3708        :param str pretty: If 'true', then the output is pretty printed.
3709        :param bool exact: Should the export be exact.  Exact export maintains
3710        cluster-specific fields like 'Namespace'. Deprecated. Planned for
3711        removal in 1.18.
3712        :param bool export: Should this value be exported.  Export strips fields
3713        that a user can not specify. Deprecated. Planned for removal in 1.18.
3714        :return: V1beta1CSINode
3715                 If the method is called asynchronously,
3716                 returns the request thread.
3717        """
3718    kwargs['_return_http_data_only'] = True
3719    if kwargs.get('async_req'):
3720      return self.read_csi_node_with_http_info(name, **kwargs)
3721    else:
3722      (data) = self.read_csi_node_with_http_info(name, **kwargs)
3723      return data
3724
3725  def read_csi_node_with_http_info(self, name, **kwargs):
3726    """
3727        read the specified CSINode
3728        This method makes a synchronous HTTP request by default. To make an
3729        asynchronous HTTP request, please pass async_req=True
3730        >>> thread = api.read_csi_node_with_http_info(name, async_req=True)
3731        >>> result = thread.get()
3732
3733        :param async_req bool
3734        :param str name: name of the CSINode (required)
3735        :param str pretty: If 'true', then the output is pretty printed.
3736        :param bool exact: Should the export be exact.  Exact export maintains
3737        cluster-specific fields like 'Namespace'. Deprecated. Planned for
3738        removal in 1.18.
3739        :param bool export: Should this value be exported.  Export strips fields
3740        that a user can not specify. Deprecated. Planned for removal in 1.18.
3741        :return: V1beta1CSINode
3742                 If the method is called asynchronously,
3743                 returns the request thread.
3744        """
3745
3746    all_params = ['name', 'pretty', 'exact', 'export']
3747    all_params.append('async_req')
3748    all_params.append('_return_http_data_only')
3749    all_params.append('_preload_content')
3750    all_params.append('_request_timeout')
3751
3752    params = locals()
3753    for key, val in iteritems(params['kwargs']):
3754      if key not in all_params:
3755        raise TypeError("Got an unexpected keyword argument '%s'"
3756                        ' to method read_csi_node' % key)
3757      params[key] = val
3758    del params['kwargs']
3759    # verify the required parameter 'name' is set
3760    if ('name' not in params) or (params['name'] is None):
3761      raise ValueError(
3762          'Missing the required parameter `name` when calling `read_csi_node`')
3763
3764    collection_formats = {}
3765
3766    path_params = {}
3767    if 'name' in params:
3768      path_params['name'] = params['name']
3769
3770    query_params = []
3771    if 'pretty' in params:
3772      query_params.append(('pretty', params['pretty']))
3773    if 'exact' in params:
3774      query_params.append(('exact', params['exact']))
3775    if 'export' in params:
3776      query_params.append(('export', params['export']))
3777
3778    header_params = {}
3779
3780    form_params = []
3781    local_var_files = {}
3782
3783    body_params = None
3784    # HTTP header `Accept`
3785    header_params['Accept'] = self.api_client.\
3786        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
3787
3788    # HTTP header `Content-Type`
3789    header_params['Content-Type'] = self.api_client.\
3790        select_header_content_type(['*/*'])
3791
3792    # Authentication setting
3793    auth_settings = ['BearerToken']
3794
3795    return self.api_client.call_api(
3796        '/apis/storage.k8s.io/v1beta1/csinodes/{name}',
3797        'GET',
3798        path_params,
3799        query_params,
3800        header_params,
3801        body=body_params,
3802        post_params=form_params,
3803        files=local_var_files,
3804        response_type='V1beta1CSINode',
3805        auth_settings=auth_settings,
3806        async_req=params.get('async_req'),
3807        _return_http_data_only=params.get('_return_http_data_only'),
3808        _preload_content=params.get('_preload_content', True),
3809        _request_timeout=params.get('_request_timeout'),
3810        collection_formats=collection_formats)
3811
3812  def read_storage_class(self, name, **kwargs):
3813    """
3814        read the specified StorageClass
3815        This method makes a synchronous HTTP request by default. To make an
3816        asynchronous HTTP request, please pass async_req=True
3817        >>> thread = api.read_storage_class(name, async_req=True)
3818        >>> result = thread.get()
3819
3820        :param async_req bool
3821        :param str name: name of the StorageClass (required)
3822        :param str pretty: If 'true', then the output is pretty printed.
3823        :param bool exact: Should the export be exact.  Exact export maintains
3824        cluster-specific fields like 'Namespace'. Deprecated. Planned for
3825        removal in 1.18.
3826        :param bool export: Should this value be exported.  Export strips fields
3827        that a user can not specify. Deprecated. Planned for removal in 1.18.
3828        :return: V1beta1StorageClass
3829                 If the method is called asynchronously,
3830                 returns the request thread.
3831        """
3832    kwargs['_return_http_data_only'] = True
3833    if kwargs.get('async_req'):
3834      return self.read_storage_class_with_http_info(name, **kwargs)
3835    else:
3836      (data) = self.read_storage_class_with_http_info(name, **kwargs)
3837      return data
3838
3839  def read_storage_class_with_http_info(self, name, **kwargs):
3840    """
3841        read the specified StorageClass
3842        This method makes a synchronous HTTP request by default. To make an
3843        asynchronous HTTP request, please pass async_req=True
3844        >>> thread = api.read_storage_class_with_http_info(name, async_req=True)
3845        >>> result = thread.get()
3846
3847        :param async_req bool
3848        :param str name: name of the StorageClass (required)
3849        :param str pretty: If 'true', then the output is pretty printed.
3850        :param bool exact: Should the export be exact.  Exact export maintains
3851        cluster-specific fields like 'Namespace'. Deprecated. Planned for
3852        removal in 1.18.
3853        :param bool export: Should this value be exported.  Export strips fields
3854        that a user can not specify. Deprecated. Planned for removal in 1.18.
3855        :return: V1beta1StorageClass
3856                 If the method is called asynchronously,
3857                 returns the request thread.
3858        """
3859
3860    all_params = ['name', 'pretty', 'exact', 'export']
3861    all_params.append('async_req')
3862    all_params.append('_return_http_data_only')
3863    all_params.append('_preload_content')
3864    all_params.append('_request_timeout')
3865
3866    params = locals()
3867    for key, val in iteritems(params['kwargs']):
3868      if key not in all_params:
3869        raise TypeError("Got an unexpected keyword argument '%s'"
3870                        ' to method read_storage_class' % key)
3871      params[key] = val
3872    del params['kwargs']
3873    # verify the required parameter 'name' is set
3874    if ('name' not in params) or (params['name'] is None):
3875      raise ValueError(
3876          'Missing the required parameter `name` when calling `read_storage_class`'
3877      )
3878
3879    collection_formats = {}
3880
3881    path_params = {}
3882    if 'name' in params:
3883      path_params['name'] = params['name']
3884
3885    query_params = []
3886    if 'pretty' in params:
3887      query_params.append(('pretty', params['pretty']))
3888    if 'exact' in params:
3889      query_params.append(('exact', params['exact']))
3890    if 'export' in params:
3891      query_params.append(('export', params['export']))
3892
3893    header_params = {}
3894
3895    form_params = []
3896    local_var_files = {}
3897
3898    body_params = None
3899    # HTTP header `Accept`
3900    header_params['Accept'] = self.api_client.\
3901        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
3902
3903    # HTTP header `Content-Type`
3904    header_params['Content-Type'] = self.api_client.\
3905        select_header_content_type(['*/*'])
3906
3907    # Authentication setting
3908    auth_settings = ['BearerToken']
3909
3910    return self.api_client.call_api(
3911        '/apis/storage.k8s.io/v1beta1/storageclasses/{name}',
3912        'GET',
3913        path_params,
3914        query_params,
3915        header_params,
3916        body=body_params,
3917        post_params=form_params,
3918        files=local_var_files,
3919        response_type='V1beta1StorageClass',
3920        auth_settings=auth_settings,
3921        async_req=params.get('async_req'),
3922        _return_http_data_only=params.get('_return_http_data_only'),
3923        _preload_content=params.get('_preload_content', True),
3924        _request_timeout=params.get('_request_timeout'),
3925        collection_formats=collection_formats)
3926
3927  def read_volume_attachment(self, name, **kwargs):
3928    """
3929        read the specified VolumeAttachment
3930        This method makes a synchronous HTTP request by default. To make an
3931        asynchronous HTTP request, please pass async_req=True
3932        >>> thread = api.read_volume_attachment(name, async_req=True)
3933        >>> result = thread.get()
3934
3935        :param async_req bool
3936        :param str name: name of the VolumeAttachment (required)
3937        :param str pretty: If 'true', then the output is pretty printed.
3938        :param bool exact: Should the export be exact.  Exact export maintains
3939        cluster-specific fields like 'Namespace'. Deprecated. Planned for
3940        removal in 1.18.
3941        :param bool export: Should this value be exported.  Export strips fields
3942        that a user can not specify. Deprecated. Planned for removal in 1.18.
3943        :return: V1beta1VolumeAttachment
3944                 If the method is called asynchronously,
3945                 returns the request thread.
3946        """
3947    kwargs['_return_http_data_only'] = True
3948    if kwargs.get('async_req'):
3949      return self.read_volume_attachment_with_http_info(name, **kwargs)
3950    else:
3951      (data) = self.read_volume_attachment_with_http_info(name, **kwargs)
3952      return data
3953
3954  def read_volume_attachment_with_http_info(self, name, **kwargs):
3955    """
3956        read the specified VolumeAttachment
3957        This method makes a synchronous HTTP request by default. To make an
3958        asynchronous HTTP request, please pass async_req=True
3959        >>> thread = api.read_volume_attachment_with_http_info(name,
3960        async_req=True)
3961        >>> result = thread.get()
3962
3963        :param async_req bool
3964        :param str name: name of the VolumeAttachment (required)
3965        :param str pretty: If 'true', then the output is pretty printed.
3966        :param bool exact: Should the export be exact.  Exact export maintains
3967        cluster-specific fields like 'Namespace'. Deprecated. Planned for
3968        removal in 1.18.
3969        :param bool export: Should this value be exported.  Export strips fields
3970        that a user can not specify. Deprecated. Planned for removal in 1.18.
3971        :return: V1beta1VolumeAttachment
3972                 If the method is called asynchronously,
3973                 returns the request thread.
3974        """
3975
3976    all_params = ['name', 'pretty', 'exact', 'export']
3977    all_params.append('async_req')
3978    all_params.append('_return_http_data_only')
3979    all_params.append('_preload_content')
3980    all_params.append('_request_timeout')
3981
3982    params = locals()
3983    for key, val in iteritems(params['kwargs']):
3984      if key not in all_params:
3985        raise TypeError("Got an unexpected keyword argument '%s'"
3986                        ' to method read_volume_attachment' % key)
3987      params[key] = val
3988    del params['kwargs']
3989    # verify the required parameter 'name' is set
3990    if ('name' not in params) or (params['name'] is None):
3991      raise ValueError(
3992          'Missing the required parameter `name` when calling `read_volume_attachment`'
3993      )
3994
3995    collection_formats = {}
3996
3997    path_params = {}
3998    if 'name' in params:
3999      path_params['name'] = params['name']
4000
4001    query_params = []
4002    if 'pretty' in params:
4003      query_params.append(('pretty', params['pretty']))
4004    if 'exact' in params:
4005      query_params.append(('exact', params['exact']))
4006    if 'export' in params:
4007      query_params.append(('export', params['export']))
4008
4009    header_params = {}
4010
4011    form_params = []
4012    local_var_files = {}
4013
4014    body_params = None
4015    # HTTP header `Accept`
4016    header_params['Accept'] = self.api_client.\
4017        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
4018
4019    # HTTP header `Content-Type`
4020    header_params['Content-Type'] = self.api_client.\
4021        select_header_content_type(['*/*'])
4022
4023    # Authentication setting
4024    auth_settings = ['BearerToken']
4025
4026    return self.api_client.call_api(
4027        '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}',
4028        'GET',
4029        path_params,
4030        query_params,
4031        header_params,
4032        body=body_params,
4033        post_params=form_params,
4034        files=local_var_files,
4035        response_type='V1beta1VolumeAttachment',
4036        auth_settings=auth_settings,
4037        async_req=params.get('async_req'),
4038        _return_http_data_only=params.get('_return_http_data_only'),
4039        _preload_content=params.get('_preload_content', True),
4040        _request_timeout=params.get('_request_timeout'),
4041        collection_formats=collection_formats)
4042
4043  def replace_csi_driver(self, name, body, **kwargs):
4044    """
4045        replace the specified CSIDriver
4046        This method makes a synchronous HTTP request by default. To make an
4047        asynchronous HTTP request, please pass async_req=True
4048        >>> thread = api.replace_csi_driver(name, body, async_req=True)
4049        >>> result = thread.get()
4050
4051        :param async_req bool
4052        :param str name: name of the CSIDriver (required)
4053        :param V1beta1CSIDriver body: (required)
4054        :param str pretty: If 'true', then the output is pretty printed.
4055        :param str dry_run: When present, indicates that modifications should
4056        not be persisted. An invalid or unrecognized dryRun directive will
4057        result in an error response and no further processing of the request.
4058        Valid values are: - All: all dry run stages will be processed
4059        :param str field_manager: fieldManager is a name associated with the
4060        actor or entity that is making these changes. The value must be less
4061        than or 128 characters long, and only contain printable characters, as
4062        defined by https://golang.org/pkg/unicode/#IsPrint.
4063        :return: V1beta1CSIDriver
4064                 If the method is called asynchronously,
4065                 returns the request thread.
4066        """
4067    kwargs['_return_http_data_only'] = True
4068    if kwargs.get('async_req'):
4069      return self.replace_csi_driver_with_http_info(name, body, **kwargs)
4070    else:
4071      (data) = self.replace_csi_driver_with_http_info(name, body, **kwargs)
4072      return data
4073
4074  def replace_csi_driver_with_http_info(self, name, body, **kwargs):
4075    """
4076        replace the specified CSIDriver
4077        This method makes a synchronous HTTP request by default. To make an
4078        asynchronous HTTP request, please pass async_req=True
4079        >>> thread = api.replace_csi_driver_with_http_info(name, body,
4080        async_req=True)
4081        >>> result = thread.get()
4082
4083        :param async_req bool
4084        :param str name: name of the CSIDriver (required)
4085        :param V1beta1CSIDriver body: (required)
4086        :param str pretty: If 'true', then the output is pretty printed.
4087        :param str dry_run: When present, indicates that modifications should
4088        not be persisted. An invalid or unrecognized dryRun directive will
4089        result in an error response and no further processing of the request.
4090        Valid values are: - All: all dry run stages will be processed
4091        :param str field_manager: fieldManager is a name associated with the
4092        actor or entity that is making these changes. The value must be less
4093        than or 128 characters long, and only contain printable characters, as
4094        defined by https://golang.org/pkg/unicode/#IsPrint.
4095        :return: V1beta1CSIDriver
4096                 If the method is called asynchronously,
4097                 returns the request thread.
4098        """
4099
4100    all_params = ['name', 'body', 'pretty', 'dry_run', 'field_manager']
4101    all_params.append('async_req')
4102    all_params.append('_return_http_data_only')
4103    all_params.append('_preload_content')
4104    all_params.append('_request_timeout')
4105
4106    params = locals()
4107    for key, val in iteritems(params['kwargs']):
4108      if key not in all_params:
4109        raise TypeError("Got an unexpected keyword argument '%s'"
4110                        ' to method replace_csi_driver' % key)
4111      params[key] = val
4112    del params['kwargs']
4113    # verify the required parameter 'name' is set
4114    if ('name' not in params) or (params['name'] is None):
4115      raise ValueError(
4116          'Missing the required parameter `name` when calling `replace_csi_driver`'
4117      )
4118    # verify the required parameter 'body' is set
4119    if ('body' not in params) or (params['body'] is None):
4120      raise ValueError(
4121          'Missing the required parameter `body` when calling `replace_csi_driver`'
4122      )
4123
4124    collection_formats = {}
4125
4126    path_params = {}
4127    if 'name' in params:
4128      path_params['name'] = params['name']
4129
4130    query_params = []
4131    if 'pretty' in params:
4132      query_params.append(('pretty', params['pretty']))
4133    if 'dry_run' in params:
4134      query_params.append(('dryRun', params['dry_run']))
4135    if 'field_manager' in params:
4136      query_params.append(('fieldManager', params['field_manager']))
4137
4138    header_params = {}
4139
4140    form_params = []
4141    local_var_files = {}
4142
4143    body_params = None
4144    if 'body' in params:
4145      body_params = params['body']
4146    # HTTP header `Accept`
4147    header_params['Accept'] = self.api_client.\
4148        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
4149
4150    # HTTP header `Content-Type`
4151    header_params['Content-Type'] = self.api_client.\
4152        select_header_content_type(['*/*'])
4153
4154    # Authentication setting
4155    auth_settings = ['BearerToken']
4156
4157    return self.api_client.call_api(
4158        '/apis/storage.k8s.io/v1beta1/csidrivers/{name}',
4159        'PUT',
4160        path_params,
4161        query_params,
4162        header_params,
4163        body=body_params,
4164        post_params=form_params,
4165        files=local_var_files,
4166        response_type='V1beta1CSIDriver',
4167        auth_settings=auth_settings,
4168        async_req=params.get('async_req'),
4169        _return_http_data_only=params.get('_return_http_data_only'),
4170        _preload_content=params.get('_preload_content', True),
4171        _request_timeout=params.get('_request_timeout'),
4172        collection_formats=collection_formats)
4173
4174  def replace_csi_node(self, name, body, **kwargs):
4175    """
4176        replace the specified CSINode
4177        This method makes a synchronous HTTP request by default. To make an
4178        asynchronous HTTP request, please pass async_req=True
4179        >>> thread = api.replace_csi_node(name, body, async_req=True)
4180        >>> result = thread.get()
4181
4182        :param async_req bool
4183        :param str name: name of the CSINode (required)
4184        :param V1beta1CSINode body: (required)
4185        :param str pretty: If 'true', then the output is pretty printed.
4186        :param str dry_run: When present, indicates that modifications should
4187        not be persisted. An invalid or unrecognized dryRun directive will
4188        result in an error response and no further processing of the request.
4189        Valid values are: - All: all dry run stages will be processed
4190        :param str field_manager: fieldManager is a name associated with the
4191        actor or entity that is making these changes. The value must be less
4192        than or 128 characters long, and only contain printable characters, as
4193        defined by https://golang.org/pkg/unicode/#IsPrint.
4194        :return: V1beta1CSINode
4195                 If the method is called asynchronously,
4196                 returns the request thread.
4197        """
4198    kwargs['_return_http_data_only'] = True
4199    if kwargs.get('async_req'):
4200      return self.replace_csi_node_with_http_info(name, body, **kwargs)
4201    else:
4202      (data) = self.replace_csi_node_with_http_info(name, body, **kwargs)
4203      return data
4204
4205  def replace_csi_node_with_http_info(self, name, body, **kwargs):
4206    """
4207        replace the specified CSINode
4208        This method makes a synchronous HTTP request by default. To make an
4209        asynchronous HTTP request, please pass async_req=True
4210        >>> thread = api.replace_csi_node_with_http_info(name, body,
4211        async_req=True)
4212        >>> result = thread.get()
4213
4214        :param async_req bool
4215        :param str name: name of the CSINode (required)
4216        :param V1beta1CSINode body: (required)
4217        :param str pretty: If 'true', then the output is pretty printed.
4218        :param str dry_run: When present, indicates that modifications should
4219        not be persisted. An invalid or unrecognized dryRun directive will
4220        result in an error response and no further processing of the request.
4221        Valid values are: - All: all dry run stages will be processed
4222        :param str field_manager: fieldManager is a name associated with the
4223        actor or entity that is making these changes. The value must be less
4224        than or 128 characters long, and only contain printable characters, as
4225        defined by https://golang.org/pkg/unicode/#IsPrint.
4226        :return: V1beta1CSINode
4227                 If the method is called asynchronously,
4228                 returns the request thread.
4229        """
4230
4231    all_params = ['name', 'body', 'pretty', 'dry_run', 'field_manager']
4232    all_params.append('async_req')
4233    all_params.append('_return_http_data_only')
4234    all_params.append('_preload_content')
4235    all_params.append('_request_timeout')
4236
4237    params = locals()
4238    for key, val in iteritems(params['kwargs']):
4239      if key not in all_params:
4240        raise TypeError("Got an unexpected keyword argument '%s'"
4241                        ' to method replace_csi_node' % key)
4242      params[key] = val
4243    del params['kwargs']
4244    # verify the required parameter 'name' is set
4245    if ('name' not in params) or (params['name'] is None):
4246      raise ValueError(
4247          'Missing the required parameter `name` when calling `replace_csi_node`'
4248      )
4249    # verify the required parameter 'body' is set
4250    if ('body' not in params) or (params['body'] is None):
4251      raise ValueError(
4252          'Missing the required parameter `body` when calling `replace_csi_node`'
4253      )
4254
4255    collection_formats = {}
4256
4257    path_params = {}
4258    if 'name' in params:
4259      path_params['name'] = params['name']
4260
4261    query_params = []
4262    if 'pretty' in params:
4263      query_params.append(('pretty', params['pretty']))
4264    if 'dry_run' in params:
4265      query_params.append(('dryRun', params['dry_run']))
4266    if 'field_manager' in params:
4267      query_params.append(('fieldManager', params['field_manager']))
4268
4269    header_params = {}
4270
4271    form_params = []
4272    local_var_files = {}
4273
4274    body_params = None
4275    if 'body' in params:
4276      body_params = params['body']
4277    # HTTP header `Accept`
4278    header_params['Accept'] = self.api_client.\
4279        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
4280
4281    # HTTP header `Content-Type`
4282    header_params['Content-Type'] = self.api_client.\
4283        select_header_content_type(['*/*'])
4284
4285    # Authentication setting
4286    auth_settings = ['BearerToken']
4287
4288    return self.api_client.call_api(
4289        '/apis/storage.k8s.io/v1beta1/csinodes/{name}',
4290        'PUT',
4291        path_params,
4292        query_params,
4293        header_params,
4294        body=body_params,
4295        post_params=form_params,
4296        files=local_var_files,
4297        response_type='V1beta1CSINode',
4298        auth_settings=auth_settings,
4299        async_req=params.get('async_req'),
4300        _return_http_data_only=params.get('_return_http_data_only'),
4301        _preload_content=params.get('_preload_content', True),
4302        _request_timeout=params.get('_request_timeout'),
4303        collection_formats=collection_formats)
4304
4305  def replace_storage_class(self, name, body, **kwargs):
4306    """
4307        replace the specified StorageClass
4308        This method makes a synchronous HTTP request by default. To make an
4309        asynchronous HTTP request, please pass async_req=True
4310        >>> thread = api.replace_storage_class(name, body, async_req=True)
4311        >>> result = thread.get()
4312
4313        :param async_req bool
4314        :param str name: name of the StorageClass (required)
4315        :param V1beta1StorageClass body: (required)
4316        :param str pretty: If 'true', then the output is pretty printed.
4317        :param str dry_run: When present, indicates that modifications should
4318        not be persisted. An invalid or unrecognized dryRun directive will
4319        result in an error response and no further processing of the request.
4320        Valid values are: - All: all dry run stages will be processed
4321        :param str field_manager: fieldManager is a name associated with the
4322        actor or entity that is making these changes. The value must be less
4323        than or 128 characters long, and only contain printable characters, as
4324        defined by https://golang.org/pkg/unicode/#IsPrint.
4325        :return: V1beta1StorageClass
4326                 If the method is called asynchronously,
4327                 returns the request thread.
4328        """
4329    kwargs['_return_http_data_only'] = True
4330    if kwargs.get('async_req'):
4331      return self.replace_storage_class_with_http_info(name, body, **kwargs)
4332    else:
4333      (data) = self.replace_storage_class_with_http_info(name, body, **kwargs)
4334      return data
4335
4336  def replace_storage_class_with_http_info(self, name, body, **kwargs):
4337    """
4338        replace the specified StorageClass
4339        This method makes a synchronous HTTP request by default. To make an
4340        asynchronous HTTP request, please pass async_req=True
4341        >>> thread = api.replace_storage_class_with_http_info(name, body,
4342        async_req=True)
4343        >>> result = thread.get()
4344
4345        :param async_req bool
4346        :param str name: name of the StorageClass (required)
4347        :param V1beta1StorageClass body: (required)
4348        :param str pretty: If 'true', then the output is pretty printed.
4349        :param str dry_run: When present, indicates that modifications should
4350        not be persisted. An invalid or unrecognized dryRun directive will
4351        result in an error response and no further processing of the request.
4352        Valid values are: - All: all dry run stages will be processed
4353        :param str field_manager: fieldManager is a name associated with the
4354        actor or entity that is making these changes. The value must be less
4355        than or 128 characters long, and only contain printable characters, as
4356        defined by https://golang.org/pkg/unicode/#IsPrint.
4357        :return: V1beta1StorageClass
4358                 If the method is called asynchronously,
4359                 returns the request thread.
4360        """
4361
4362    all_params = ['name', 'body', 'pretty', 'dry_run', 'field_manager']
4363    all_params.append('async_req')
4364    all_params.append('_return_http_data_only')
4365    all_params.append('_preload_content')
4366    all_params.append('_request_timeout')
4367
4368    params = locals()
4369    for key, val in iteritems(params['kwargs']):
4370      if key not in all_params:
4371        raise TypeError("Got an unexpected keyword argument '%s'"
4372                        ' to method replace_storage_class' % key)
4373      params[key] = val
4374    del params['kwargs']
4375    # verify the required parameter 'name' is set
4376    if ('name' not in params) or (params['name'] is None):
4377      raise ValueError(
4378          'Missing the required parameter `name` when calling `replace_storage_class`'
4379      )
4380    # verify the required parameter 'body' is set
4381    if ('body' not in params) or (params['body'] is None):
4382      raise ValueError(
4383          'Missing the required parameter `body` when calling `replace_storage_class`'
4384      )
4385
4386    collection_formats = {}
4387
4388    path_params = {}
4389    if 'name' in params:
4390      path_params['name'] = params['name']
4391
4392    query_params = []
4393    if 'pretty' in params:
4394      query_params.append(('pretty', params['pretty']))
4395    if 'dry_run' in params:
4396      query_params.append(('dryRun', params['dry_run']))
4397    if 'field_manager' in params:
4398      query_params.append(('fieldManager', params['field_manager']))
4399
4400    header_params = {}
4401
4402    form_params = []
4403    local_var_files = {}
4404
4405    body_params = None
4406    if 'body' in params:
4407      body_params = params['body']
4408    # HTTP header `Accept`
4409    header_params['Accept'] = self.api_client.\
4410        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
4411
4412    # HTTP header `Content-Type`
4413    header_params['Content-Type'] = self.api_client.\
4414        select_header_content_type(['*/*'])
4415
4416    # Authentication setting
4417    auth_settings = ['BearerToken']
4418
4419    return self.api_client.call_api(
4420        '/apis/storage.k8s.io/v1beta1/storageclasses/{name}',
4421        'PUT',
4422        path_params,
4423        query_params,
4424        header_params,
4425        body=body_params,
4426        post_params=form_params,
4427        files=local_var_files,
4428        response_type='V1beta1StorageClass',
4429        auth_settings=auth_settings,
4430        async_req=params.get('async_req'),
4431        _return_http_data_only=params.get('_return_http_data_only'),
4432        _preload_content=params.get('_preload_content', True),
4433        _request_timeout=params.get('_request_timeout'),
4434        collection_formats=collection_formats)
4435
4436  def replace_volume_attachment(self, name, body, **kwargs):
4437    """
4438        replace the specified VolumeAttachment
4439        This method makes a synchronous HTTP request by default. To make an
4440        asynchronous HTTP request, please pass async_req=True
4441        >>> thread = api.replace_volume_attachment(name, body, async_req=True)
4442        >>> result = thread.get()
4443
4444        :param async_req bool
4445        :param str name: name of the VolumeAttachment (required)
4446        :param V1beta1VolumeAttachment body: (required)
4447        :param str pretty: If 'true', then the output is pretty printed.
4448        :param str dry_run: When present, indicates that modifications should
4449        not be persisted. An invalid or unrecognized dryRun directive will
4450        result in an error response and no further processing of the request.
4451        Valid values are: - All: all dry run stages will be processed
4452        :param str field_manager: fieldManager is a name associated with the
4453        actor or entity that is making these changes. The value must be less
4454        than or 128 characters long, and only contain printable characters, as
4455        defined by https://golang.org/pkg/unicode/#IsPrint.
4456        :return: V1beta1VolumeAttachment
4457                 If the method is called asynchronously,
4458                 returns the request thread.
4459        """
4460    kwargs['_return_http_data_only'] = True
4461    if kwargs.get('async_req'):
4462      return self.replace_volume_attachment_with_http_info(name, body, **kwargs)
4463    else:
4464      (data) = self.replace_volume_attachment_with_http_info(
4465          name, body, **kwargs)
4466      return data
4467
4468  def replace_volume_attachment_with_http_info(self, name, body, **kwargs):
4469    """
4470        replace the specified VolumeAttachment
4471        This method makes a synchronous HTTP request by default. To make an
4472        asynchronous HTTP request, please pass async_req=True
4473        >>> thread = api.replace_volume_attachment_with_http_info(name, body,
4474        async_req=True)
4475        >>> result = thread.get()
4476
4477        :param async_req bool
4478        :param str name: name of the VolumeAttachment (required)
4479        :param V1beta1VolumeAttachment body: (required)
4480        :param str pretty: If 'true', then the output is pretty printed.
4481        :param str dry_run: When present, indicates that modifications should
4482        not be persisted. An invalid or unrecognized dryRun directive will
4483        result in an error response and no further processing of the request.
4484        Valid values are: - All: all dry run stages will be processed
4485        :param str field_manager: fieldManager is a name associated with the
4486        actor or entity that is making these changes. The value must be less
4487        than or 128 characters long, and only contain printable characters, as
4488        defined by https://golang.org/pkg/unicode/#IsPrint.
4489        :return: V1beta1VolumeAttachment
4490                 If the method is called asynchronously,
4491                 returns the request thread.
4492        """
4493
4494    all_params = ['name', 'body', 'pretty', 'dry_run', 'field_manager']
4495    all_params.append('async_req')
4496    all_params.append('_return_http_data_only')
4497    all_params.append('_preload_content')
4498    all_params.append('_request_timeout')
4499
4500    params = locals()
4501    for key, val in iteritems(params['kwargs']):
4502      if key not in all_params:
4503        raise TypeError("Got an unexpected keyword argument '%s'"
4504                        ' to method replace_volume_attachment' % key)
4505      params[key] = val
4506    del params['kwargs']
4507    # verify the required parameter 'name' is set
4508    if ('name' not in params) or (params['name'] is None):
4509      raise ValueError(
4510          'Missing the required parameter `name` when calling `replace_volume_attachment`'
4511      )
4512    # verify the required parameter 'body' is set
4513    if ('body' not in params) or (params['body'] is None):
4514      raise ValueError(
4515          'Missing the required parameter `body` when calling `replace_volume_attachment`'
4516      )
4517
4518    collection_formats = {}
4519
4520    path_params = {}
4521    if 'name' in params:
4522      path_params['name'] = params['name']
4523
4524    query_params = []
4525    if 'pretty' in params:
4526      query_params.append(('pretty', params['pretty']))
4527    if 'dry_run' in params:
4528      query_params.append(('dryRun', params['dry_run']))
4529    if 'field_manager' in params:
4530      query_params.append(('fieldManager', params['field_manager']))
4531
4532    header_params = {}
4533
4534    form_params = []
4535    local_var_files = {}
4536
4537    body_params = None
4538    if 'body' in params:
4539      body_params = params['body']
4540    # HTTP header `Accept`
4541    header_params['Accept'] = self.api_client.\
4542        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
4543
4544    # HTTP header `Content-Type`
4545    header_params['Content-Type'] = self.api_client.\
4546        select_header_content_type(['*/*'])
4547
4548    # Authentication setting
4549    auth_settings = ['BearerToken']
4550
4551    return self.api_client.call_api(
4552        '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}',
4553        'PUT',
4554        path_params,
4555        query_params,
4556        header_params,
4557        body=body_params,
4558        post_params=form_params,
4559        files=local_var_files,
4560        response_type='V1beta1VolumeAttachment',
4561        auth_settings=auth_settings,
4562        async_req=params.get('async_req'),
4563        _return_http_data_only=params.get('_return_http_data_only'),
4564        _preload_content=params.get('_preload_content', True),
4565        _request_timeout=params.get('_request_timeout'),
4566        collection_formats=collection_formats)
4567