How to access plugin data in a config template #20734
-
|
Hi, Best Regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
open a nbshell in a terminal do a That will output which netbox objects are available to query. For me (having the config diff plugin installed) I get a section with the netbox config diff plugin objects like so:
you can test your query in nbshell first (which I recommend). You can do something like:
|
Beta Was this translation helpful? Give feedback.
open a nbshell in a terminal do a
lsmodelsThat will output which netbox objects are available to query.
For me (having the config diff plugin installed) I get a section with the netbox config diff plugin objects like so:
NetBox Config Diff Plugin: netbox_config_diff.ConfigCompliance netbox_config_diff.ConfigurationRequest netbox_config_diff.PlatformSetting netbox_config_diff.Substituteyou can test your query in nbshell first (which I recommend).
You can do something like:
netbox_config_diff.ConfigCompliance.objects.all()to get all objectsnetbox_config_diff.ConfigCompliance.objects.get(id=<something>)ornetbox_config_diff.ConfigCompliance.objects.filter(<some expression>)to filter f…