'How to kickstart autotest when you have no control file?
You download the beaker XML, convert it to a control file
and pass it back to autotest. Much like bootstrapping.. :-)'

def bootstrap(self, fetchdir):

    if self.cmd:
        self.parse_quickcmd(self.cmd)
        return None
    recipe = self.init_recipe_from_beaker()
    if os.path.isfile(self.state_file):
        os.remove(self.state_file)
        self.tests = {}
    if (self.recipe_id != recipe.id):
        raise error.HarnessError(('Recipe    mismatch:    machine    %s..    !=    XML    %s..' % (self.recipe_id, recipe.id)))
    control_file_name = (((recipe.job_id + '_') + recipe.id) + '.control')
    control_file_path = ((fetchdir + '/') + control_file_name)
    logging.debug(('setting    up    control    file    -    %s' % control_file_path))
    control_file = open(control_file_path, 'w')
    try:
        for task in recipe.tasks:
            self.convert_task_to_control(fetchdir, control_file, task)
            self.write_processed_tests(self.get_test_name(task), task.id)
        control_file.close()
    except HarnessException:
        return None
    except Exception as ex:
        os.remove(control_file_path)
        raise error.HarnessError(('beaker_harness:    convert    failed    with    ->    %s' % ex))
    return control_file_path
