From 95a691e3b6be4bbc23ec8dc45d2d087a28104d3c Mon Sep 17 00:00:00 2001 From: Haitao Yue <hightall@me.com> Date: Wed, 10 Jan 2018 15:13:09 +0800 Subject: [PATCH] [CE-219] Fix host clean operation in admin dashboard Can clean host in admin dashboard Change-Id: I3b66f5bfc0a2352d8e61c8e760c18dc3bc55d25e Signed-off-by: Haitao Yue <hightall@me.com> --- src/modules/host.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/host.py b/src/modules/host.py index 56ee4ce1a..95334e786 100644 --- a/src/modules/host.py +++ b/src/modules/host.py @@ -382,19 +382,19 @@ def clean(self, id): if len(clusters) <= 0: return True - host = self.db_set_by_id(id, autofill=False) + host = self.db_set_by_id(id, **{"autofill": False}) schedulable_status = host.schedulable if schedulable_status: - host = self.db_set_by_id(id, schedulable=False) + host = self.db_set_by_id(id, **{"schedulable": False}) for cluster_item in clusters: cid = str(cluster_item.id) - t = Thread(target=cluster_item.cluster_handler.delete, args=(cid,)) + t = Thread(target=cluster.cluster_handler.delete, args=(cid,)) t.start() time.sleep(0.2) if schedulable_status: - self.db_set_by_id(id, schedulable=schedulable_status) + self.db_set_by_id(id, **{"schedulable": schedulable_status}) return True