Skip to content

Accessing SysrepoSession info from callback #23

Closed
@nicolasmorini

Description

@nicolasmorini

Hi @rjarry!

To be able to implement some niche use cases, I found myself in the need to have access to the SysrepoSession in some of my callbacks (be it a module_change_callback, an oper_data_callback or an rpc_callback). More precisely, I would need access to the username that triggered the callback (and maybe the session ID).

I do not see a clean way to modify sysrepo-python do this without changing the signature of the callbacks, which would essentially make the change not backwards-compatible.

Did you ever have a similar need? If so, do you have any suggestions or hints on how to go about this?

If indeed there is no backwards-compatible way of making it happen in the current version of the project, would you consider this when updating the project to sysrepo v2.x? (assuming that such a change would also be not backwards-compatible).

Best regards,
Nicolas

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions