3 f÷ÔY[éã@s`dZddlmZddlZddlZddlZddlmZddlm Z ddl m Z Gdd „d e ƒZ dS) zç Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.7.4 Generated by: https://github.com/swagger-api/swagger-codegen.git é)Úabsolute_importN)Ú iteritemsé)Ú Configuration)Ú ApiClientc@sªeZdZdZd)dd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dd„Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„Zdd „Zd!d"„Zd#d$„Zd%d&„Zd'd(„ZdS)*ÚNetworkingV1Apiz¯ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen NcCs,tƒ}|r||_n|js tƒ|_|j|_dS)N)rÚ api_clientr)ÚselfrÚconfig©r úY/Users/olari/OneDrive/sandbox/awsBlog2/lambda/kubernetes/client/apis/networking_v1_api.pyÚ__init__"s zNetworkingV1Api.__init__cKs:d|d<|jdƒr"|j||f|ŽS|j||f|Ž}|SdS)a} create a NetworkPolicy This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_namespaced_network_policy(namespace, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1NetworkPolicy body: (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1NetworkPolicy If the method is called asynchronously, returns the request thread. TÚ_return_http_data_onlyÚcallbackN)ÚgetÚ/create_namespaced_network_policy_with_http_info)r Ú namespaceÚbodyÚkwargsÚdatar r r Ú create_namespaced_network_policy+s  z0NetworkingV1Api.create_namespaced_network_policycKs€dddg}|jdƒ|jdƒ|jdƒ|jdƒtƒ}x4t|dƒD]$\}}||krbtd |ƒ‚|||<qFW|d=d|ksˆ|dd krtd ƒ‚d|ks¤|dd kr¬td ƒ‚i}d jddƒ} i} d|krÔ|d| d<i} d|krì|d| d<i} g} i}d }d|kr|d}|jjdddgƒ| d<|jjdgƒ| d<dg}|jj | d| | | || |d||j dƒ|j dƒ|j ddƒ|j dƒ|dS)aŒ create a NetworkPolicy This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_namespaced_network_policy_with_http_info(namespace, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1NetworkPolicy body: (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1NetworkPolicy If the method is called asynchronously, returns the request thread. rrÚprettyrrÚ_preload_contentÚ_request_timeoutrzRGot an unexpected keyword argument '%s' to method create_namespaced_network_policyNzZMissing the required parameter `namespace` when calling `create_namespaced_network_policy`zUMissing the required parameter `body` when calling `create_namespaced_network_policy`zA/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpoliciesz{format}Újsonzapplication/jsonzapplication/yamlz#application/vnd.kubernetes.protobufÚAcceptz*/*z Content-TypeÚ BearerTokenÚPOSTÚV1NetworkPolicyT) rÚ post_paramsÚfilesÚ response_typeÚ auth_settingsrrrrÚcollection_formats) ÚappendÚlocalsrÚ TypeErrorÚ ValueErrorÚreplacerÚselect_header_acceptÚselect_header_content_typeÚcall_apir)r rrrÚ all_paramsÚparamsÚkeyÚvalr#Ú resource_pathÚ path_paramsÚ query_paramsÚ header_paramsÚ form_paramsÚlocal_var_filesÚ body_paramsr"r r r rFsd             z?NetworkingV1Api.create_namespaced_network_policy_with_http_infocKs6d|d<|jdƒr |j|f|ŽS|j|f|Ž}|SdS)a delete collection of NetworkPolicy This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_collection_namespaced_network_policy(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool include_uninitialized: If true, partially initialized resources are included in the response. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. :param int timeout_seconds: Timeout for the list/watch call. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :return: V1Status If the method is called asynchronously, returns the request thread. TrrN)rÚ:delete_collection_namespaced_network_policy_with_http_info)r rrrr r r Ú+delete_collection_namespaced_network_policyŸs  z;NetworkingV1Api.delete_collection_namespaced_network_policycKsÞddddddddg}|jd ƒ|jd ƒ|jd ƒ|jd ƒtƒ}x4t|d ƒD]$\}}||krltd|ƒ‚|||<qPW|d =d|ks’|ddkrštdƒ‚i}djddƒ}i} d|krÂ|d| d<i} d|krÚ|d| d<d|krî|d| d<d|kr|d| d<d|kr|d| d<d|kr0|d| d<d|krF|d| d<d|kr\|d| d<i} g} i} d}|jjdddgƒ| d<|jjdgƒ| d<dg}|jj |d | | | || | d!||j d ƒ|j d ƒ|j d d"ƒ|j d ƒ|d#S)$aŽ delete collection of NetworkPolicy This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_collection_namespaced_network_policy_with_http_info(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool include_uninitialized: If true, partially initialized resources are included in the response. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. :param int timeout_seconds: Timeout for the list/watch call. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :return: V1Status If the method is called asynchronously, returns the request thread. rrÚfield_selectorÚinclude_uninitializedÚlabel_selectorÚresource_versionÚtimeout_secondsÚwatchrrrrrz]Got an unexpected keyword argument '%s' to method delete_collection_namespaced_network_policyNzeMissing the required parameter `namespace` when calling `delete_collection_namespaced_network_policy`zA/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpoliciesz{format}rÚ fieldSelectorÚincludeUninitializedÚ labelSelectorÚresourceVersionÚtimeoutSecondszapplication/jsonzapplication/yamlz#application/vnd.kubernetes.protobufrz*/*z Content-TyperÚDELETEÚV1StatusT) rrr r!r"rrrrr#) r$r%rr&r'r(rr)r*r+r)r rrr,r-r.r/r#r0r1r2r3r4r5r6r"r r r r7¿st                      zJNetworkingV1Api.delete_collection_namespaced_network_policy_with_http_infocKs>d|d<|jdƒr$|j|||f|ŽS|j|||f|Ž}|SdS)a{ delete a NetworkPolicy This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_namespaced_network_policy(name, namespace, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the NetworkPolicy (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1DeleteOptions body: (required) :param str pretty: If 'true', then the output is pretty printed. :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. :return: V1Status If the method is called asynchronously, returns the request thread. TrrN)rÚ/delete_namespaced_network_policy_with_http_info)r Únamerrrrr r r Ú delete_namespaced_network_policy$s  z0NetworkingV1Api.delete_namespaced_network_policycKsþdddddddg}|jdƒ|jd ƒ|jd ƒ|jd ƒtƒ}x4t|d ƒD]$\}}||krjtd |ƒ‚|||<qNW|d =d|ks|ddkr˜tdƒ‚d|ks¬|ddkr´tdƒ‚d|ksÈ|ddkrÐtdƒ‚i} djddƒ} i} d|krø|d| d<d|kr|d| d<i} d|kr(|d| d<d|kr>|d| d<d|krT|d| d<d|krj|d| d<i} g}i}d}d|krŒ|d}|jjdddgƒ| d<|jjdgƒ| d<dg}|jj | d| | | |||d ||j dƒ|j d ƒ|j d d!ƒ|j d ƒ| d"S)#aŠ delete a NetworkPolicy This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_namespaced_network_policy_with_http_info(name, namespace, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the NetworkPolicy (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1DeleteOptions body: (required) :param str pretty: If 'true', then the output is pretty printed. :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. :return: V1Status If the method is called asynchronously, returns the request thread. rGrrrÚgrace_period_secondsÚorphan_dependentsÚpropagation_policyrrrrrzRGot an unexpected keyword argument '%s' to method delete_namespaced_network_policyNzUMissing the required parameter `name` when calling `delete_namespaced_network_policy`zZMissing the required parameter `namespace` when calling `delete_namespaced_network_policy`zUMissing the required parameter `body` when calling `delete_namespaced_network_policy`zH/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}z{format}rÚgracePeriodSecondsÚorphanDependentsÚpropagationPolicyzapplication/jsonzapplication/yamlz#application/vnd.kubernetes.protobufrz*/*z Content-TyperrDrET) rrr r!r"rrrrr#) r$r%rr&r'r(rr)r*r+r)r rGrrrr,r-r.r/r#r0r1r2r3r4r5r6r"r r r rFCsx                     z?NetworkingV1Api.delete_namespaced_network_policy_with_http_infocKs2d|d<|jdƒr|jf|ŽS|jf|Ž}|SdS)aƒ get available resources This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_api_resources(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: V1APIResourceList If the method is called asynchronously, returns the request thread. TrrN)rÚ get_api_resources_with_http_info)r rrr r r Úget_api_resources«s    z!NetworkingV1Api.get_api_resourcescKs g}|jdƒ|jdƒ|jdƒ|jdƒtƒ}x4t|dƒD]$\}}||kr\td|ƒ‚|||<q@W|d=i}djdd ƒ}i}i} i} g} i} d } |jjd d d gƒ| d<|jjd d d gƒ| d<dg}|jj|d|| | | | | d||j dƒ|j dƒ|j ddƒ|j dƒ|dS)a’ get available resources This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_api_resources_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: V1APIResourceList If the method is called asynchronously, returns the request thread. rrrrrzCGot an unexpected keyword argument '%s' to method get_api_resourcesz/apis/networking.k8s.io/v1/z{format}rNzapplication/jsonzapplication/yamlz#application/vnd.kubernetes.protobufrz Content-TyperÚGETÚV1APIResourceListT) rrr r!r"rrrrr#) r$r%rr&r(rr)r*r+r)r rr,r-r.r/r#r0r1r2r3r4r5r6r"r r r rOÃsP        z0NetworkingV1Api.get_api_resources_with_http_infocKs6d|d<|jdƒr |j|f|ŽS|j|f|Ž}|SdS)a† list or watch objects of kind NetworkPolicy This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_namespaced_network_policy(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool include_uninitialized: If true, partially initialized resources are included in the response. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. :param int timeout_seconds: Timeout for the list/watch call. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :return: V1NetworkPolicyList If the method is called asynchronously, returns the request thread. TrrN)rÚ-list_namespaced_network_policy_with_http_info)r rrrr r r Úlist_namespaced_network_policy s  z.NetworkingV1Api.list_namespaced_network_policycKsâddddddddg}|jd ƒ|jd ƒ|jd ƒ|jd ƒtƒ}x4t|d ƒD]$\}}||krltd|ƒ‚|||<qPW|d =d|ks’|ddkrštdƒ‚i}djddƒ}i} d|krÂ|d| d<i} d|krÚ|d| d<d|krî|d| d<d|kr|d| d<d|kr|d| d<d|kr0|d| d<d|krF|d| d<d|kr\|d| d<i} g} i} d}|jjdddddgƒ| d<|jjdgƒ| d <d!g}|jj |d"| | | || | d#||j d ƒ|j d ƒ|j d d$ƒ|j d ƒ|d%S)&a• list or watch objects of kind NetworkPolicy This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_namespaced_network_policy_with_http_info(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool include_uninitialized: If true, partially initialized resources are included in the response. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. :param int timeout_seconds: Timeout for the list/watch call. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :return: V1NetworkPolicyList If the method is called asynchronously, returns the request thread. rrr9r:r;r<r=r>rrrrrzPGot an unexpected keyword argument '%s' to method list_namespaced_network_policyNzXMissing the required parameter `namespace` when calling `list_namespaced_network_policy`zA/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpoliciesz{format}rr?r@rArBrCzapplication/jsonzapplication/yamlz#application/vnd.kubernetes.protobufzapplication/json;stream=watchz0application/vnd.kubernetes.protobuf;stream=watchrz*/*z Content-TyperrQÚV1NetworkPolicyListT) rrr r!r"rrrrr#) r$r%rr&r'r(rr)r*r+r)r rrr,r-r.r/r#r0r1r2r3r4r5r6r"r r r rS,st                      z=NetworkingV1Api.list_namespaced_network_policy_with_http_infocKs2d|d<|jdƒr|jf|ŽS|jf|Ž}|SdS)a list or watch objects of kind NetworkPolicy This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_network_policy_for_all_namespaces(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool include_uninitialized: If true, partially initialized resources are included in the response. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str pretty: If 'true', then the output is pretty printed. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. :param int timeout_seconds: Timeout for the list/watch call. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :return: V1NetworkPolicyList If the method is called asynchronously, returns the request thread. TrrN)rÚ5list_network_policy_for_all_namespaces_with_http_info)r rrr r r Ú&list_network_policy_for_all_namespaces‘s    z6NetworkingV1Api.list_network_policy_for_all_namespacescKsªdddddddg}|jdƒ|jd ƒ|jd ƒ|jd ƒtƒ}x4t|d ƒD]$\}}||krjtd |ƒ‚|||<qNW|d =i}djddƒ}i}i} d|kr¨|d| d<d|kr¼|d| d<d|krÐ|d| d<d|krä|d| d<d|krø|d| d<d|kr|d| d<d|kr$|d| d<i} g} i} d} |jjdddddgƒ| d<|jjdgƒ| d<dg}|jj|d || | | | | d!||j dƒ|j d ƒ|j d d"ƒ|j d ƒ|d#S)$a. list or watch objects of kind NetworkPolicy This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_network_policy_for_all_namespaces_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool include_uninitialized: If true, partially initialized resources are included in the response. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str pretty: If 'true', then the output is pretty printed. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. :param int timeout_seconds: Timeout for the list/watch call. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :return: V1NetworkPolicyList If the method is called asynchronously, returns the request thread. r9r:r;rr<r=r>rrrrrzXGot an unexpected keyword argument '%s' to method list_network_policy_for_all_namespacesz*/apis/networking.k8s.io/v1/networkpoliciesz{format}rr?r@rArBrCNzapplication/jsonzapplication/yamlz#application/vnd.kubernetes.protobufzapplication/json;stream=watchz0application/vnd.kubernetes.protobuf;stream=watchrz*/*z Content-TyperrQrUT) rrr r!r"rrrrr#) r$r%rr&r(rr)r*r+r)r rr,r-r.r/r#r0r1r2r3r4r5r6r"r r r rV°sl                  zENetworkingV1Api.list_network_policy_for_all_namespaces_with_http_infocKs>d|d<|jdƒr$|j|||f|ŽS|j|||f|Ž}|SdS)aÍ partially update the specified NetworkPolicy This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.patch_namespaced_network_policy(name, namespace, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the NetworkPolicy (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1NetworkPolicy If the method is called asynchronously, returns the request thread. TrrN)rÚ.patch_namespaced_network_policy_with_http_info)r rGrrrrr r r Úpatch_namespaced_network_policys  z/NetworkingV1Api.patch_namespaced_network_policycKsºddddg}|jdƒ|jdƒ|jdƒ|jdƒtƒ}x4t|d ƒD]$\}}||krdtd |ƒ‚|||<qHW|d =d|ksŠ|dd kr’td ƒ‚d|ks¦|dd kr®td ƒ‚d|ksÂ|dd krÊtdƒ‚i} djddƒ} i} d|krò|d| d<d|kr|d| d<i} d|kr"|d| d<i} g}i}d }d|krD|d}|jjdddgƒ| d<|jjdddgƒ| d<dg}|jj | d| | | |||d||j dƒ|j dƒ|j ddƒ|j dƒ| dS)aÜ partially update the specified NetworkPolicy This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.patch_namespaced_network_policy_with_http_info(name, namespace, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the NetworkPolicy (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1NetworkPolicy If the method is called asynchronously, returns the request thread. rGrrrrrrrrzQGot an unexpected keyword argument '%s' to method patch_namespaced_network_policyNzTMissing the required parameter `name` when calling `patch_namespaced_network_policy`zYMissing the required parameter `namespace` when calling `patch_namespaced_network_policy`zTMissing the required parameter `body` when calling `patch_namespaced_network_policy`zH/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}z{format}rzapplication/jsonzapplication/yamlz#application/vnd.kubernetes.protobufrzapplication/json-patch+jsonzapplication/merge-patch+jsonz&application/strategic-merge-patch+jsonz Content-TyperÚPATCHrT) rrr r!r"rrrrr#) r$r%rr&r'r(rr)r*r+r)r rGrrrr,r-r.r/r#r0r1r2r3r4r5r6r"r r r rX+sl               z>NetworkingV1Api.patch_namespaced_network_policy_with_http_infocKs:d|d<|jdƒr"|j||f|ŽS|j||f|Ž}|SdS)az read the specified NetworkPolicy This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.read_namespaced_network_policy(name, namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the NetworkPolicy (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. :param bool export: Should this value be exported. Export strips fields that a user can not specify. :return: V1NetworkPolicy If the method is called asynchronously, returns the request thread. TrrN)rÚ-read_namespaced_network_policy_with_http_info)r rGrrrr r r Úread_namespaced_network_policyŠs  z.NetworkingV1Api.read_namespaced_network_policycKs´dddddg}|jdƒ|jdƒ|jdƒ|jd ƒtƒ}x4t|d ƒD]$\}}||krftd |ƒ‚|||<qJW|d =d|ksŒ|dd kr”td ƒ‚d|ks¨|dd kr°tdƒ‚i}djddƒ} i} d|krØ|d| d<d|krì|d| d<i} d|kr|d| d<d|kr|d| d<d|kr2|d| d<i} g} i}d }|jjdddgƒ| d<|jjdgƒ| d<dg}|jj | d| | | || |d||j dƒ|j dƒ|j ddƒ|j d ƒ|dS)a‰ read the specified NetworkPolicy This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.read_namespaced_network_policy_with_http_info(name, namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the NetworkPolicy (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. :param bool export: Should this value be exported. Export strips fields that a user can not specify. :return: V1NetworkPolicy If the method is called asynchronously, returns the request thread. rGrrÚexactÚexportrrrrrzPGot an unexpected keyword argument '%s' to method read_namespaced_network_policyNzSMissing the required parameter `name` when calling `read_namespaced_network_policy`zXMissing the required parameter `namespace` when calling `read_namespaced_network_policy`zH/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}z{format}rzapplication/jsonzapplication/yamlz#application/vnd.kubernetes.protobufrz*/*z Content-TyperrQrT) rrr r!r"rrrrr#) r$r%rr&r'r(rr)r*r+r)r rGrrr,r-r.r/r#r0r1r2r3r4r5r6r"r r r r[§sl                 z=NetworkingV1Api.read_namespaced_network_policy_with_http_infocKs>d|d<|jdƒr$|j|||f|ŽS|j|||f|Ž}|SdS)aÏ replace the specified NetworkPolicy This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_network_policy(name, namespace, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the NetworkPolicy (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1NetworkPolicy body: (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1NetworkPolicy If the method is called asynchronously, returns the request thread. TrrN)rÚ0replace_namespaced_network_policy_with_http_info)r rGrrrrr r r Ú!replace_namespaced_network_policys  z1NetworkingV1Api.replace_namespaced_network_policycKs¶ddddg}|jdƒ|jdƒ|jdƒ|jdƒtƒ}x4t|d ƒD]$\}}||krdtd |ƒ‚|||<qHW|d =d|ksŠ|dd kr’td ƒ‚d|ks¦|dd kr®td ƒ‚d|ksÂ|dd krÊtdƒ‚i} djddƒ} i} d|krò|d| d<d|kr|d| d<i} d|kr"|d| d<i} g}i}d }d|krD|d}|jjdddgƒ| d<|jjdgƒ| d<dg}|jj | d| | | |||d||j dƒ|j dƒ|j ddƒ|j dƒ| dS)aÞ replace the specified NetworkPolicy This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_network_policy_with_http_info(name, namespace, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the NetworkPolicy (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1NetworkPolicy body: (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1NetworkPolicy If the method is called asynchronously, returns the request thread. rGrrrrrrrrzSGot an unexpected keyword argument '%s' to method replace_namespaced_network_policyNzVMissing the required parameter `name` when calling `replace_namespaced_network_policy`z[Missing the required parameter `namespace` when calling `replace_namespaced_network_policy`zVMissing the required parameter `body` when calling `replace_namespaced_network_policy`zH/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}z{format}rzapplication/jsonzapplication/yamlz#application/vnd.kubernetes.protobufrz*/*z Content-TyperÚPUTrT) rrr r!r"rrrrr#) r$r%rr&r'r(rr)r*r+r)r rGrrrr,r-r.r/r#r0r1r2r3r4r5r6r"r r r r_"sl                z@NetworkingV1Api.replace_namespaced_network_policy_with_http_info)N)Ú__name__Ú __module__Ú __qualname__Ú__doc__r rrr8r7rHrFrPrOrTrSrWrVrYrXr\r[r`r_r r r r rs( Y ehI e___r)reÚ __future__rÚsysÚosÚreÚsixrÚ configurationrrrÚobjectrr r r r Ú s