Peter Saveliev
Peter Saveliev
Added type conversion to bool, so an empty `nlmsg` may be used in `if` statements.
So far overloading of `__getattribute__()` gives us ~20% performance drop according to benchmarks on NDB/IPDB. I can not say I like that. Though some things may be ported back to...
A slightly different approach, see the branch `nla_access_621_1`. In order to support list indexing on retrieved NLAs, I had to require an explicit list vs. value referencing, so `nlmsg.SOME_NLA_NAME` **always**...
Yep, that's a leftover of a debug code :) Fixed, pushed.
Nope, it's too strict logic that forces `__getattribute__()` to use only defined set of NLA names. Which set is empty for fake nla objects returned for non-existing NLA. Let me...
```python from pyroute2 import IPRoute with IPRoute() as ipr: for link in ipr.get_links(): print(link .IFLA_IFNAME .value, link .IFLA_LINKINFO .IFLA_INFO_KIND .value) ``` ``` $ python3 t1.py lo None ip6tnl0 ip6tnl eth0...
Personally I find those `.value` references completely unaesthetic, but I see no other way to use NLAs as lists to get sibling NLAs. Getting `int` or `str` instead of `nlmsg`...
Let me trace, how expensive it will be. But the idea is good.
For now merged to the master. Let's see if there will be any negative feedback about the performance.