

def run(self):
    self.host = self.plugin.get_param('Host', 'localhost')
    self.port = self.plugin.get_param('Port', 27017)
    self.validate_collections = self.plugin.get_param('ValidateCollections')
    self.empty_collections = self.plugin.get_param('EmptyCollections')
    self.replicaset = self.plugin.get_param('ReplicaSet', 'test')
    checks = [{
        'Connection': self.check_connection,
    }, {
        'Members': self.check_members,
    }, {
        'Collections': self.check_collections,
    }, {
        'Record': self.check_record,
    }]
    for item in self:
        for (check, check_function) in item.iteritems():
            try:
                res = check_function()
                self.result.add_component(check, res['state'], **res['messages'])
            except Exception as e:
                self.result.add_component(check, 'ERROR', error=[str(e)])
                lg.exception(e)
    self.result.set_status()
    return self.result

dataset/ETHPy150Open gooddata/smoker/smoker/server/plugins/mongo.py Plugin.run/VarMisuse@132/175 `checks`->`self`