Francesco Romani has uploaded a new change for review. Change subject: periodic: make runnable a method ......................................................................
periodic: make runnable a method A future patch wants to consolidate common Operation code in a superclass. Operation.runnable needs to be overridden, and making a property overridable is clumsy. It is simpler to make it a method, and this is what this patch does. X-Backport-To: 3.6 Change-Id: I25bedc6d55f8a3fe227382077c18068087ea2f2d Signed-off-by: Francesco Romani <[email protected]> --- M tests/periodicTests.py M vdsm/virt/periodic.py 2 files changed, 1 insertion(+), 6 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/11/44811/1 diff --git a/tests/periodicTests.py b/tests/periodicTests.py index ce4d592..47ba2d2 100644 --- a/tests/periodicTests.py +++ b/tests/periodicTests.py @@ -250,7 +250,6 @@ raise ValueError('required failed') return True - @property def runnable(self): if getattr(self._vm, 'fail_runnable', False): raise ValueError('runnable failed') @@ -268,7 +267,6 @@ def required(self): return True - @property def runnable(self): return True diff --git a/vdsm/virt/periodic.py b/vdsm/virt/periodic.py index 5d60a08..5df3b19 100644 --- a/vdsm/virt/periodic.py +++ b/vdsm/virt/periodic.py @@ -237,7 +237,7 @@ # still OK if occasional misdetection occours, but we # definitely want to avoid known-bad situation and to # needlessly overload libvirt. - if not op.runnable: + if not op.runnable(): skipped.append(vm_id) continue @@ -269,7 +269,6 @@ # Avoid queries from storage during recovery process return self._vm.isDisksStatsCollectionEnabled() - @property def runnable(self): return self._vm.isDomainReadyForCommands() @@ -289,7 +288,6 @@ def required(self): return self._vm.hasGuestNumaNode - @property def runnable(self): return True @@ -310,7 +308,6 @@ # monitor (most often true). return self._vm.hasVmJobs - @property def runnable(self): return self._vm.isDomainReadyForCommands() -- To view, visit https://gerrit.ovirt.org/44811 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I25bedc6d55f8a3fe227382077c18068087ea2f2d Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
