def collect(self, device, log):
     results = {}
     cl = SQLClient(device)
     try: results.update(cl.query(self.prepareQueries(device)))
     except Exception, ex: pass #log.error("Error: %s", ex)
     cl.close()
     cl = None
     return results
Exemplo n.º 2
0
    def _collectData(self):
        """
        Callback called after a connect or previous collection so that another
        collection can take place.
        """
        log.debug("Polling for SQL data from %s [%s]", 
                  self._devId, self._manageIp)

        self.state = ZenPerfSqlTask.STATE_SQLC_QUERY
        sqlc = SQLClient(self._taskConfig)
        d = sqlc.sortedQuery(self._queries)
        d.addCallbacks(self._collectSuccessful, self._failure)
        return d
Exemplo n.º 3
0
    def _collectData(self):
        """
        Callback called after a connect or previous collection so that another
        collection can take place.
        """
        log.debug("Polling for SQL data from %s [%s]", 
                  self._devId, self._manageIp)

        self.state = ZenPerfSqlTask.STATE_SQLC_QUERY
        sqlc = SQLClient(self._taskConfig)
        d = sqlc.sortedQuery(self._queries)
        d.addCallbacks(self._collectSuccessful, self._failure)
        return d
Exemplo n.º 4
0
 def collect(self, device, log):
     return SQLClient(device).query(self.queries(device))