On Thu, Apr 16, 2020 at 09:58:51AM +0200, Jan Tluka wrote:
Thu, Apr 16, 2020 at 09:48:37AM CEST, jtluka(a)redhat.com wrote:
>
>So I looked at the pyroute2 code and the team driver is supported.
>The problem seems to be that IPRoute does not support passing the teamd
>config yet and the active-backup runner is used as default. Might be
>worth to check with pyroute maintainer.
>
I created a github issue for this:
https://github.com/svinota/pyroute2/issues/699
-Jan
Thanks, in the meantime I would just leave the TODO in there, eventually
I'd like to have the ability for the TeamDevice class _getters_ to
return the real value of the configuration of the device - in case a
different process changed something for example.
Currently the getters just return the values stored privately in the
class instance e.g.:
@property
def config(self):
return self._config
If something changes the config this will still return just the value
that was used to create the device.
When we're able to retrieve the updated config value I'd also like to be
able to access them directly not manually through a dict object, e.g.:
NO:
device_mode = team_device.config["mode"]
YES:
device_mode = team_device.mode
And maybe something similar with the setters as well:
team_device.mode = new_mode
I don't know if this fine grained control is easy/hard/impossible, but
that's kind of the larger point behind the TODO note here.
-Ondrej