I have a group of devices (about 20) that are all the same model and
manufacturer. I am still fighting with creating a custom modeler (which may be
the best way to fix this) and instead trying to assign the manufacturer and
product to each device through zendmd. My attempts are looking something like
this:
Code:
for d in dmd.Devices.getSubDevices():
if d.Devices.snmpSysName.find("3400") >= 0:
d.setHWProduct("HP")
Usually ZDeviceLoader.py is my guiding light into zendmd but I can't see that
it is able to assign a device:
Code:
def setHWProduct(self, newHWProductName, hwManufacturer, REQUEST=None):
"""set the productName of this device"""
if not hwManufacturer and REQUEST:
REQUEST['message'] = 'Please select a HW Manufacturer'
return self.callZenScreen(REQUEST)
self.getDmdRoot("Manufacturers").createHardwareProduct(
newHWProductName, hwManufacturer)
if REQUEST:
REQUEST['hwProductName'] = newHWProductName
return self.callZenScreen(REQUEST)
It looks like it just creates the hwProductName and I can't see where an
assignment is made. I also struck out with Device.py seeing that setHWProduct
is deprecated. I added a /manage after the page url to see if I could find the
attirbute but it looks like javascript is responsible for products. I just
can't seem to put my finger on how to programatically set manufacturer and
product information.
Any ideas?
-------------------- m2f --------------------
Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=20619#20619
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users