ZenDMD TIP - List Decomissioned devices

From Zenoss Wiki
This is the approved revision of this page, as well as being the most recent.
Jump to: navigation, search

If you want to get a simple dump of decomissioned devices it's quite easy to get with zendmd. I have defined not device category, it would be just as simple as change dmd.Devices.getSubDevices for dmd.Devices.Network.getSubDevices or similar

for d in dmd.Devices.getSubDevices():
  if d.getProdState() == "Decommissioned":
    print "Device " + str(d.titleOrId()) + " " + d.id + " is decomissioned"