To export a list of all devices/modules within a network containing the product ID and serial number got an option to leverage the reports available within Prime Infrastructure. However sometimes it is easier to just go through the API and extract the relevant information.
Below you will find a short example doing exactly this. It will create a CSV containing device name, IP, product id, serial number of your inventory.
- python 2
- requests, jsonpath, logging (pip2 install requests jsonpath logging)
Tested with Prime 3.1.4
python GenericReportRunner.py -u root -p password mypiserverip
Result will be a deviceInventory<timestamp>.csv file in the subfolder 'reports' with following content
123123,"Switches and Hubs","lab6880-core","10.10.10.1","C6800IA-48FPD","FOC1234567"
Please sign in to leave a comment.