<div dir="ltr"><div><div>Nice ! <br></div>I also noticed something that seems a bit odd, when launching a VM with the example I gave you, the Virtual Network Interface in the details of the virtual hardware will switch back to "Specify shared device name" mode with bridge name set to br1 instead of staying in the bridge network mode. Any thought of why this is occuring ?<br><br></div>- Charles<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 24, 2017 at 9:43 PM, Cole Robinson <span dir="ltr"><<a href="mailto:crobinso@redhat.com" target="_blank">crobinso@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks, I tweaked the string comparison in your patch a bit, extended the test<br>
suite a bit, and pushed.<br>
<br>
- Cole<br>
<span class=""><br>
On 03/23/2017 11:19 AM, Charles d'Hondt wrote:<br>
> Here you go, a basic <network> config<br>
><br>
> <network><br>
>   <name>ovsbr1</name><br>
>   <uuid>f6efa396-949f-41cd-8e26-<wbr>ca5f60c150d1</uuid><br>
>   <forward mode='bridge'/><br>
>   <bridge name='br1'/><br>
>   <virtualport type='openvswitch'/><br>
> </network><br>
><br>
><br>
> On Thu, Mar 23, 2017 at 4:12 PM, Cole Robinson <<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a><br>
</span><span class="">> <mailto:<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a>>> wrote:<br>
><br>
>     On 03/23/2017 11:06 AM, Charles d'Hondt wrote:<br>
>     > Small patch to allow VMM to detect OpenVSwitch<br>
>     ><br>
</span>>     > Signed-off-by: Charles d'Hondt <<a href="mailto:charles.dhondt@gmail.com">charles.dhondt@gmail.com</a> <mailto:<a href="mailto:charles.dhondt@gmail.com">charles.dhondt@gmail.<wbr>com</a>>><br>
<div class="HOEnZb"><div class="h5">>     > ---<br>
>     >  virtManager/netlist.py | 6 +++++-<br>
>     >  virtinst/network.py    | 4 +++-<br>
>     >  2 files changed, 8 insertions(+), 2 deletions(-)<br>
>     ><br>
><br>
>     Can you provide an example openvswitch <network> config? So I can test locally<br>
>     with tests/testdriver.xml<br>
><br>
>     Thanks,<br>
>     Cole<br>
><br>
>     > diff --git a/virtManager/netlist.py b/virtManager/netlist.py<br>
>     > index bdadbf3..aae87b4 100644<br>
>     > --- a/virtManager/netlist.py<br>
>     > +++ b/virtManager/netlist.py<br>
>     > @@ -146,6 +146,9 @@ class vmmNetworkList(vmmGObjectUI):<br>
>     >              if not net.is_active():<br>
>     >                  label += " (%s)" % _("Inactive")<br>
>     ><br>
>     > +            if net.get_xmlobj().virtualport_<wbr>type == "openvswitch":<br>
>     > +                label += " (%s)" % "OpenVSwitch"<br>
>     > +<br>
>     >              if net.get_name() == "default":<br>
>     >                  default_label = label<br>
>     ><br>
>     > @@ -526,8 +529,9 @@ class vmmNetworkList(vmmGObjectUI):<br>
>     >          if not row:<br>
>     >              return<br>
>     ><br>
>     > +        is_openvswitch = (row[2][-12:-1] == "OpenVSwitch")<br>
>     >          is_direct = (row[0] ==<br>
>     virtinst.<wbr>VirtualNetworkInterface.TYPE_<wbr>DIRECT)<br>
>     > -        self.widget("vport-expander").<wbr>set_visible(is_direct)<br>
>     > +        self.widget("vport-expander").<wbr>set_visible(is_direct or<br>
>     is_openvswitch)<br>
>     >          uiutil.set_grid_row_visible(<wbr>self.widget("net-source-mode")<wbr>,<br>
>     is_direct)<br>
>     >          uiutil.set_grid_row_visible(<br>
>     >              self.widget("net-macvtap-warn-<wbr>box"), is_direct)<br>
>     > diff --git a/virtinst/network.py b/virtinst/network.py<br>
>     > index 80c03d4..28d257b 100644<br>
>     > --- a/virtinst/network.py<br>
>     > +++ b/virtinst/network.py<br>
>     > @@ -212,7 +212,7 @@ class Network(XMLBuilder):<br>
>     >      ##################<br>
>     ><br>
>     >      _XML_ROOT_NAME = "network"<br>
>     > -    _XML_PROP_ORDER = ["ipv6", "name", "uuid", "forward",<br>
>     > +    _XML_PROP_ORDER = ["ipv6", "name", "uuid", "forward",<br>
>     "virtualport_type"<br>
>     >                         "bridge", "stp", "delay", "domain_name",<br>
>     >                         "macaddr", "ips", "routes", "bandwidth"]<br>
>     ><br>
>     > @@ -222,6 +222,8 @@ class Network(XMLBuilder):<br>
>     >                         validate_cb=lambda s, v: util.validate_uuid(v),<br>
>     >                         default_cb=_get_default_uuid)<br>
>     ><br>
>     > +    virtualport_type = XMLProperty("./virtualport/@<wbr>type")<br>
>     > +<br>
>     >      # Not entirely correct, there can be multiple routes<br>
>     >      forward = XMLChildProperty(_<wbr>NetworkForward, is_single=True)<br>
>     ><br>
>     ><br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>