def sandesh_alarm_cache_req_handle_request(self, sandesh_req):
     count = 0
     uve_global_map = self._sandesh._uve_type_maps.get_uve_global_map()
     if sandesh_req.table is not None:
         for type_key, type_map in uve_global_map.iteritems():
             if type_map.sandesh_type() is not SandeshType.ALARM:
                 continue
             if sandesh_req.name is not None:
                 count += type_map.send_uve(sandesh_req.table,
                             sandesh_req.name, sandesh_req.context(),
                             True, self._sandesh)
             else:
                 count += type_map.sync_uve(sandesh_req.table, 0,
                             sandesh_req.context(), True, self._sandesh)
     alarm_cache_res = SandeshAlarmCacheResponse(count)
     alarm_cache_res.response(sandesh_req.context(), sandesh=self._sandesh)
Example #2
0
 def sandesh_alarm_cache_req_handle_request(self, sandesh_req):
     count = 0
     uve_global_map = self._sandesh._uve_type_maps.get_uve_global_map()
     if sandesh_req.table is not None:
         for type_key, type_map in uve_global_map.iteritems():
             if type_map.sandesh_type() is not SandeshType.ALARM:
                 continue
             if sandesh_req.name is not None:
                 count += type_map.send_uve(sandesh_req.table,
                             sandesh_req.name, sandesh_req.context(),
                             True, self._sandesh)
             else:
                 count += type_map.sync_uve(sandesh_req.table, 0,
                             sandesh_req.context(), True, self._sandesh)
     alarm_cache_res = SandeshAlarmCacheResponse(count)
     alarm_cache_res.response(sandesh_req.context(), sandesh=self._sandesh)