You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I faced with a limitation in current plugin endpoint name resolution approach for dash-separated plugin names.
Plugin namespaces under /api/plugins/ do technically allow dash-separated base urls.
For example, /api/plugins/some-dash-separated/endpoints/ is valid and working option in NetBox.
However, Python does not support dash-separated method names by design.
Current workaround is to pass such plugin name to __getattr__:
Calling dunder methods directly might be not that pythonic though.
Would adding some optional name getter function in PluginsApp (and probably to App) be a better solution? Something like:
Hello. First of all, thank you for a useful tool.
I faced with a limitation in current plugin endpoint name resolution approach for dash-separated plugin names.
Plugin namespaces under
/api/plugins/
do technically allow dash-separated base urls.For example,
/api/plugins/some-dash-separated/endpoints/
is valid and working option in NetBox.However, Python does not support dash-separated method names by design.
Current workaround is to pass such plugin name to
__getattr__
:Calling dunder methods directly might be not that pythonic though.
Would adding some optional name getter function in PluginsApp (and probably to App) be a better solution? Something like:
So that is could be used as:
The text was updated successfully, but these errors were encountered: