Python script to pull Device ID and IP.

From SysAdminWiki

Jump to: navigation, search
  • 1. Open up the zope management interface.
 http://domain/ip:8080/zport/dmd/Devices/manage
  • 2. So make sure you are at the top of the tree by clicking 'Devices'. On the right hand side of the page there is a drop down menu. Click that and Select 'Script -> Phython'.
  • 3. Give it an ID of getMyDeviceList. Leave the File: emtpy and click add and edit.
  • 4. Delete all the example code.
  • 5. Add the following and then save:
 return [ d.id+ " - " +d.manageIp for d in context.getSubDevices() ]
  • 6. Now launch the script by pointing your browser at it.
 http://domain/ip:8080/zport/dmd/Devices/getMyDeviceList
Advertisement