Ejemplo n.º 1
0
 def init_worker_host_nse_envs(isc_tasks):
     for it in isc_tasks:
         isnse.clear_transport_complete_flag_files(*it.k_m_n, it.min_ne,
                                                   it.max_ne)
         isnse.create_transport_complete_flag_file(*it.k_m_n, 1)
         nse_1_path = isnse.get_nse_condition_file_path(
             *it.k_m_n, 1, it.lp_type, it.is_use_extended_rules)
         pathlib.Path(nse_1_path).touch()
         isnse.clear_task_terminate_flag_files(*it.k_m_n)
def init_worker_host_nse_envs(isc_tasks):
    for it in isc_tasks:
        k_size = it.k_m_n[0]
        m_size = it.k_m_n[1]
        n_size = it.k_m_n[2]
        isnse.clear_transport_complete_flag_files(k_size, m_size, n_size,
                                                  it.min_ne, it.max_ne)
        isnse.create_transport_complete_flag_file(k_size, m_size, n_size, 1)
        nse_1_path = isnse.get_nse_condition_file_path(
            k_size, m_size, n_size, 1, it.lp_type, it.is_use_extended_rules)
        pathlib.Path(nse_1_path).touch()
def update_nse_files_to_new_host(host_ip, itasks):
    nse_files = list()
    complete_flags = list()
    for it in itasks:
        for i in it.non_se_condition_files:
            nse_files.append(
                isnse.get_nse_condition_file_path(*it.k_m_n, i, it.lp_type,
                                                  it.is_use_extended_rules))
            complete_flags.append(
                isnse.get_transport_complete_flag_file(*it.k_m_n, i))
    isnse.transport_non_se_results(nse_files, [host_ip])
    isnse.transport_non_se_results(complete_flags, [host_ip])