Hello, I'm trying to use the xml-rpc interface in 2.4.3. And very unsuccesfull :(
when i test example: >>> from xmlrpclib import ServerProxy >>> url = 'http://admin:zen...@myhost:8080/zport/dmd/DeviceLoader' >>> serv = ServerProxy(url) >>> dev = {'deviceName':'NEWDEVICE', 'devicePath':'/Server/Linux'} >>> serv.loadDevice(dev) code to add a device using this interface the event.log say this: ------ 2009-09-04T15:48:39 ERROR zen.DeviceLoader load of device {'deviceName': 'NEWDEV ICE', 'devicePath': '/Server/Linux'} failed Traceback (most recent call last): File "/home/zenoss/Products/ZenModel/ZDeviceLoader.py", line 327, in loadDevic e priority=priority File "/home/zenoss/Products/ZenModel/ZDeviceLoader.py", line 103, in load_devi ce deviceName = deviceName.replace(' ', '') AttributeError: 'dict' object has no attribute 'replace' ------ 2009-09-04T15:48:39 ERROR zen.DeviceLoader Unable to add the device {'deviceName ': 'NEWDEVICE', 'devicePath': '/Server/Linux'} and obviosly the device it's not added... if i add 'priority' (priority doesn't appear on xml attributes... using values like '3' or 3 or 'Normal' the error looks If i try on 2.3.3 the same error apear :( any idea?? please!! :D -------------------- m2f -------------------- Read this topic online here: http://forums.zenoss.com/viewtopic.php?p=38957#38957 -------------------- m2f -------------------- _______________________________________________ zenoss-users mailing list [email protected] http://lists.zenoss.org/mailman/listinfo/zenoss-users
