sol1 / icingaweb2-module-netbox

Netbox importer for director, and integration with netbox
28 stars 6 forks source link

servicedb out of Netbox library #1

Closed ollytom closed 4 years ago

ollytom commented 4 years ago

separation of concerns. Consumers of the library can build up a cache of services and use that as they like. The library doesn't really need to hold state like this.

In this repo that means building a cache by calling $netbox->allservices(), then assigning to devices returned by $netbox->devices(0). We use a cache because getting all services for all devices is a lot of API calls which is slow.