Netshot icon indicating copy to clipboard operation
Netshot copied to clipboard

Custom KV per device ?

Open kedare opened this issue 3 years ago • 2 comments

Hello.

I am looking for a way to store custom key/value per device (typically to store the "role" of the device or the configuration context from netbox associated to the device ( https://netbox.readthedocs.io/en/stable/models/extras/configcontext/ ) so I know which ntp/tacacs server this device should point to.

I was thinking to use diagnostics to do that (so the diagnostics would basically be a python/js script that will pull the values from netbox), is there a better alternative at doing this ? (a way to push those values from API calls?)

Thanks

kedare avatar May 04 '21 12:05 kedare

Indeed diagnostics are the only option at the moment.

SCadilhac avatar May 09 '21 20:05 SCadilhac

However it looks like the python scripts cannot do external requests thru http.client for example, I am getting this error ImportError: Cannot run any C extensions because native access is not allowed..

Can it be done with JS ? What would be the way to do it ?

Maybe it would be interesting to expose some http helpers to run http(s) requests ?

Thanks

kedare avatar May 10 '21 11:05 kedare