diff --git a/tests/cli-test-xml/compare/virt-install-many-devices.xml b/tests/cli-test-xml/compare/virt-install-many-devices.xml index cc98309e..64471d2e 100644 --- a/tests/cli-test-xml/compare/virt-install-many-devices.xml +++ b/tests/cli-test-xml/compare/virt-install-many-devices.xml @@ -246,6 +246,9 @@ + + + diff --git a/tests/clitest.py b/tests/clitest.py index 4bcd85c1..b63a7a00 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -491,6 +491,7 @@ c.add_compare(""" \ --input tablet \ \ --serial tcp,host=:2222,mode=bind,protocol=telnet,log_file=/tmp/foo.log,log_append=yes \ +--serial nmdm,source.master=/dev/foo1,source.slave=/dev/foo2 \ --parallel udp,host=0.0.0.0:1234,bind_host=127.0.0.1:1234 \ --parallel unix,path=/tmp/foo-socket \ --channel pty,target_type=guestfwd,target_address=127.0.0.1:10000 \ diff --git a/tests/testdriver.xml b/tests/testdriver.xml index 582af85e..c5cdac9a 100644 --- a/tests/testdriver.xml +++ b/tests/testdriver.xml @@ -603,6 +603,9 @@ Foo bar baz & yeah boii < > yeahfoo + + + diff --git a/virtinst/cli.py b/virtinst/cli.py index c9376851..73a16bda 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -2375,6 +2375,8 @@ _ParserChar.add_arg(None, "host", cb=_ParserChar.set_host_cb) _ParserChar.add_arg(None, "bind_host", cb=_ParserChar.set_bind_cb) _ParserChar.add_arg(None, "target_address", cb=_ParserChar.set_target_cb) _ParserChar.add_arg("source_mode", "mode") +_ParserChar.add_arg("source_master", "source.master") +_ParserChar.add_arg("source_slave", "source.slave") _ParserChar.add_arg("log_file", "log.file") _ParserChar.add_arg("log_append", "log.append", is_onoff=True) diff --git a/virtinst/devicechar.py b/virtinst/devicechar.py index a711c5bd..0047a26e 100644 --- a/virtinst/devicechar.py +++ b/virtinst/devicechar.py @@ -39,6 +39,7 @@ class _VirtualCharDevice(VirtualDevice): TYPE_UNIX = "unix" TYPE_SPICEVMC = "spicevmc" TYPE_SPICEPORT = "spiceport" + TYPE_NMDM = "nmdm" # We don't list the non-UI friendly types here _TYPES_FOR_ALL = [TYPE_PTY, TYPE_DEV, TYPE_FILE, @@ -146,6 +147,8 @@ class _VirtualCharDevice(VirtualDevice): "source_host" : [self.TYPE_TCP, self.TYPE_UDP], "source_port" : [self.TYPE_TCP, self.TYPE_UDP], "source_channel": [self.TYPE_SPICEPORT], + "source_master" : [self.TYPE_NMDM], + "source_slave" : [self.TYPE_NMDM], "protocol" : [self.TYPE_TCP], "bind_host" : [self.TYPE_UDP], "bind_port" : [self.TYPE_UDP], @@ -209,6 +212,8 @@ class _VirtualCharDevice(VirtualDevice): source_channel = XMLProperty("./source/@channel", doc=_("Source channel name.")) + source_master = XMLProperty("./source/@master") + source_slave = XMLProperty("./source/@slave") ###################