Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't delete all nodes when empty string is passed #2210

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions scripts/core_v1_api.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/kubernetes/client/api/core_v1_api.py b/kubernetes/client/api/core_v1_api.py
index 282d9b88..8de09a11 100644
--- a/kubernetes/client/api/core_v1_api.py
+++ b/kubernetes/client/api/core_v1_api.py
@@ -13680,7 +13680,10 @@ class CoreV1Api(object):
del local_var_params['kwargs']
# verify the required parameter 'name' is set
if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
+ local_var_params['name'] is None or # noqa: E501
+ not len(local_var_params['name'].strip())): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_node`") # noqa: E501
+ if not len(name):
raise ApiValueError("Missing the required parameter `name` when calling `delete_node`") # noqa: E501

collection_formats = {}
2 changes: 2 additions & 0 deletions scripts/update-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ git apply "${SCRIPT_ROOT}/rest_client_patch.diff"
git apply "${SCRIPT_ROOT}/rest_sni_patch.diff"
# OpenAPI client generator prior to 6.4.0 uses deprecated urllib3 APIs.
git apply "${SCRIPT_ROOT}/rest_urllib_headers.diff"
# Delete Node fix for empty string
git apply "${SCRIPT_ROOT}/core_v1_api.diff"

echo ">>> generating docs..."
pushd "${DOC_ROOT}" > /dev/null
Expand Down