Tue, May 16, 2017 at 10:17:19AM CEST, olichtne(a)redhat.com wrote:
[...]
> >> >+
> >> >+ def create(self):
> >> >+ exec_cmd("ovs-vsctl add-br %s" % self.name)
> >> >+
> >> >+ def destroy(self):
> >> >+ exec_cmd("ovs-vsctl del-br %s" % self.name)
> >> >+
> >> >+ def port_add(self, dev, **kwargs):
> >>
> >> "slave_add"?
> >>
> >
> >OvS is weird and doesn't work the same as any other device, because of
> >that the entire class kind of works on it's own as just a proxy to the
> >openvswitch utilities.
> >
> >The port_{add, del} name because I wanted to keep name consistency with
> >those utilities.
>
> Hmm, I think that we should have an alias then. User should be able to
> work with all master devices the same way.
>
Well... I actually think OvSBridgeDevice shouldn't be a MasterDevice...
the problem with ovs is that if you port_add an Ethernet device. Then
the master of that device is not the OvSBridge... it's a dummy
ovs_system net_device that is exported by the ovs module AFAIK... this
is the case for all ports for all ovs bridges (they share the same
master). So the common 'slaves' getter won't work for them either.
Yes.. this does mean that I'm missing getters in this class... Will add
those where appropriate.
Adding a slave_{add, del} alias is fine with me, though I don't really
care because as I've explained, I view OvS as weird and completely
separate from everything else and am expecting that it will require
workarounds and other code exceptions....
Ok