Package Products :: Package Zuul :: Package routers :: Module modelQuery :: Class ModelQueryRouter
[hide private]
[frames] | no frames]

Class ModelQueryRouter

source code

ZenUtils.Ext.DirectRouter --+    
                            |    
                   TreeRouter --+
                                |
                               ModelQueryRouter

A JSON/ExtDirect interface to retrieve model data from Solr

Instance Methods [hide private]
 
__init__(self, context, request) source code
 
_getFacade(self)
Abstract method for child classes to use to get their facade
source code
 
getDevices(self, limit=200, params=None, fields=None)
Retrieves a list of devices.
source code
 
getIndexes(self)
Return list of dicts where each dict represents list of indexes for a particular object
source code

Inherited from TreeRouter: addNode, asyncGetTree, deleteNode, gunzip_b64, gzip_b64, moveOrganizer, objectExists

Inherited from TreeRouter (private): _canDeleteUid

Method Details [hide private]

_getFacade(self)

source code 

Abstract method for child classes to use to get their facade

Overrides: TreeRouter._getFacade
(inherited documentation)

getDevices(self, limit=200, params=None, fields=None)

source code 

Retrieves a list of devices.
@type  limit: integer
@param limit: (optional) Number of items to return

@type  params: dictionary
@param params: (optional) Key-value pair of filters for this search
                e.g. params={'name': 'localhost'}
               
@type  fields: list of strings
@param fields: (optional) list of indexed fields to retrieve, if None 
then attempts to retrive values for all indexes we have in SOLR.
                e.g. fields=["name", "osModel", "productionState"]