Page MenuHomeVyOS Platform

Use pyroute2 instead of calling 'ip'
Closed, InvalidPublic

Description

It would be nice to use pyroute2 library instead of calling 'ip' directly.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible

Event Timeline

jjakob triaged this task as Wishlist priority.Apr 21 2020, 7:14 PM
jjakob created this task.
jjakob created this object in space S1 VyOS Public.

I agree but it will be quite some work ... I would happy to work on this as it would remove my of my issues with calling "cmd()" for network interface setting.

Nope. Before I‘ve invented vyos.ifconfig it was actually based on pyroute2. The problem with pyroute2 was that it lacked required functionality for VyOS which let me to developing our own lib.

Thus when now introducing pyroute2 again we will have pyroute2 calls and native calls. there is a Task about pyroute2 just search for it.

Fair enough. I have gone thought the bug tracker of pyroute2 and indeed it does not inspire confidence!

Should a iproute.py wrapper be considered to prevent having calls to "ip" everywhere in the code?
Therefore if at a later date a better solution comes along the calls to binary would not be everywhere in the code ?

jjakob closed this task as Invalid.EditedApr 27 2020, 12:10 PM
jjakob removed a project: VyOS 1.3 Equuleus.

That's unfortunate. I get that we need vyos.ifconfig to abstract interface management, but I thought pyroute2 could at least be used to replace all the calls to 'ip'. I guess that's not the case. I searched for pyroute2 and I see you already tried it, so I'm closing this.