can a model be shared across devices and VMs? #6736
-
I'm looking to create a contacts model (yes, I know it's in the roadmap) and share the same model across both devices and VMs. Would I be able to share this model, or would I have to duplicate it across dcim.* and virtualization.*? I plan on hijacking interfaces so I could have another tab with rows of items (contacts). Also, is there anyway to implement an autocomplete from a data source when filling out a form/template? For example, when I go to add a contact name, I could do a lookup against AD and autocomplete a name after X characters? Thx |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You should be able to create a model for contacts and just setup foreignkey relationships to any other model you so chose. Sort of like how sites can be related to many objects or tags. With regards to autocomplete, you would likely need to build that into your plugin by either pulling populated users if all AD users are synched to netbox via django ldap or if you want to query directly to AD you would need some other means. |
Beta Was this translation helpful? Give feedback.
You should be able to create a model for contacts and just setup foreignkey relationships to any other model you so chose. Sort of like how sites can be related to many objects or tags.
With regards to autocomplete, you would likely need to build that into your plugin by either pulling populated users if all AD users are synched to netbox via django ldap or if you want to query directly to AD you would need some other means.