Update for e2e test (not fully ready, and need to mock ip.py).