How about this as an idea.
* When you click "Add address to interface" (on either a Device or VM) you get the same page as now.
* When you click Add, then the system searches for any existing address(es) with the same Address and VRF. If none are found, it just creates a new one as now, linked to this interface.
* However, if one or more matching addresses *are* found, then it gives a new page listing the matches in a table, and offering the option to:
- click on one of the existing addresses to link it to the this interface [^1]
- create a new address anyway (this is only offered if the VRF allows duplicate addresses)
Would that work? It means you use the existing flows to search for a Device or VM.
It is also helpful for the use case where you have pre-imported your IPAM allocations from a legacy spreadsheet, and then are creating new Device and VM objects to attach them to.
Cheers,
Brian.
[^1] If the address is already linked to another interface this should be indicated in the results table, but you can still take it over.