rewrite createExternalNetwork.py