cli: Add --serial target.model.name=

This maps to XML like:

  <serial>
    <target>
      <model name='X'/>
    </target>
  </serial>
This commit is contained in:
Cole Robinson 2019-05-14 11:32:18 -04:00
parent bf2fe0790e
commit ca0f9e18cc
4 changed files with 6 additions and 1 deletions

View File

@ -266,6 +266,9 @@
<source mode="bind" host="127.0.0.1" service="2222"/>
<protocol type="telnet"/>
<log file="/tmp/foo.log" append="on"/>
<target>
<model name="pci-serial"/>
</target>
</serial>
<serial type="nmdm">
<source master="/dev/foo1" slave="/dev/foo2"/>

View File

@ -533,7 +533,7 @@ c.add_compare("""
--input type=keyboard,bus=usb
--input tablet
--serial tcp,host=:2222,mode=bind,protocol=telnet,log_file=/tmp/foo.log,log_append=yes
--serial tcp,host=:2222,mode=bind,protocol=telnet,log_file=/tmp/foo.log,log_append=yes,,target.model.name=pci-serial
--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,source.seclabel0.model=none,source.seclabel1.model=dac,source.seclabel1.relabel=yes,source.seclabel1.label=foobar,source.seclabel.relabel=no

View File

@ -3439,6 +3439,7 @@ class _ParserChar(VirtCLIParser):
cls.add_arg("target.type", "target_type")
cls.add_arg("target.name", "target_name")
cls.add_arg("target.port", "target_port")
cls.add_arg("target.model.name", "target_model_name")
class ParserSerial(_ParserChar):

View File

@ -161,6 +161,7 @@ class _DeviceChar(Device):
target_type = XMLProperty("./target/@type")
target_name = XMLProperty("./target/@name")
target_state = XMLProperty("./target/@state")
target_model_name = XMLProperty("./target/model/@name")
##################