Package Products :: Package Zuul :: Package routers :: Module introspection :: Class IntrospectionRouter
[hide private]
[frames] | no frames]

Class IntrospectionRouter

source code

ZenUtils.Ext.DirectRouter --+
                            |
                           IntrospectionRouter

Provide a JSON API to explore the available routers and their methods.

from Products.Zuul.routers.introspection import IntrospectionRouter zz = IntrospectionRouter(dmd)

Instance Methods [hide private]
 
_getAllRouters(self) source code
 
getAllRouters(self)
Return a description of the Zenoss routers available.
source code
 
_getRouterInfo(self, router=None) source code
 
getRouterInfo(self, router=None)
Return information about the router
source code
 
_getRouterByName(self, router) source code
 
getRouterMethods(self, router=None)
Return a JSON list of methods, arguments and documentation
source code
Method Details [hide private]

getAllRouters(self)

source code 

Return a description of the Zenoss routers available.

from Products.Zuul.routers.introspection import IntrospectionRouter zz = IntrospectionRouter(dmd) pprint(zz.getAllRouters().data)

getRouterMethods(self, router=None)

source code 

Return a JSON list of methods, arguments and documentation

Example usage from zendmd:

from Products.Zuul.routers.introspection import IntrospectionRouter zz = IntrospectionRouter(dmd) pprint(zz.getRouterMethods('DeviceRouter').data)