Add support for setting up <channel> elements in libvirt config
To enable use of guest agents, support for configuring the <channel> elements in libvirt XML config is required Blueprint: libvirt-spice Change-Id: I3cea7b326bb2f746c5804d0aa3bbe369da6935e8 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
@@ -539,6 +539,29 @@ class LibvirtConfigGuestConsoleTest(LibvirtConfigBaseTest):
|
||||
<console type="pty"/>""")
|
||||
|
||||
|
||||
class LibvirtConfigGuestChannelTest(LibvirtConfigBaseTest):
|
||||
def test_config_spice_minimal(self):
|
||||
obj = config.LibvirtConfigGuestChannel()
|
||||
obj.type = "spicevmc"
|
||||
|
||||
xml = obj.to_xml()
|
||||
self.assertXmlEqual(xml, """
|
||||
<channel type="spicevmc">
|
||||
<target type='virtio'/>
|
||||
</channel>""")
|
||||
|
||||
def test_config_spice_full(self):
|
||||
obj = config.LibvirtConfigGuestChannel()
|
||||
obj.type = "spicevmc"
|
||||
obj.target_name = "com.redhat.spice.0"
|
||||
|
||||
xml = obj.to_xml()
|
||||
self.assertXmlEqual(xml, """
|
||||
<channel type="spicevmc">
|
||||
<target type='virtio' name='com.redhat.spice.0'/>
|
||||
</channel>""")
|
||||
|
||||
|
||||
class LibvirtConfigGuestInterfaceTest(LibvirtConfigBaseTest):
|
||||
def test_config_ethernet(self):
|
||||
obj = config.LibvirtConfigGuestInterface()
|
||||
|
Reference in New Issue
Block a user