Merge "debian: update python-kubernetes function calls"
This commit is contained in:
commit
dcf50fe77e
|
@ -511,7 +511,7 @@ class KubeOperator(object):
|
||||||
|
|
||||||
c = self._get_kubernetesclient_core()
|
c = self._get_kubernetesclient_core()
|
||||||
try:
|
try:
|
||||||
return c.delete_namespaced_secret(name, namespace, body)
|
return c.delete_namespaced_secret(name, namespace, body=body)
|
||||||
except ApiException as e:
|
except ApiException as e:
|
||||||
if e.status == httplib.NOT_FOUND:
|
if e.status == httplib.NOT_FOUND:
|
||||||
LOG.warn("Secret %s under Namespace %s "
|
LOG.warn("Secret %s under Namespace %s "
|
||||||
|
@ -532,7 +532,7 @@ class KubeOperator(object):
|
||||||
|
|
||||||
c = self._get_kubernetesclient_core()
|
c = self._get_kubernetesclient_core()
|
||||||
try:
|
try:
|
||||||
c.delete_namespace(namespace, body)
|
c.delete_namespace(namespace, body=body)
|
||||||
except ApiException as e:
|
except ApiException as e:
|
||||||
if e.status == httplib.NOT_FOUND:
|
if e.status == httplib.NOT_FOUND:
|
||||||
LOG.warn("Namespace %s not found." % namespace)
|
LOG.warn("Namespace %s not found." % namespace)
|
||||||
|
@ -607,7 +607,7 @@ class KubeOperator(object):
|
||||||
|
|
||||||
c = self._get_kubernetesclient_core()
|
c = self._get_kubernetesclient_core()
|
||||||
try:
|
try:
|
||||||
c.delete_namespaced_config_map(name, namespace, body)
|
c.delete_namespaced_config_map(name, namespace, body=body)
|
||||||
except ApiException as e:
|
except ApiException as e:
|
||||||
if e.status == httplib.NOT_FOUND:
|
if e.status == httplib.NOT_FOUND:
|
||||||
LOG.warn("ConfigMap %s under Namespace %s "
|
LOG.warn("ConfigMap %s under Namespace %s "
|
||||||
|
@ -674,7 +674,7 @@ class KubeOperator(object):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
c.delete_namespaced_custom_object(group, version, namespace,
|
c.delete_namespaced_custom_object(group, version, namespace,
|
||||||
plural, name, body)
|
plural, name, body=body)
|
||||||
except ApiException as ex:
|
except ApiException as ex:
|
||||||
if ex.reason == "Not Found":
|
if ex.reason == "Not Found":
|
||||||
LOG.warn("Failed to delete custom resource object, Namespace "
|
LOG.warn("Failed to delete custom resource object, Namespace "
|
||||||
|
@ -875,7 +875,7 @@ class KubeOperator(object):
|
||||||
|
|
||||||
c = self._get_kubernetesclient_core()
|
c = self._get_kubernetesclient_core()
|
||||||
try:
|
try:
|
||||||
api_response = c.delete_namespaced_pod(name, namespace, body)
|
api_response = c.delete_namespaced_pod(name, namespace, body=body)
|
||||||
LOG.debug("%s" % api_response)
|
LOG.debug("%s" % api_response)
|
||||||
return True
|
return True
|
||||||
except ApiException as e:
|
except ApiException as e:
|
||||||
|
@ -959,7 +959,7 @@ class KubeOperator(object):
|
||||||
body.update(kwargs)
|
body.update(kwargs)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
c.delete_validating_webhook_configuration(name, body)
|
c.delete_validating_webhook_configuration(name, body=body)
|
||||||
except ApiException as e:
|
except ApiException as e:
|
||||||
if e.status == httplib.NOT_FOUND:
|
if e.status == httplib.NOT_FOUND:
|
||||||
LOG.warn("ValidatingWebhookConfiguration %s "
|
LOG.warn("ValidatingWebhookConfiguration %s "
|
||||||
|
@ -996,7 +996,7 @@ class KubeOperator(object):
|
||||||
body.update(kwargs)
|
body.update(kwargs)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
c.delete_mutating_webhook_configuration(name, body)
|
c.delete_mutating_webhook_configuration(name, body=body)
|
||||||
except ApiException as e:
|
except ApiException as e:
|
||||||
if e.status == httplib.NOT_FOUND:
|
if e.status == httplib.NOT_FOUND:
|
||||||
LOG.warn("MutatingWebhookConfiguration %s "
|
LOG.warn("MutatingWebhookConfiguration %s "
|
||||||
|
|
Loading…
Reference in New Issue