From 2a0eaaebd301c623879384801261c39ea73da305 Mon Sep 17 00:00:00 2001 From: Sowmya Krishnan Date: Mon, 17 Aug 2015 16:22:54 +0530 Subject: [PATCH] CLOUDSTACK-8738: Added the two methods for enable and cancel maintenance mode on StoragePool --- tools/marvin/marvin/lib/base.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py index 71aa3e67a670..aca7fd105de7 100755 --- a/tools/marvin/marvin/lib/base.py +++ b/tools/marvin/marvin/lib/base.py @@ -2637,6 +2637,22 @@ def enableMaintenance(self, apiclient): cmd.id = self.id return apiclient.enableStorageMaintenance(cmd) + @classmethod + def enableMaintenance(cls, apiclient, id): + """enables maintenance mode Storage pool""" + + cmd = enableStorageMaintenance.enableStorageMaintenanceCmd() + cmd.id = id + return apiclient.enableStorageMaintenance(cmd) + + @classmethod + def cancelMaintenance(cls, apiclient, id): + """Cancels maintenance mode Host""" + + cmd = cancelStorageMaintenance.cancelStorageMaintenanceCmd() + cmd.id = id + return apiclient.cancelStorageMaintenance(cmd) + @classmethod def list(cls, apiclient, **kwargs): """List all storage pools matching criteria"""