Here you go, a basic <network> config
<network>
<name>ovsbr1</name>
<uuid>f6efa396-949f-41cd-8e26-ca5f60c150d1</uuid>
<forward mode='bridge'/>
<bridge name='br1'/>
<virtualport type='openvswitch'/>
</network>
<network>
<name>ovsbr1</name>
<uuid>f6efa396-949f-41cd-8e26-ca5f60c150d1</uuid>
<forward mode='bridge'/>
<bridge name='br1'/>
<virtualport type='openvswitch'/>
</network>
On Thu, Mar 23, 2017 at 4:12 PM, Cole Robinson <crobinso@xxxxxxxxxx> wrote:
On 03/23/2017 11:06 AM, Charles d'Hondt wrote:
> Small patch to allow VMM to detect OpenVSwitch
>
> Signed-off-by: Charles d'Hondt <charles.dhondt@xxxxxxxxx>
> ---
> virtManager/netlist.py | 6 +++++-
> virtinst/network.py | 4 +++-
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
Can you provide an example openvswitch <network> config? So I can test locally
with tests/testdriver.xml
Thanks,
Cole
> diff --git a/virtManager/netlist.py b/virtManager/netlist.py
> index bdadbf3..aae87b4 100644
> --- a/virtManager/netlist.py
> +++ b/virtManager/netlist.py
> @@ -146,6 +146,9 @@ class vmmNetworkList(vmmGObjectUI):
> if not net.is_active():
> label += " (%s)" % _("Inactive")
>
> + if net.get_xmlobj().virtualport_type == "openvswitch":
> + label += " (%s)" % "OpenVSwitch"
> +
> if net.get_name() == "default":
> default_label = label
>
> @@ -526,8 +529,9 @@ class vmmNetworkList(vmmGObjectUI):
> if not row:
> return
>
> + is_openvswitch = (row[2][-12:-1] == "OpenVSwitch")
> is_direct = (row[0] == virtinst.VirtualNetworkInterface.TYPE_ DIRECT)
> - self.widget("vport-expander").set_visible(is_direct)
> + self.widget("vport-expander").set_visible(is_direct or is_openvswitch)
> uiutil.set_grid_row_visible(self.widget("net-source-mode") , is_direct)
> uiutil.set_grid_row_visible(
> self.widget("net-macvtap-warn-box"), is_direct)
> diff --git a/virtinst/network.py b/virtinst/network.py
> index 80c03d4..28d257b 100644
> --- a/virtinst/network.py
> +++ b/virtinst/network.py
> @@ -212,7 +212,7 @@ class Network(XMLBuilder):
> ##################
>
> _XML_ROOT_NAME = "network"
> - _XML_PROP_ORDER = ["ipv6", "name", "uuid", "forward",
> + _XML_PROP_ORDER = ["ipv6", "name", "uuid", "forward", "virtualport_type"
> "bridge", "stp", "delay", "domain_name",
> "macaddr", "ips", "routes", "bandwidth"]
>
> @@ -222,6 +222,8 @@ class Network(XMLBuilder):
> validate_cb=lambda s, v: util.validate_uuid(v),
> default_cb=_get_default_uuid)
>
> + virtualport_type = XMLProperty("./virtualport/@type")
> +
> # Not entirely correct, there can be multiple routes
> forward = XMLChildProperty(_NetworkForward, is_single=True)
>
>
_______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list