Пример #1
0
def _run_seed_users_cmd(arg_map):
    """
    translates arguments from commandline to calls to python methods. Input is
    the output from argparse.parse_args(), output is an exit code indicating if
    the job succeeded.
    """
    project_root_dir = arg_map['project_root_dir']
    project_env_name = arg_map['project']
    project_env = ProjectEnv.from_string(project_env_name)
    runlevel_name = arg_map['runlevel']
    runlevel = RunLevel.from_string(runlevel_name)
    #target_site_name = arg_map['site']
    #target_site = NestSite.from_string(target_site_name)
    exit_code = _run_seed_users_script(project_env, runlevel)
    return exit_code
Пример #2
0
def _run_compile_cmd(arg_map):
    """
    translates arguments from commandline to calls
    to python methods. Input is the output from
    argparse.parse_args(), output is an exit code
    indicating if the compilation succeeded. 
    """
    code_type = arg_map['code_type']
    project_root_dir = arg_map['project_root_dir']
    project_env_name = arg_map['project']
    runlevel_name = arg_map['runlevel']
    project_env = ProjectEnv.from_string(project_env_name)
    runlevel = RunLevel.from_string(runlevel_name)
    exit_code = _compile(project_root_dir, code_type, project_env, runlevel)
    return exit_code
Пример #3
0
def _run_docker_cmd(arg_map):
    """
    translates arguments from commandline to calls to python methods. Input is
    the output from argparse.parse_args(), output is an exit code indicating if
    the compilation succeeded.
    """
    project_root_dir = arg_map['project_root_dir']
    action = arg_map['action']
    project_env_name = arg_map['project']
    project_env = ProjectEnv.from_string(project_env_name)
    target_site_name = arg_map['site']
    target_site = NestSite.from_string(target_site_name)
    runlevel_name = arg_map['runlevel']
    runlevel = RunLevel.from_string(runlevel_name)
    service = arg_map['service']
    exit_code = _docker_action(action, service, project_env, \
        runlevel, target_site, project_root_dir)
    return exit_code