Developer's Guide

  • Docs Home
  • Community Home

5. Exporting a Device List

To export a device list:

  1. Go to the ZMI:

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

  2. Make a script object called getMyDeviceList().

  3. Put the following line into the body of the script:

    return [ d.id for d in context.getSubDevices() ]
  4. Call it like this:

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

Alternatively, enter the following line to return all device IP addresses:

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

You can call this method from different parts of the tree to limit the list of devices:

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