Change in vdsm[master]: vm: use response module in the destroy path
fromani at redhat.com
fromani at redhat.com
Tue Jan 5 14:18:52 UTC 2016
Francesco Romani has uploaded a new change for review.
Change subject: vm: use response module in the destroy path
......................................................................
vm: use response module in the destroy path
use the facilities of the response module to
make the code nicer, and easier to change in the future.
Change-Id: I92402f2101c4c256e18b251e2e12e65b8ae849a1
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/83/51383/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 5b18b83..50ea74a 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -3811,7 +3811,7 @@
with self._releaseLock:
if self._released:
- return {'status': doneCode}
+ return response.success()
# unsetting mirror network will clear both mirroring
# (on the same network).
@@ -3829,7 +3829,7 @@
self.guestAgent.stop()
if self._dom.connected:
result = self._destroyVmGraceful()
- if result['status']['code']:
+ if response.is_error(result):
return result
# Wait for any Live Merge cleanup threads. This will only block in
@@ -3850,7 +3850,7 @@
self._released = True
- return {'status': doneCode}
+ return response.success()
def _destroyVmGraceful(self):
try:
@@ -3893,12 +3893,12 @@
self.log.debug('destroy Called')
result = self.doDestroy()
- if result['status']['code']:
+ if response.is_error(result):
return result
# Clean VM from the system
self.deleteVm()
- return {'status': doneCode}
+ return response.success()
def doDestroy(self):
for dev in self._customDevices():
--
To view, visit https://gerrit.ovirt.org/51383
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I92402f2101c4c256e18b251e2e12e65b8ae849a1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
More information about the vdsm-patches
mailing list