Inventory of network devices and rack