Initial work for host data reset

This commit is contained in:
emanuele-f 2019-01-08 12:43:00 +01:00
parent 28e87d93bc
commit 8cdf051d77
8 changed files with 89 additions and 40 deletions

View file

@ -113,10 +113,15 @@ end
-- ################################################################
local function _delete_host(interface_id, host_info)
local old_ifname = interface.getStats().name
interface.select(getInterfaceName(interface_id))
interface.resetHostData(hostinfo2hostkey(host_info))
local h_ts = delete_host_timeseries_data(interface_id, host_info)
local h_rk = delete_host_redis_keys(interface_id, host_info)
local h_db = delete_host_mysql_flows(interface_id, host_info)
interface.select(old_ifname)
return {delete_host_timeseries_data = h_ts, delete_host_redis_keys = h_rk, delete_host_mysql_flows = h_db}
end