Merge "openshiftpods: fix delete_namespaced_pod arguments"
This commit is contained in:
commit
96932c25f9
@ -96,14 +96,8 @@ class OpenshiftPodsProvider(OpenshiftProvider):
|
|||||||
self.log.exception("%s: unknown pool" % server_id)
|
self.log.exception("%s: unknown pool" % server_id)
|
||||||
return
|
return
|
||||||
self.log.debug("%s: removing pod" % pod_name)
|
self.log.debug("%s: removing pod" % pod_name)
|
||||||
delete_body = {
|
|
||||||
"apiVersion": "v1",
|
|
||||||
"kind": "DeleteOptions",
|
|
||||||
"propagationPolicy": "Background"
|
|
||||||
}
|
|
||||||
try:
|
try:
|
||||||
self.k8s_client.delete_namespaced_pod(
|
self.k8s_client.delete_namespaced_pod(pod_name, project_name)
|
||||||
pod_name, project_name, delete_body)
|
|
||||||
self.log.info("%s: pod removed" % server_id)
|
self.log.info("%s: pod removed" % server_id)
|
||||||
except Exception:
|
except Exception:
|
||||||
# TODO: implement better exception handling
|
# TODO: implement better exception handling
|
||||||
|
@ -56,7 +56,7 @@ class FakeCoreClient(object):
|
|||||||
phase = "Running"
|
phase = "Running"
|
||||||
return FakePod
|
return FakePod
|
||||||
|
|
||||||
def delete_namespaced_pod(self, name, project, delete_body):
|
def delete_namespaced_pod(self, name, project):
|
||||||
to_delete = None
|
to_delete = None
|
||||||
for pod in self.pods:
|
for pod in self.pods:
|
||||||
if pod.metadata.name == name:
|
if pod.metadata.name == name:
|
||||||
|
Loading…
Reference in New Issue
Block a user