5. Exporting a Device List

Go to the ZMI

http://localhost:8080/zport/dmd/Devices/manage

Make a script object called for instance getMyDeviceList. Then put the following into the body of the script...

return [ d.id for d in context.getSubDevices() ]

Then call it like this

http://localhost:8080/zport/dmd/Devices/getMyDeviceList

You can do all kinds of stuff this way. This will return all device ips...

return [ d.manageIp for d in context.getSubDevices() ]

You get the idea. You can call this method form different parts of the tree to limit the list of devices...

http://localhost:8080/zport/dmd/Devices/Server/Linux/getMyDeviceList