-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't delete all nodes when empty string is passed
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters