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 <li.zhu@windriver.com>
Change-Id: I7be9a09b715713c9f8d4c47241cf33558223a6a6
This commit is contained in:
Li Zhu 2022-07-20 16:30:09 -04:00
parent 421e596ce8
commit d951fcf20b
1 changed files with 2 additions and 2 deletions

View File

@ -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: