From d951fcf20b046a8c85bee4cef8de65f4c08ec433 Mon Sep 17 00:00:00 2001 From: Li Zhu Date: Wed, 20 Jul 2022 16:30:09 -0400 Subject: [PATCH] Debian: Update python-kubernetes function calls On Debian, a newer version of python-kubernetes is used, and it has some function definitions changes, mainly, for some functions, the argument 'body' is no longer a positional argument, these have been updated to work on both OS's. Test Plan: PASS: Subcloud delete on CentOS PASS: Subcloud delete on Debian Story: 2010119 Task: 45840 Signed-off-by: Li Zhu Change-Id: I7be9a09b715713c9f8d4c47241cf33558223a6a6 --- distributedcloud/dccommon/kubeoperator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distributedcloud/dccommon/kubeoperator.py b/distributedcloud/dccommon/kubeoperator.py index 68cda913d..2bfd9e416 100644 --- a/distributedcloud/dccommon/kubeoperator.py +++ b/distributedcloud/dccommon/kubeoperator.py @@ -80,7 +80,7 @@ class KubeOperator(object): c = self._get_kubernetesclient_core() try: - c.delete_namespaced_secret(name, namespace, body) + c.delete_namespaced_secret(name, namespace, body=body) except ApiException as e: if e.status == httplib.NOT_FOUND: LOG.warn("Secret %s under Namespace %s " @@ -143,7 +143,7 @@ class KubeOperator(object): namespace, CERT_MANAGER_CERTIFICATE, name, - {} + body={} ) except ApiException as e: if e.status != httplib.NOT_FOUND: