virt-install: Add --network portgroup= option
This commit is contained in:
parent
1c608f3ba8
commit
42fe235cbf
|
@ -93,6 +93,7 @@
|
|||
<target dir="/target"/>
|
||||
</filesystem>
|
||||
<interface type="user">
|
||||
<source portgroup="foo"/>
|
||||
<mac address="12:34:56:78:11:22"/>
|
||||
</interface>
|
||||
<interface type="bridge">
|
||||
|
@ -237,6 +238,7 @@
|
|||
<target dir="/target"/>
|
||||
</filesystem>
|
||||
<interface type="user">
|
||||
<source portgroup="foo"/>
|
||||
<mac address="12:34:56:78:11:22"/>
|
||||
</interface>
|
||||
<interface type="bridge">
|
||||
|
|
|
@ -559,7 +559,7 @@ c.add_compare("""--hvm --pxe \
|
|||
--disk size=1 \
|
||||
--serial tcp,host=:2222,mode=bind,protocol=telnet \
|
||||
--filesystem /source,/target,mode=squash \
|
||||
--network user,mac=12:34:56:78:11:22 \
|
||||
--network user,mac=12:34:56:78:11:22,portgroup=foo \
|
||||
--network bridge=foobar,model=virtio,driver_name=qemu,driver_queues=3 \
|
||||
--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 \
|
||||
--channel spicevmc \
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
</interface>
|
||||
<interface type="direct">
|
||||
<mac address="00:11:22:33:44:55"/>
|
||||
<source dev="eth0.1" mode="bridge"/>
|
||||
<source dev="eth0.1" mode="bridge" portgroup="sales"/>
|
||||
<virtualport type="802.1Qbg">
|
||||
<parameters managerid="11" typeid="1193047" typeidversion="2" instanceid="09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f"/>
|
||||
</virtualport>
|
||||
|
|
|
@ -486,6 +486,7 @@ class XMLParseTest(unittest.TestCase):
|
|||
check("type", "direct")
|
||||
check("source", "eth0.1")
|
||||
check("source_mode", "vepa", "bridge")
|
||||
check("portgroup", None, "sales")
|
||||
check("driver_name", None, "vhost")
|
||||
check("driver_queues", None, 5)
|
||||
|
||||
|
|
|
@ -1758,6 +1758,7 @@ class ParserNetwork(VirtCLIParser):
|
|||
self.set_param("type", "type", setter_cb=set_type_cb)
|
||||
self.set_param("source", "source")
|
||||
self.set_param("source_mode", "source_mode")
|
||||
self.set_param("portgroup", "portgroup")
|
||||
self.set_param("target_dev", "target")
|
||||
self.set_param("model", "model")
|
||||
self.set_param("macaddr", "mac", setter_cb=set_mac_cb)
|
||||
|
|
|
@ -208,7 +208,7 @@ class VirtualNetworkInterface(VirtualDevice):
|
|||
##################
|
||||
|
||||
_XML_PROP_ORDER = [
|
||||
"_bridge", "_network", "_source_dev", "source_mode",
|
||||
"_bridge", "_network", "_source_dev", "source_mode", "portgroup",
|
||||
"macaddr", "target_dev", "model", "virtualport",
|
||||
"filterref"]
|
||||
|
||||
|
@ -226,6 +226,7 @@ class VirtualNetworkInterface(VirtualDevice):
|
|||
|
||||
source_mode = XMLProperty("./source/@mode",
|
||||
default_cb=_default_source_mode)
|
||||
portgroup = XMLProperty("./source/@portgroup")
|
||||
model = XMLProperty("./model/@type")
|
||||
target_dev = XMLProperty("./target/@dev")
|
||||
filterref = XMLProperty("./filterref/@filter")
|
||||
|
|
Loading…
Reference in New Issue