Merge "Simply & unify console handling for libvirt drivers"
This commit is contained in:
@@ -357,12 +357,17 @@ class Domain(object):
|
|||||||
function='0x1'/>
|
function='0x1'/>
|
||||||
</controller>
|
</controller>
|
||||||
%(nics)s
|
%(nics)s
|
||||||
<serial type='pty'>
|
<serial type='file'>
|
||||||
<source pty='/dev/pts/27'/>
|
<source path='dummy.log'/>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</serial>
|
</serial>
|
||||||
<console type='pty'>
|
<serial type='pty'>
|
||||||
<target type='serial' port='0'/>
|
<source pty='/dev/pts/27'/>
|
||||||
|
<target port='1'/>
|
||||||
|
</serial>
|
||||||
|
<console type='file'>
|
||||||
|
<source path='dummy.log'/>
|
||||||
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
<input type='tablet' bus='usb'/>
|
<input type='tablet' bus='usb'/>
|
||||||
<input type='mouse' bus='ps2'/>
|
<input type='mouse' bus='ps2'/>
|
||||||
|
|||||||
@@ -879,6 +879,21 @@ class LibvirtConnTestCase(test.TestCase):
|
|||||||
check = (lambda t: t.find('./os/initrd'), None)
|
check = (lambda t: t.find('./os/initrd'), None)
|
||||||
check_list.append(check)
|
check_list.append(check)
|
||||||
|
|
||||||
|
if hypervisor_type in ['qemu', 'kvm']:
|
||||||
|
check = (lambda t: t.findall('./devices/serial')[0].get(
|
||||||
|
'type'), 'file')
|
||||||
|
check_list.append(check)
|
||||||
|
check = (lambda t: t.findall('./devices/serial')[1].get(
|
||||||
|
'type'), 'pty')
|
||||||
|
check_list.append(check)
|
||||||
|
check = (lambda t: t.findall('./devices/serial/source')[0].get(
|
||||||
|
'path').split('/')[1], 'console.log')
|
||||||
|
check_list.append(check)
|
||||||
|
else:
|
||||||
|
check = (lambda t: t.find('./devices/console').get(
|
||||||
|
'type'), 'pty')
|
||||||
|
check_list.append(check)
|
||||||
|
|
||||||
parameter = './devices/interface/filterref/parameter'
|
parameter = './devices/interface/filterref/parameter'
|
||||||
common_checks = [
|
common_checks = [
|
||||||
(lambda t: t.find('.').tag, 'domain'),
|
(lambda t: t.find('.').tag, 'domain'),
|
||||||
@@ -888,8 +903,6 @@ class LibvirtConnTestCase(test.TestCase):
|
|||||||
(lambda t: t.findall(parameter)[1].get('name'), 'DHCPSERVER'),
|
(lambda t: t.findall(parameter)[1].get('name'), 'DHCPSERVER'),
|
||||||
(lambda t: _ipv4_like(t.findall(parameter)[1].get('value'),
|
(lambda t: _ipv4_like(t.findall(parameter)[1].get('value'),
|
||||||
'192.168.*.1'), True),
|
'192.168.*.1'), True),
|
||||||
(lambda t: t.find('./devices/serial/source').get(
|
|
||||||
'path').split('/')[1], 'console.log'),
|
|
||||||
(lambda t: t.find('./memory').text, '2097152')]
|
(lambda t: t.find('./memory').text, '2097152')]
|
||||||
if rescue:
|
if rescue:
|
||||||
common_checks += [
|
common_checks += [
|
||||||
|
|||||||
Reference in New Issue
Block a user