Martin Polednik has uploaded a new change for review.
Change subject: vdsm: move watchdog default params to WatchdogDevice
......................................................................
vdsm: move watchdog default params to WatchdogDevice
Watchdog device creation is currently for no reason in buildConfDevices
while it belongs to WatchdogDevice getXML method
Change-Id: Ic76f040bf78cbec3129569eb30fbf14447f742d6
Signed-off-by: Martin Polednik <mpoledni(a)redhat.com>
---
M vdsm/vm.py
1 file changed, 2 insertions(+), 10 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/31/19331/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 92d274e..ba268f6 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -1616,8 +1616,8 @@
</watchdog>
"""
m = self.createXmlElem(self.type, None, ['address'])
- m.setAttrs(model=self.specParams['model'],
- action=self.specParams['action'])
+ m.setAttrs(model=self.specParams.get('model', 'i6300esb'),
+ action=self.specParams.get('action', 'none'))
return m
@@ -1908,14 +1908,6 @@
# libvirt only support one watchdog device
if len(devices[WATCHDOG_DEVICES]) > 1:
raise ValueError("only a single watchdog device is supported")
- if len(devices[WATCHDOG_DEVICES]) == 1:
- if not 'specParams' in devices[WATCHDOG_DEVICES][0]:
- devices[WATCHDOG_DEVICES][0]['specParams'] = {}
- if not 'model' in
devices[WATCHDOG_DEVICES][0]['specParams']:
- devices[WATCHDOG_DEVICES][0]['specParams']['model'] = \
- 'i6300esb'
- if not 'action' in
devices[WATCHDOG_DEVICES][0]['specParams']:
- devices[WATCHDOG_DEVICES][0]['specParams']['action'] =
'none'
if len(devices[CONSOLE_DEVICES]) > 1:
raise ValueError("Only a single console device is supported")
--
To view, visit
http://gerrit.ovirt.org/19331
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic76f040bf78cbec3129569eb30fbf14447f742d6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpoledni(a)redhat.com>