| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
./python/netlink/route/links/bridge.py:29:31: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
|
| |
|
|
|
|
|
| |
./python/netlink/core.py:424:9: E741 ambiguous variable name 'l'
./python/netlink/route/link.py:476:13: E741 ambiguous variable name 'l'
./python/netlink/route/tc.py:554:5: E741 ambiguous variable name 'l'
./python/netlink/route/tc.py:574:5: E741 ambiguous variable name 'l'
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Automated code formatting is great. Use python-black for that ([1]).
Black us not configurable much (uncompromising) and follows PEP8.
It thus generates quite a standard, pleasing format.
But the point isn't whether the formatting is always the most
subjectively pleasing. The point is that the style is generated and
enforceable by an automated tool. It takes away places for nit picking,
while resulting in a more consistent code base.
As this reformats the entire code base, it introduces a large diff and
interferes with tools like git-blame. That will be somewhat alleviated
by adding a "blame.ignoreRevsFile" for git in the next commit.
The change is done automatically, by running python-black version
black-22.8.0-2.fc38.noarch:
$ black .
The result is the same as
$ ( git grep -l '#!.*\(PYTHON\|python\)' ; git ls-files '*.py' '*.py.in' ) \
| sort -u \
| xargs -d '\n' black
Note that the exact result depends on the version of black. Currently
that version is black==22.12.0 from pip. Yes, this means when we bump
the version in the future, some reformatting will happen.
[1] https://github.com/psf/black
|
| |
|
|
| |
https://github.com/thom311/libnl/pull/327
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Add flags set/get methods aim to change bridge flags :
o hairpin_mode
o bpdu_guard
o root_block
o fast_leave
Signed-off-by: Nicolas PLANEL <nicolas.planel@enovance.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
| |
|
|
|
|
|
| |
Implements basic bridge interface support using netlink protocol
Signed-off-by: Nicolas PLANEL <nicolas.planel@enovance.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The varialble name should be link._rtnl_link
instead of link._link to get rid of the AttributeError.
Traceback (most recent call last):
File "examples/test.py", line 11, in <module>
eth0 = link.resolve('eth0.800')
...
File
"/home/ubuntu/libnl/python/build/lib.linux-x86_64-2.7/netlink/route/link.py",
line 151, in __init__
self._module_lookup('netlink.route.links.' + self.type)
...
File
"/home/ubuntu/libnl/python/build/lib.linux-x86_64-2.7/netlink/route/links/vlan.py",
line 70, in init
link.vlan = VLANLink(link._link)
AttributeError: 'Link' object has no attribute '_link'
Signed-off-by: Nicolas PLANEL <nicolas.planel@enovance.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
|
| | |
|
| |
|
|
|
|
| |
This patch add support for kernel macvlan interfaces.
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this change you can still set do modifications of
Links and then to change to pass the changes to the
kernel. But it additionally enables you to interact
with this part of libnl-python in a more pythonic
way. Instead of:
eth0 = links['eth0']
eth0.mtu = 5000
eth0.change()
you can do:
with links['eth0'] as eth0:
eth0.mtu = 5000
|
| |
|
|
| |
So, remove from python binding. Should not break compatibility.
|
| | |
|
| | |
|
| |
|
|
| |
No real logick change
|
| | |
|
| |
|
|
| |
Nothing algorithmic changed really, just cosmetics
|
| |
|
|
| |
Now, python files use pseudo-tab equal 4 spaces
|
| |
|
|
|
|
|
| |
1. Address, Link and Vlan classes affected with same bug
2. Flags property are not designed as set class. Setting to property will
not replace flags, just add flags to set. So, jist document that, and
fixed obvious logick.
|
| | |
|
| |
|
|
| |
Make git happy with that
|
| |
|
|
| |
Helps greatly when porting to Python 3
|
| |
|
|
| |
Fix typo in docstring
|
| |
|
|
|
| |
1. rtnl_addr_delete require three arguments
2. comment fixed (fixed copy-past from link.py)
|
| |
|
|
| |
& install
|
| | |
|
| | |
|
| |
|
|
| |
Changes too numerous to describe them
|
|
|
currently includes experimental support for links, addresses
and some traffic control
|