Change in vdsm[master]: virt: graphdev: add hasSpice helper
fromani at redhat.com
fromani at redhat.com
Thu Apr 17 15:53:22 UTC 2014
Francesco Romani has uploaded a new change for review.
Change subject: virt: graphdev: add hasSpice helper
......................................................................
virt: graphdev: add hasSpice helper
add an helper property to display if a Vm has a SPICE display
or not.
Change-Id: I170e439f54a16c2616b57533505ad65e8c06490f
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/virt/migration.py
M vdsm/virt/vm.py
2 files changed, 5 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/92/26892/1
diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index 963f6dc..60582cb 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -301,8 +301,7 @@
self._monitorThread.start()
try:
- if ('qxl' in self._vm.conf['display'] and
- self._vm.conf.get('clientIp')):
+ if self._vm.hasSpice and self._vm.conf.get('clientIp'):
SPICE_MIGRATION_HANDOVER_TIME = 120
self._vm._reviveTicket(SPICE_MIGRATION_HANDOVER_TIME)
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index e7f6ddf..521e33b 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -4199,6 +4199,10 @@
self.log.warning('unexpected action %i on device %s error %s',
action, blockDevAlias, err)
+ @property
+ def hasSpice(self):
+ return 'qxl' in self._vm.conf['display']
+
def _getPid(self):
pid = '0'
try:
--
To view, visit http://gerrit.ovirt.org/26892
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I170e439f54a16c2616b57533505ad65e8c06490f
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