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 cf77888a..1cb4b3f4 100644 --- a/tests/cli-test-xml/compare/virt-install-many-devices.xml +++ b/tests/cli-test-xml/compare/virt-install-many-devices.xml @@ -168,6 +168,14 @@ + + + + + + + + diff --git a/tests/clitest.py b/tests/clitest.py index ccd15bcf..2c878044 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -460,6 +460,7 @@ c.add_compare(""" \ \ --network user,mac=12:34:56:78:11:22,portgroup=foo \ --network bridge=foobar,model=virtio,driver_name=qemu,driver_queues=3 \ +--network bridge=ovsbr,virtualport_type=openvswitch,virtualport_profileid=demo,virtualport_interfaceid=09b11c53-8b5c-4eeb-8f00-d84eaa0aaa3b \ --network type=direct,source=eth5,source_mode=vepa,target=mytap12,virtualport_type=802.1Qbg,virtualport_managerid=12,virtualport_typeid=1193046,virtualport_typeidversion=1,virtualport_instanceid=09b11c53-8b5c-4eeb-8f00-d84eaa0aaa3b,boot_order=1 \ \ --graphics sdl \ diff --git a/virtinst/cli.py b/virtinst/cli.py index 22123d8a..05c88127 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -1761,12 +1761,20 @@ class ParserNetwork(VirtCLIParser): self.set_param("driver_queues", "driver_queues") self.set_param("virtualport.type", "virtualport_type") + + # For 802.1Qbg self.set_param("virtualport.managerid", "virtualport_managerid") self.set_param("virtualport.typeid", "virtualport_typeid") self.set_param("virtualport.typeidversion", "virtualport_typeidversion") self.set_param("virtualport.instanceid", "virtualport_instanceid") + # For openvswitch & 802.1Qbh + self.set_param("virtualport.profileid", "virtualport_profileid") + + # For openvswitch & midonet + self.set_param("virtualport.interfaceid", "virtualport_interfaceid") + def _parse(self, optsobj, inst): if optsobj.fullopts == "none": return diff --git a/virtinst/deviceinterface.py b/virtinst/deviceinterface.py index cabd6562..78143a93 100644 --- a/virtinst/deviceinterface.py +++ b/virtinst/deviceinterface.py @@ -60,6 +60,8 @@ class VirtualPort(XMLBuilder): typeid = XMLProperty("./parameters/@typeid", is_int=True) typeidversion = XMLProperty("./parameters/@typeidversion", is_int=True) instanceid = XMLProperty("./parameters/@instanceid") + profileid = XMLProperty("./parameters/@profileid") + interfaceid = XMLProperty("./parameters/@interfaceid") class VirtualNetworkInterface(VirtualDevice):