Making tables dump methods more generic

Signed-off-by: Ilya Nelkenbaum <ilyan@mellanox.com>