Skip to content

Custom ifinfmsg plugin stopped working with version 0.6 #886

Closed
@MJDickensheets

Description

@MJDickensheets

We have been using a custom plugin module and adding it to the ifinfmsg handler via the following procedure:

from pyroute2.netlink.rtnl import ifinfmsg
ifinfmsg.ifinfbase.ifinfo.data_map.update(
    ifinfmsg.load_plugins_by_path(_plugins)
)

An interface with our custom type can then be added:

ipr = IPRoute()
ipr.link("add", kind="custom-kind", msgfield1="data")

As of version 0.6, the link("add") results in pr2modules.netlink.exceptions.NetlinkError: (22, 'Invalid argument'). Some investigation revealed that the ifinfmsg instance visible to the IPRoute object did not have its ifinfo.data_map updated as we would have expected.

As a side note, it would also be nice to have a proper API with which to load plugins, particularly dynamically and not just at import time.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions