Open DFritzsche opened 4 years ago
Yep, I'll update the docs asap.
ipr.vlan_filter("add",
index=ipr.link_lookup(ifname='bridge1'),
vlan_info={'vid': 500},
vlan_flags='self')
Same for master
, just use the word master
instead of self
, more details:
https://github.com/svinota/pyroute2/blob/0aacc7a26874c3ccba30d6e3a4d497b167573ffd/pyroute2/netlink/rtnl/ifinfmsg/__init__.py#L897-L905
Good morning,
I want to use pyroute2 to add a VLAN to a bridge. In iproute2 I would run the following command:
bridge vlan add vid 500 dev bridge1 self
I could find the documentation on how to set vlan_filter on ports, but I have no idea on how to set the keyword "self" (or "master").
That is the example I found in https://github.com/svinota/pyroute2/blob/master/pyroute2/iproute/linux.py#L688
I also saw that the bridge flags self/master exist here: https://github.com/svinota/pyroute2/blob/master/pyroute2/netlink/rtnl/ifinfmsg/__init__.py#L126
Could you please provide an example.
Thank you very much Daniel