def do_analysis(args, dockerconf):
    work_dir = os.getcwd()
    with open(args.sample_config) as in_handle:
        sample_config, dmounts = mounts.update_config(yaml.load(in_handle), args.fcdir)
    dmounts += mounts.prepare_system(args.datadir, dockerconf["biodata_dir"])
    dmounts.append("%s:%s" % (work_dir, dockerconf["work_dir"]))
    system_config, system_mounts = _read_system_config(dockerconf, args.systemconfig, args.datadir)
    system_cfile = os.path.join(work_dir, "bcbio_system-forvm.yaml")
    sample_cfile = os.path.join(work_dir, "bcbio_sample-forvm.yaml")
    with open(system_cfile, "w") as out_handle:
        yaml.dump(system_config, out_handle, default_flow_style=False, allow_unicode=False)
    with open(sample_cfile, "w") as out_handle:
        yaml.dump(sample_config, out_handle, default_flow_style=False, allow_unicode=False)
    in_files = [os.path.join(dockerconf["work_dir"], os.path.basename(x)) for x in [system_cfile, sample_cfile]]
    log.setup_local_logging({"include_time": False})
    manage.run_bcbio_cmd(args.image, dmounts + system_mounts,
                         in_files + ["--numcores", str(args.numcores), "--workdir=%s" % dockerconf["work_dir"]])
Verify context (ie token) is passed to swift on upload.
dataset/ETHPy150Open chapmanb/bcbio-nextgen-vm/bcbiovm/docker/run.py/do_analysis--crossover with--dataset/ETHPy150Open openstack/glance_store/glance_store/tests/unit/test_swift_store.py/TestMultiTenantStoreContext.test_upload_context