Make user_setup a top-level function in iplib and add better tests....
Make user_setup a top-level function in iplib and add better tests.
This function has grown way too big and it needs a refactoring, but at least
now it's a standalone thing (it didn't need to be a method) and can be
called in a non-interactive fashion.