[Zenoss-dev] Calling manage_addOSProcess via XML-RPC

cck197 cck197 at cck197.net
Fri Mar 28 19:51:37 EDT 2008


I'm trying to add OS processes to devices programmatically via XML-RPC:


Code:

In [102]: s = ServerProxy('http://admin:zenoss@localhost:8080/zport/dmd/Devices/Server/Linux/devices/sotong')

In [103]: s.getId()
Out[103]: 'sotong'

In [104]: s.manage_addOSProcess('/Tiger/AllOrd')
---------------------------------------------------------------------------
<class 'xmlrpclib.Fault'>                 Traceback (most recent call last)

/export/home/chris/src/python.git/zenoss/LogCheckerZenPack/<ipython console> in <module>()

/export/home/chris/src/python.git/zenoss/LogCheckerZenPack/xmlrpclib.py in __call__(self, *args)
   1145         return _Method(self.__send, "%s.%s" % (self.__name, name))
   1146     def __call__(self, *args):
-> 1147         return self.__send(self.__name, args)
   1148 
   1149 ##

/export/home/chris/src/python.git/zenoss/LogCheckerZenPack/xmlrpclib.py in __request(self, methodname, params)
   1435             self.__handler,
   1436             request,
-> 1437             verbose=self.__verbose
   1438             )
   1439 

/export/home/chris/src/python.git/zenoss/LogCheckerZenPack/xmlrpclib.py in request(self, host, handler, request_body, verbose)
   1199             sock = None
   1200 
-> 1201         return self._parse_response(h.getfile(), sock)
   1202 
   1203     ##

/export/home/chris/src/python.git/zenoss/LogCheckerZenPack/xmlrpclib.py in _parse_response(self, file, sock)
   1338         p.close()
   1339 
-> 1340         return u.close()
   1341 
   1342 ##

/export/home/chris/src/python.git/zenoss/LogCheckerZenPack/xmlrpclib.py in close(self)
    785             raise ResponseError()
    786         if self._type == "fault":
--> 787             raise Fault(**self._stack[0])
    788         return tuple(self._stack)
    789 

<class 'xmlrpclib.Fault'>: <Fault -1: 'Unexpected Zope exception: zExceptions.NotFound -  \n \n\n \n \n \n\n \n   Site Error \n   An error was encountered while publishing this resource.\n   \n    Resource not found  \n\n  Sorry, the requested resource does not exist. Check the URL and try again.   Resource:  http://localhost:8080/zport/dmd/Devices/Server/Linux/devices/sotong/manage_addOSProcess \n   \n\n   Troubleshooting Suggestions \n\n   \n   The URL may be incorrect. \n   The parameters passed to this resource may be incorrect. \n   A resource that this resource relies on may be\n      encountering an error. \n   \n\n   For more detailed information about the error, please\n  refer to error log.\n   \n\n   If the error persists please contact the site maintainer.\n  Thank you for your patience.\n   \n  \n '>




Does anyone know what URI to use to call manage_addOSProcess?




-------------------- m2f --------------------

Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=17886#17886

-------------------- m2f --------------------





More information about the zenoss-dev mailing list