Francesco Romani has posted comments on this change.
Change subject: vm: Allow to use 'serial' or 'virtio' type consoles ......................................................................
Patch Set 8:
(2 comments)
I'm fine with the concept, but I'd like to pack as much as possible the creation of the bits of XML into the Devices.
http://gerrit.ovirt.org/#/c/25979/8/vdsm/virt/vmdevices.py File vdsm/virt/vmdevices.py:
Line 97: """ Line 98: m = self.createXmlElem('console', 'pty') Line 99: consoleType = self.specParams.get('consoleType', 'virtio') Line 100: m.appendChildWithArgs('target', type=consoleType, port='0') Line 101: return m Please add a method (getSerialXML?) and move from appendSerialConsole the creation of the related XML. Line 102: Line 103: Line 104: class Controller(Base): Line 105: __slots__ = ('address', 'model', 'index', 'master')
http://gerrit.ovirt.org/#/c/25979/8/vdsm/virt/vmxml.py File vdsm/virt/vmxml.py:
Line 466: emulator = Element('emulator', text=emulatorPath) Line 467: Line 468: self._devices.appendChild(emulator) Line 469: Line 470: def appendConsoleSerial(self): I'd like more to see this into the Console device, with a method to add the custom XML when needed, much like GraphicsDevice does with getSpiceVmcChannelsXML and Drive does with getLeasesXML. Line 471: """ Line 472: Add a serial port for the console device if it exists and is a Line 473: 'serial' type device. Line 474: