Port catall.py to core

Change-Id: I92e6a4adf5276c55624fa14239c79ac4d5a282e8
Merge "Port catall.py to core"