dropbox / nsot

Network Source of Truth is an open source IPAM and network inventory database
https://nsot.readthedocs.io
Other
399 stars 66 forks source link

Cache device hostname on interface objects to improve lookups #191

Closed jathanism closed 7 years ago

jathanism commented 8 years ago

Currently when you lookup interfaces by device, you have to do another lookup to translate Interface.device_id to Device.hostname. This sucks.

We should add Device.hostname as a locally-cached field on Interface objects, so that this can be available for utility without always having to do an extra lookup for each Device just to get the hostname.