Good number of places in code, we iterate over the actions dict which has
filename as keys and filter based on the action.
This patch introduced another mapping which has action as key. This will help in
refactoring the code much more in upcoming patch.