def start():
    from wsgiref.simple_server import make_server

    # When started outside of salt-api __opts__ will not be injected
    if '__opts__' not in globals():
        globals()['__opts__'] = get_opts()

        if __virtual__() is False:
            raise SystemExit(1)

    mod_opts = __opts__.get(__virtualname__, {})

    # pylint: disable=C0103
    httpd = make_server('localhost', mod_opts['port'], application)

    try:
        httpd.serve_forever()
    except KeyboardInterrupt:
        raise SystemExit(0)
Translate arguments back into a standard bcbio_vm ipython submission command.
dataset/ETHPy150Open saltstack/salt/salt/netapi/rest_wsgi.py/start--crossover with--dataset/ETHPy150Open chapmanb/bcbio-nextgen-vm/bcbiovm/ipython/batchprep.py/_get_ipython_cmdline